From owner-freebsd-bugs@FreeBSD.ORG Wed Feb 2 18:11:06 2005 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6820416A4CE for ; Wed, 2 Feb 2005 18:11:06 +0000 (GMT) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F1B743D4C for ; Wed, 2 Feb 2005 18:11:06 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.13.1/8.13.1) with ESMTP id j12IBFER025707; Wed, 2 Feb 2005 13:11:15 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.1/8.13.1/Submit) id j12IBEbj025706; Wed, 2 Feb 2005 13:11:14 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Wed, 2 Feb 2005 13:11:14 -0500 From: David Schultz To: "Gergely, KOVACS (VBuster)" Message-ID: <20050202181114.GA25556@VARK.MIT.EDU> Mail-Followup-To: "Gergely, KOVACS (VBuster)" , freebsd-bugs@FreeBSD.ORG References: <1107253628.925.42.camel@dev-0012> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1107253628.925.42.camel@dev-0012> cc: freebsd-bugs@FreeBSD.ORG Subject: Re: malloc/free deadlock bug X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Feb 2005 18:11:06 -0000 On Tue, Feb 01, 2005, Gergely, KOVACS (VBuster) wrote: > The hardware environment is a dual Xeon 3Ghz, and the OS is FreeBSD 5.3 > with SMP enabled kernel. > > The problem is that around in every 10th hour (100000 mail process) a > deadlock has been happened. According to gdb all threads are waiting in > malloc's, or free's mutex handler function: > > #0 0x280b3c93 in pthread_mutexattr_init () from > /usr/lib/libpthread.so.1 > #1 0x280b3be5 in pthread_mutexattr_init () from > /usr/lib/libpthread.so.1 > #2 0x280b04bb in _pthread_mutex_trylock () from > /usr/lib/libpthread.so.1 > #3 0x280b15e7 in pthread_mutex_lock () from /usr/lib/libpthread.so.1 > #4 0x280a9b87 in _spinlock () from /usr/lib/libpthread.so.1 > #5 0x2811c4a1 in ldexp () from /lib/libc.so.5 ^^^^^ > #6 0x2811c6d8 in malloc () from /lib/libc.so.5 Something is fishy about this backtrace; malloc() doesn't call ldexp(), and ldexp() doesn't call _spinlock(). Perhaps you're using the wrong debugging symbols, or there's some sort of signal handler weirdness or gdb bug at fault here. (BTW, a full backtrace from an unstripped libc might be more helpful.)