Re: perf: 3.17 another perf_fuzzer lockup

From: Vince Weaver
Date: Fri Oct 17 2014 - 10:13:22 EST


On Thu, 16 Oct 2014, Vince Weaver wrote:

> > It looks like the
> > else if (task->perf_event_ctxp[ctxn])
> > err = -EAGAIN;
>
> It is indeed stuck there, waiting for task->perf_event_ctxp[1] to get
> set to zero, which never happens.
>

OK, so with some more printk()s, it looks like somehow the parent thread
is trying to open a software event on itself.

task->perf_event_ctxp[1]

has a valid pointer, but the ctx it points to has a ctx->lock of 0.

So perf_lock_task_context() always returns NULL.

So in find_get_context()
we get stuck in an infinite retry loop, waiting forever for
either ctx->lock to go positive or for task->perf_event_ctxp[1]
to go NULL, neither of which is going to happen.

Now to find out why this could happen. Probably something to do with
crazy RCU magic :(

Vince

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/