Re: perf: perf_fuzzer crashes on Pentium 4 systems

From: Vince Weaver
Date: Thu Apr 04 2019 - 09:25:55 EST


On Wed, 3 Apr 2019, Cyrill Gorcunov wrote:

> On Wed, Apr 03, 2019 at 10:19:44PM +0300, Cyrill Gorcunov wrote:
> >
> > You know, seems I got what happened -- p4_general_events do
> > not cover all general events, they stop at PERF_COUNT_HW_BUS_CYCLES,
> > while more 3 general event left. This is 'cause I've not been following
> > pmu evolution in code. I will try to cover this events hopefully more
> > less soon and send you a patch to test (if you don't mind).
>
> Still this should not cause nil deref, continue investigating. Vince
> could oyu please apply the patch below, I doubt if it help with nil
> issue but worth having anyway


It looks like there are at least two bugs here, one that's a full
hardlockup with nothing on serial console. The other is the NULL
dereference.

Just ran with your patch applied and it hit the hard lockup case.

I'll have to see if things are reproducible and I can try to see if I can
get a reproducible value for what even caused the issue. perf_fuzzer has
some infrastructure for determining that but it's hit or miss if you can
get anything useful from it.

I'll keep running things, but I'm a bit busy at work here the next few
days so there might be some delay in the results.

Vince