Re: [BUG] perf: hard lockup when using perf-sched

From: Mike Galbraith
Date: Fri Mar 26 2010 - 15:10:49 EST


On Fri, 2010-03-26 at 18:23 +0100, Frederic Weisbecker wrote:
> On Fri, Mar 26, 2010 at 11:11:33AM +0100, Mike Galbraith wrote:

> > perf: fix perf sched record forkbomb deadlock
> >
> > perf sched record can deadlock a box should the holder of handle->data->lock
> > take an interrupt, and then attempt to acquire an rq lock held by a CPU trying
> > to acquire the same lock. Disable interrupts.
>
>
>
> Aah.
>
> So the scenario is the following inversion?
>
> CPU0 CPU1
> sched event with rq->lock held
> grab handle->data->lock
> spin on handle->data->lock
> interrupt
> try to grab rq->lock

Yeah, handle->data->lock holder dare not try to grab any rq lock because
of sched event with rq->lock held.

-Mike

--
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/