Subject: Re: Mutex error: mutex_vector_enter: locking against myself
To: Anders Lindgren <>
From: Andrew Doran <>
List: current-users
Date: 04/14/2007 12:54:38

On Thu, Apr 12, 2007 at 12:29:56AM +0200, Anders Lindgren wrote:

> I get this error (trivially reproducible) on port-evbarm/TS7200 kernels,
> both 4.99.16 from a couple of days ago and 4.99.17 built ~24h ago.

What kind of workload triggers the problem?

> The lock in question is no other than sched_mutex in kern_synch.o, which 
> seems pretty bad. :-)

Can you see if the panic is occuring from an interrupt handler?
> Interestingly enough, the problem disappears if the kernel is compiled 
> with options LOCKDEBUG. It seems evbarm usage of this option is isolated 
> to arm32/pmap.c, so I guess I'll continue looking there...

One possibility is that the arm32 cpu_switch is not correct, and LOCKDEBUG
is changing the timing of events just enough that the problem does not occur
with it. The yamt-idlelwp removes a lot of MD code in this area - would you
be willing to try a kernel from the branch if I build one for you?

> Anyone else seen this on other platforms?
> .oO( just fishing to see if this is exclusively evbarm, or MI )
> Should I grab the panic message and ddb bt/ps output and file a PR with 
> the details?

Yes please!