Date: Thu, 19 Feb 2004 10:05:21 +0200 From: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua> To: Jerry Toung <jtoung@arc.nasa.gov> Cc: hackers <freebsd-hackers@freebsd.org> Subject: Re: locking against myself Message-ID: <20040219080521.GA439@pm514-9.comsys.ntu-kpi.kiev.ua> In-Reply-To: <200402181152.26645.jtoung@arc.nasa.gov> References: <200402181152.26645.jtoung@arc.nasa.gov>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 18, 2004 at 11:52:26AM -0800, Jerry Toung wrote:
> Hello hackers,
> I am constantly getting the following message when I run my KLD:
>
> panic: lockmgr: locking against myself
> Debugger("panic")
> Stopped at Debugger+0x54: xchgl %ebx,in_Debugger.0
> db>
>
> What could possibly cause this?
> It seem to say that I'm locking an already locked variable.
>
Hello Jerry,
According to kern/kern_lock.c:lockmgr() your proc/thread already
has an exclusive lock and it tries to obtain a recursive exclusive
lock and lock doesn't have LK_CANRECURSE flag (also you allow to
sleep in lockmng()).
This is documented in lock(9) manual page:
LK_EXCLUSIVE Acquire an exclusive lock. If an exclusive
lock is already held, and LK_CANRECURSE is not
set, the system will panic(9).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040219080521.GA439>
