From owner-freebsd-threads@FreeBSD.ORG Thu Sep 16 19:55:09 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6361316A4CF; Thu, 16 Sep 2004 19:55:09 +0000 (GMT) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id B418243D41; Thu, 16 Sep 2004 19:55:08 +0000 (GMT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id 2B70C1FFDDC; Thu, 16 Sep 2004 21:55:07 +0200 (CEST) Received: by transport.cksoft.de (Postfix, from userid 66) id 188901FFDD7; Thu, 16 Sep 2004 21:55:05 +0200 (CEST) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id 1DFA9156A7; Thu, 16 Sep 2004 19:50:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id 1B24F1569F; Thu, 16 Sep 2004 19:50:22 +0000 (UTC) Date: Thu, 16 Sep 2004 19:50:22 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: Daniel Eischen In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de cc: freebsd-threads@freebsd.org Subject: Re: assert in _lock_acquire ? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2004 19:55:09 -0000 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 ? is there an (easy) way I can get to know when this happens ? -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT