Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Sep 2004 16:03:27 -0400 (EDT)
From:      Daniel Eischen <eischen@vigrid.com>
To:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: assert in _lock_acquire ?
Message-ID:  <Pine.GSO.4.43.0409161559540.25110-100000@sea.ntplx.net>
In-Reply-To: <Pine.BSF.4.53.0409161942061.16661@e0-0.zab2.int.zabbadoz.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 16 Sep 2004, Bjoern A. Zeeb wrote:

> On Thu, 16 Sep 2004, Daniel Eischen wrote:
>
> > On Thu, 16 Sep 2004, Bjoern A. Zeeb wrote:
> >
> > > I am using a global mutex to serialize a longer debugging
> > > output amongst threads. As this is only used for internal
> > > debugging builds where I really want to see everything
> > > I do not care about performance etc.
> >
> > Where did you introduce the global mutex?  In your application
> > or in libpthread or libc sources?
>
> application; initialized from main before any further threads started.
>
>
> > > ------ cut -------
> > > (gdb) bt full
> > > #0  _lock_acquire (lck=0x38, lu=0x80da034, prio=56) at /u1/src/src/RELENG_5/compile-20040914-1630/lib/libpthread/sys/lock.c:168
> > >         i = 135110708
> > >         lval = 672675788
> > >         __func__ = "_lock_acquire"
> > > #1  0x08076151 in mutex_handoff (curthread=0x80ee000, mutex=0x80d8980) at /u1/src/src/RELENG_5/compile-20040914-1630/lib/libpthread/thread/thr_mutex.c:1586
> > >         kmbx = (struct kse_mailbox *) 0x1
> >
> > The kse_mailbox has become corrupted.  If you are using %gs for anything,
> > that could be the cause.  %gs is reserved for the threads libraries.
>
> also lck=0x38 looked odd to me but this my be a result of corrupted
> kmbx.
>
> what is %gs btw ?

An i386 segment register.  The older NVidia drivers used %gs and thus
could not work with libpthread (or libthr).  Any messages from the
kernel about static LDT allocation are also hints that something
is using %gs.  I suspect your application is using or calling something
that is changing %gs.

-- 
Dan Eischen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.43.0409161559540.25110-100000>