Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Feb 2004 07:37:48 -0800
From:      Jerry Toung <jtoung@arc.nasa.gov>
To:        Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
Cc:        hackers <freebsd-hackers@freebsd.org>
Subject:   Re: locking against myself
Message-ID:  <200402190737.48831.jtoung@arc.nasa.gov>
In-Reply-To: <20040219080521.GA439@pm514-9.comsys.ntu-kpi.kiev.ua>
References:  <200402181152.26645.jtoung@arc.nasa.gov> <20040219080521.GA439@pm514-9.comsys.ntu-kpi.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks a lot Andrey.

On Thursday 19 February 2004 12:05 am, Andrey Simonenko wrote:
> 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=09=09Debugger+0x54:=09=09xchgl=09=09%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
> =09=09       lock is already held, and LK_CANRECURSE is not
> =09=09       set, the system will panic(9).

--=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402190737.48831.jtoung>