From owner-freebsd-threads@FreeBSD.ORG Mon May 26 17:46:38 2003 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 787A537B401 for ; Mon, 26 May 2003 17:46:38 -0700 (PDT) Received: from mx8.mail.ru (mx8.mail.ru [194.67.23.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE96043F75 for ; Mon, 26 May 2003 17:46:37 -0700 (PDT) (envelope-from kabaev@mail.ru) Received: from [141.154.241.71] (port=49646 helo=kan.dnsalias.net) by mx8.mail.ru with esmtp id 19KSbr-000PPw-00 for freebsd-threads@freebsd.org; Tue, 27 May 2003 04:46:36 +0400 Received: from kan.dnsalias.net (ak03@localhost [127.0.0.1]) by kan.dnsalias.net (8.12.9/8.12.9) with ESMTP id h4R0kYPo004247 for ; Mon, 26 May 2003 20:46:34 -0400 (EDT) (envelope-from kan@kan.dnsalias.net) Received: (from kan@localhost) by kan.dnsalias.net (8.12.9/8.12.9/Submit) id h4R0kYkV004246; Mon, 26 May 2003 20:46:34 -0400 (EDT) Date: Mon, 26 May 2003 20:46:34 -0400 From: Alexander Kabaev To: freebsd-threads@freebsd.org Message-Id: <20030526204634.4c0cfee6.kabaev@mail.ru> X-Mailer: Sylpheed version 0.8.11claws151 (GTK+ 1.2.10; i386-portbld-freebsd5.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam: Not detected Subject: konsole triggers infinite SIGABRT loop in libkse 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: Tue, 27 May 2003 00:46:38 -0000 There is a simple way to trigger an infinite loop in konsole with libkse. Sometimes konsole tries to chown the pty is has created and fails with the following message: konsole: cannot chown /dev/ttyp9. Reason: Operation not permitted It tries to abort() itself afterwards, entering the infinite loop, see backtrace below. Apparently, _thr_sig_handler simply calls itself over and over again. #1 0x29118c82 in _thr_sig_handler (sig=6, info=0xbfbfea90, ucp=0xbfbfe7d0) at /usr/download/rtld/lib/libpthread/thread/thr_sig.c:190 190 (*(sigfunc))(sig, info, ucp); #32572 0x29118c82 in _thr_sig_handler (sig=6, info=0xbfbfea90, ucp=0xbfbfe7d0) at /usr/download/rtld/lib/libpthread/thread/thr_sig.c:190 190 (*(sigfunc))(sig, info, ucp); #32573 0x29118c82 in _thr_sig_handler (sig=6, info=0xbfbfea90, ucp=0xbfbfe7d0) at /usr/download/rtld/lib/libpthread/thread/thr_sig.c:190 190 (*(sigfunc))(sig, info, ucp); #32574 #32575 0x2917e353 in kill () from /usr/lib/libc.so.5 #32576 0x2809cb57 in TEPty::makePty(bool) () from /usr/local/lib/konsole.so #32577 0x2809cbea in TEPty::startPgm(char const*, QValueList&, char const*) () from /usr/local/lib/konsole.so #32578 0x2809d3ea in TEPty::commSetupDoneC() () from /usr/local/lib/konsole.so #32579 0x287647fd in KProcess::start(KProcess::RunMode, KProcess::Communication) () from /usr/local/lib/libkdecore.so.5 #32580 0x2809c415 in TEPty::run(char const*, QStrList&, char const*, bool, char const*, char const*) () from /usr/local/lib/konsole.so #32581 0x280c0c39 in TESession::run() () from /usr/local/lib/konsole.so #32582 0x280c2a45 in TESession::qt_invoke(int, QUObject*) () from /usr/local/lib/konsole.so #32583 0x28ae9bd8 in QObject::activate_signal(QConnectionList*, QUObject*) () from /usr/X11R6/lib/libqt-mt.so.3 #32584 0x28db0a2f in QSignal::signal(QVariant const&) () from /usr/X11R6/lib/libqt-mt.so.3 #32585 0x28b02fd8 in QSignal::activate() () from /usr/X11R6/lib/libqt-mt.so.3 #32586 0x28b09d03 in QSingleShotTimer::event(QEvent*) () from /usr/X11R6/lib/libqt-mt.so.3 <.. all the way to main()> From owner-freebsd-threads@FreeBSD.ORG Mon May 26 21:09:42 2003 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 D1C5C37B401 for ; Mon, 26 May 2003 21:09:42 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20D6143F93 for ; Mon, 26 May 2003 21:09:42 -0700 (PDT) (envelope-from eischen@pcnet1.pcnet.com) Received: from pcnet1.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h4R49fwQ028325; Tue, 27 May 2003 00:09:41 -0400 (EDT) Received: from localhost (eischen@localhost)h4R49ekw028321; Tue, 27 May 2003 00:09:41 -0400 (EDT) Date: Tue, 27 May 2003 00:09:40 -0400 (EDT) From: Daniel Eischen To: Alexander Kabaev In-Reply-To: <20030526204634.4c0cfee6.kabaev@mail.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: konsole triggers infinite SIGABRT loop in libkse 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: Tue, 27 May 2003 04:09:43 -0000 On Mon, 26 May 2003, Alexander Kabaev wrote: > There is a simple way to trigger an infinite loop in konsole with > libkse. Sometimes konsole tries to chown the pty is has created and > fails with the following message: > > konsole: cannot chown /dev/ttyp9. > Reason: Operation not permitted > > It tries to abort() itself afterwards, entering the infinite loop, see > backtrace below. Apparently, _thr_sig_handler simply calls itself over > and over again. Hmm, I think I can see how this could occur after a fork. Does this solve the problem for you: Index: thread/thr_sig.c =================================================================== RCS file: /home/ncvs/src/lib/libpthread/thread/thr_sig.c,v retrieving revision 1.51 diff -u -r1.51 thr_sig.c --- thread/thr_sig.c 24 May 2003 02:29:25 -0000 1.51 +++ thread/thr_sig.c 27 May 2003 04:06:52 -0000 @@ -175,7 +175,7 @@ void _thr_sig_handler(int sig, siginfo_t *info, ucontext_t *ucp) { - void (*sigfunc)(int, siginfo_t *, void *); + __siginfohandler_t *sigfunc; struct kse *curkse; curkse = _get_curkse(); @@ -184,7 +184,8 @@ sigfunc = _thread_sigact[sig - 1].sa_sigaction; ucp->uc_sigmask = _thr_proc_sigmask; if (((__sighandler_t *)sigfunc != SIG_DFL) && - ((__sighandler_t *)sigfunc != SIG_IGN)) { + ((__sighandler_t *)sigfunc != SIG_IGN) && + (sigfunc != (__siginfohandler_t *)_thr_sig_handler)) { if (((_thread_sigact[sig - 1].sa_flags & SA_SIGINFO) != 0) || (info == NULL)) (*(sigfunc))(sig, info, ucp); -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Mon May 26 21:21:04 2003 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 15F3237B401 for ; Mon, 26 May 2003 21:21:04 -0700 (PDT) Received: from mx9.mail.ru (mx9.mail.ru [194.67.23.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id 62D3043F75 for ; Mon, 26 May 2003 21:21:03 -0700 (PDT) (envelope-from kabaev@mail.ru) Received: from [151.203.204.223] (port=49837 helo=kan.dnsalias.net) by mx9.mail.ru with esmtp id 19KVxN-0005yU-00; Tue, 27 May 2003 08:21:01 +0400 Received: from kan.dnsalias.net (ak03@localhost [127.0.0.1]) by kan.dnsalias.net (8.12.9/8.12.9) with ESMTP id h4R4L0CG023679; Tue, 27 May 2003 00:21:00 -0400 (EDT) (envelope-from kan@kan.dnsalias.net) Received: (from kan@localhost) by kan.dnsalias.net (8.12.9/8.12.9/Submit) id h4R4L0YB023678; Tue, 27 May 2003 00:21:00 -0400 (EDT) Date: Tue, 27 May 2003 00:20:59 -0400 From: Alexander Kabaev To: Daniel Eischen Message-Id: <20030527002059.646b8e78.kabaev@mail.ru> In-Reply-To: References: <20030526204634.4c0cfee6.kabaev@mail.ru> X-Mailer: Sylpheed version 0.9.0claws2 (GTK+ 1.2.10; i386-portbld-freebsd5.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: konsole triggers infinite SIGABRT loop in libkse 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: Tue, 27 May 2003 04:21:04 -0000 > Hmm, I think I can see how this could occur after a fork. Does this > solve the problem for you: Yes, it does eliminate the infinite loop. konsole still aborts on startup (cleanly), and it takes several attempts to actually start it or open the new tab inside, but I do not think this has anything to do with the threads library anymore. From owner-freebsd-threads@FreeBSD.ORG Tue May 27 05:52:11 2003 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 F3A2037B401 for ; Tue, 27 May 2003 05:52:10 -0700 (PDT) Received: from silver.he.iki.fi (silver.he.iki.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F6F743F75 for ; Tue, 27 May 2003 05:52:09 -0700 (PDT) (envelope-from pete@rommon.com) Received: from rommon.com (localhost.he.iki.fi [127.0.0.1]) by silver.he.iki.fi (8.12.9/8.11.4) with ESMTP id h4RCq5k8066371 for ; Tue, 27 May 2003 15:52:07 +0300 (EEST) (envelope-from pete@rommon.com) Message-ID: <3ED35F75.1000902@rommon.com> Date: Tue, 27 May 2003 15:52:05 +0300 From: Petri Helenius Organization: ROMmon Ltd User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3) Gecko/20030501 X-Accept-Language: English [en],Finnish [fi] MIME-Version: 1.0 To: freebsd-threads@freebsd.org Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: malloc(): error: recursive call 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: Tue, 27 May 2003 12:52:11 -0000 I'm using libkse cvsupped+built on 24th May and seem to run into these messages: malloc(): error: recursive call It seems that I get these when the call goes through libc functions like strdup, asprintf, etc. but so far none happened with direct call to malloc from my code. Is there some linking trick I need to perform (apart from putting -lkse to the end of the Makefile line) to get the locking work properly ? Pete From owner-freebsd-threads@FreeBSD.ORG Tue May 27 07:43:28 2003 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 C8B3437B401 for ; Tue, 27 May 2003 07:43:28 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2474143F3F for ; Tue, 27 May 2003 07:43:28 -0700 (PDT) (envelope-from eischen@pcnet1.pcnet.com) Received: from pcnet1.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h4REhRwQ028508; Tue, 27 May 2003 10:43:27 -0400 (EDT) Received: from localhost (eischen@localhost)h4REhQGQ028503; Tue, 27 May 2003 10:43:26 -0400 (EDT) Date: Tue, 27 May 2003 10:43:26 -0400 (EDT) From: Daniel Eischen To: Petri Helenius In-Reply-To: <3ED35F75.1000902@rommon.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: malloc(): error: recursive call 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: Tue, 27 May 2003 14:43:29 -0000 On Tue, 27 May 2003, Petri Helenius wrote: > I'm using libkse cvsupped+built on 24th May and seem to run into > these messages: > malloc(): error: recursive call > > It seems that I get these when the call goes through libc functions like > strdup, asprintf, etc. > but so far none happened with direct call to malloc from my code. Is > there some linking trick > I need to perform (apart from putting -lkse to the end of the Makefile > line) to get the locking > work properly ? Are you linking to libkse before linking to libc? (Don't explicitly link to libc). Or are you linking to other libraries that are linked to libc_r? We haven't had any problems like that in all of our tests. -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Tue May 27 11:03:19 2003 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 1909537B401 for ; Tue, 27 May 2003 11:03:19 -0700 (PDT) Received: from silver.he.iki.fi (silver.he.iki.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 86EA843F75 for ; Tue, 27 May 2003 11:03:17 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from PETEX31 (h81.vuokselantie10.fi [193.64.42.129]) by silver.he.iki.fi (8.12.9/8.11.4) with SMTP id h4RI3Fk8068666; Tue, 27 May 2003 21:03:16 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <02d801c3247a$3b347710$812a40c1@PETEX31> From: "Petri Helenius" To: "Daniel Eischen" References: Date: Tue, 27 May 2003 21:03:08 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: freebsd-threads@freebsd.org Subject: Re: malloc(): error: recursive call 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: Tue, 27 May 2003 18:03:19 -0000 > > Are you linking to libkse before linking to libc? (Don't explicitly > link to libc). Or are you linking to other libraries that are linked > to libc_r? > Iīm linking to -lnetsnmp and -lcrypto and -lpcap. -lkse is last on the command line. > We haven't had any problems like that in all of our tests. > This seems to happen even on single-cpu machine. __isthreaded is 1 if I make the process dump core. Anything else I should look for? Try with libthr ? Pete From owner-freebsd-threads@FreeBSD.ORG Tue May 27 11:10:44 2003 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 213BD37B401 for ; Tue, 27 May 2003 11:10:44 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29FC643FA3 for ; Tue, 27 May 2003 11:10:43 -0700 (PDT) (envelope-from eischen@pcnet1.pcnet.com) Received: from pcnet1.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h4RIAgwQ003652; Tue, 27 May 2003 14:10:42 -0400 (EDT) Received: from localhost (eischen@localhost)h4RIAghk003648; Tue, 27 May 2003 14:10:42 -0400 (EDT) Date: Tue, 27 May 2003 14:10:41 -0400 (EDT) From: Daniel Eischen To: Petri Helenius In-Reply-To: <02d801c3247a$3b347710$812a40c1@PETEX31> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE cc: freebsd-threads@freebsd.org Subject: Re: malloc(): error: recursive call 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: Tue, 27 May 2003 18:10:44 -0000 On Tue, 27 May 2003, Petri Helenius wrote: > > > > Are you linking to libkse before linking to libc? (Don't explicitly > > link to libc). Or are you linking to other libraries that are linked > > to libc_r? > > > I=B4m linking to -lnetsnmp and -lcrypto and -lpcap. -lkse is last on the = command > line. And what does `ldd libnetsnmp.so.x`, `ldd libfoo.y`, show? What is `ldd yourexecutable` show? > > We haven't had any problems like that in all of our tests. > > > This seems to happen even on single-cpu machine. __isthreaded is 1 if I m= ake the > process dump core. >=20 > Anything else I should look for? Try with libthr ? malloc is thread safe and we've been using it fine with all our tests. I suspect you're using another library that is using libc_r or something. --=20 Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Tue May 27 14:17:53 2003 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 DDCA237B401 for ; Tue, 27 May 2003 14:17:53 -0700 (PDT) Received: from silver.he.iki.fi (silver.he.iki.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id A363143F75 for ; Tue, 27 May 2003 14:17:52 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from PETEX31 (h81.vuokselantie10.fi [193.64.42.129]) by silver.he.iki.fi (8.12.9/8.11.4) with SMTP id h4RLHok8070389; Wed, 28 May 2003 00:17:50 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <038a01c32495$6a1e17f0$812a40c1@PETEX31> From: "Petri Helenius" To: "Daniel Eischen" References: Date: Wed, 28 May 2003 00:17:43 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: freebsd-threads@freebsd.org Subject: Re: malloc(): error: recursive call 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: Tue, 27 May 2003 21:17:54 -0000 >And what does `ldd libnetsnmp.so.x`, `ldd libfoo.y`, show? They give empty replies. >What is `ldd yourexecutable` show? Itīs usually linked static but if I remove the -static line it says: libnetsnmp.so.5 => /usr/local/lib/libnetsnmp.so.5 (0x2807f000) libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x280fe000) libpcap.so.2 => /usr/lib/libpcap.so.2 (0x28209000) libkse.so.1 => /usr/lib/libkse.so.1 (0x28225000) libc.so.5 => /usr/lib/libc.so.5 (0x28246000) >malloc is thread safe and we've been using it fine >with all our tests. I suspect you're using another >library that is using libc_r or something. malloc works for me with for example linuxthreads. So I do believe that the the trigger for malloc locking works, however looking at the code, spinlocks are implemented differently depending on which thread library is linked in. I have only I686_CPU on my kernel config and I donīt include pthread.h to all object files because itīs not supposed to be neccessary. (only those which call pthread_* functions) The code is compiled on a machine with no SMP and run on both SMP and non-SMP machines. Do I understand correctly that libkse mutexes always require syscall when locking and unlocking? Pete From owner-freebsd-threads@FreeBSD.ORG Tue May 27 15:02:47 2003 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 D715137B401 for ; Tue, 27 May 2003 15:02:47 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2144F43FAF for ; Tue, 27 May 2003 15:02:47 -0700 (PDT) (envelope-from eischen@pcnet1.pcnet.com) Received: from pcnet1.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h4RM2kwQ013114; Tue, 27 May 2003 18:02:46 -0400 (EDT) Received: from localhost (eischen@localhost)h4RM2kCi013111; Tue, 27 May 2003 18:02:46 -0400 (EDT) Date: Tue, 27 May 2003 18:02:46 -0400 (EDT) From: Daniel Eischen To: Petri Helenius In-Reply-To: <038a01c32495$6a1e17f0$812a40c1@PETEX31> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE cc: freebsd-threads@freebsd.org Subject: Re: malloc(): error: recursive call 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: Tue, 27 May 2003 22:02:48 -0000 On Wed, 28 May 2003, Petri Helenius wrote: > >And what does `ldd libnetsnmp.so.x`, `ldd libfoo.y`, show? >=20 > They give empty replies. >=20 > >What is `ldd yourexecutable` show? >=20 > It=B4s usually linked static but if I remove the -static line it says: > libnetsnmp.so.5 =3D> /usr/local/lib/libnetsnmp.so.5 (0x2807f000) > libcrypto.so.3 =3D> /usr/lib/libcrypto.so.3 (0x280fe000) > libpcap.so.2 =3D> /usr/lib/libpcap.so.2 (0x28209000) > libkse.so.1 =3D> /usr/lib/libkse.so.1 (0x28225000) > libc.so.5 =3D> /usr/lib/libc.so.5 (0x28246000) >=20 > >malloc is thread safe and we've been using it fine > >with all our tests. I suspect you're using another > >library that is using libc_r or something. >=20 > malloc works for me with for example linuxthreads. So I do believe that > the the trigger for malloc locking works, however looking at the code, > spinlocks are implemented differently depending on which thread library i= s > linked in. I'm going to need a sample. Nothing I have here has this problem, from KDE & mozilla, to the ACE tests. There's also a patch for spinlocks at: http://people.freebsd.org/~deischen/kse/spinlock.diffs This is just a different way for libkse to do spinlocks, and I don't see how it's going to solve your problem, but you can try it. > I have only I686_CPU on my kernel config and I don=B4t include pthread.h > to all object files because it=B4s not supposed to be neccessary. (only t= hose > which call pthread_* functions) The code is compiled on a machine with > no SMP and run on both SMP and non-SMP machines. >=20 > Do I understand correctly that libkse mutexes always require syscall > when locking and unlocking? No, it doesn't. It only requires syscalls when a thread's parent KSE has no more threads to run. --=20 Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Tue May 27 16:29:40 2003 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 6708F37B401 for ; Tue, 27 May 2003 16:29:40 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9622443F75 for ; Tue, 27 May 2003 16:29:39 -0700 (PDT) (envelope-from eischen@pcnet5.pcnet.com) Received: from pcnet5.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h4RNTcqJ002249; Tue, 27 May 2003 19:29:38 -0400 (EDT) Received: from localhost (eischen@localhost)h4RNTbks002245; Tue, 27 May 2003 19:29:38 -0400 (EDT) Date: Tue, 27 May 2003 19:29:37 -0400 (EDT) From: Daniel Eischen To: Petri Helenius In-Reply-To: <038a01c32495$6a1e17f0$812a40c1@PETEX31> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE cc: Daniel Eischen cc: freebsd-threads@freebsd.org Subject: Re: malloc(): error: recursive call 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: Tue, 27 May 2003 23:29:40 -0000 On Wed, 28 May 2003, Petri Helenius wrote: > >And what does `ldd libnetsnmp.so.x`, `ldd libfoo.y`, show? >=20 > They give empty replies. >=20 > >What is `ldd yourexecutable` show? >=20 > It=B4s usually linked static but if I remove the -static line it says: > libnetsnmp.so.5 =3D> /usr/local/lib/libnetsnmp.so.5 (0x2807f000) > libcrypto.so.3 =3D> /usr/lib/libcrypto.so.3 (0x280fe000) > libpcap.so.2 =3D> /usr/lib/libpcap.so.2 (0x28209000) > libkse.so.1 =3D> /usr/lib/libkse.so.1 (0x28225000) > libc.so.5 =3D> /usr/lib/libc.so.5 (0x28246000) >=20 > >malloc is thread safe and we've been using it fine > >with all our tests. I suspect you're using another > >library that is using libc_r or something. >=20 > malloc works for me with for example linuxthreads. So I do believe that > the the trigger for malloc locking works, however looking at the code, > spinlocks are implemented differently depending on which thread library i= s > linked in. Also, you do need a relatively recent kernel. There are a couple of flags in each thread's mailbox that the kernel needs to recognize. This change was committed to the kernel around April 21, 2003 --=20 Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Tue May 27 22:57:30 2003 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 16B2D37B401 for ; Tue, 27 May 2003 22:57:30 -0700 (PDT) Received: from silver.he.iki.fi (silver.he.iki.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE0CC43F85 for ; Tue, 27 May 2003 22:57:28 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from PETEX31 (h81.vuokselantie10.fi [193.64.42.129]) by silver.he.iki.fi (8.12.9/8.11.4) with SMTP id h4S5vQk8074028; Wed, 28 May 2003 08:57:26 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <03d401c324dd$ffffea80$812a40c1@PETEX31> From: "Petri Helenius" To: "Daniel Eischen" References: Date: Wed, 28 May 2003 08:57:18 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: Daniel Eischen cc: freebsd-threads@freebsd.org Subject: Re: malloc(): error: recursive call 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: Wed, 28 May 2003 05:57:30 -0000 >Also, you do need a relatively recent kernel. There are >a couple of flags in each thread's mailbox that the >kernel needs to recognize. This change was committed >to the kernel around April 21, 2003 Both my kernel and world are currently built from May 24, 2003 source. Pete From owner-freebsd-threads@FreeBSD.ORG Tue May 27 23:30:49 2003 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 37C9B37B401 for ; Tue, 27 May 2003 23:30:49 -0700 (PDT) Received: from silver.he.iki.fi (silver.he.iki.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1901F43F3F for ; Tue, 27 May 2003 23:30:48 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from PETEX31 (h81.vuokselantie10.fi [193.64.42.129]) by silver.he.iki.fi (8.12.9/8.11.4) with SMTP id h4S6Ukk8074291; Wed, 28 May 2003 09:30:46 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <042401c324e2$a7878070$812a40c1@PETEX31> From: "Petri Helenius" To: "Daniel Eischen" References: Date: Wed, 28 May 2003 09:30:38 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: freebsd-threads@freebsd.org Subject: Re: malloc(): error: recursive call 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: Wed, 28 May 2003 06:30:49 -0000 >I'm going to need a sample. Nothing I have here has this problem, >from KDE & mozilla, to the ACE tests. Are the tests somewhere in the source tree or ports? I could run them on my config and see what happens. >There's also a patch for spinlocks at: > > http://people.freebsd.org/~deischen/kse/spinlock.diffs Should I drop this to /usr/src/lib/libpthread or /usr/src/lib/libthr ? Pete From owner-freebsd-threads@FreeBSD.ORG Wed May 28 00:25:02 2003 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 A9B0637B401 for ; Wed, 28 May 2003 00:25:02 -0700 (PDT) Received: from silver.he.iki.fi (silver.he.iki.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8ED6B43F85 for ; Wed, 28 May 2003 00:25:01 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from he.iki.fi (localhost.he.iki.fi [127.0.0.1]) by silver.he.iki.fi (8.12.9/8.11.4) with ESMTP id h4S7Oxk8074687; Wed, 28 May 2003 10:24:59 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <3ED4644A.6050401@he.iki.fi> Date: Wed, 28 May 2003 10:24:58 +0300 From: Petri Helenius User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3) Gecko/20030501 X-Accept-Language: English [en],Finnish [fi] MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit cc: Daniel Eischen cc: freebsd-threads@freebsd.org Subject: Re: malloc(): error: recursive call 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: Wed, 28 May 2003 07:25:03 -0000 Alright, here goes: (it's ugly cut&paste with inadequate includes and stuff but fails as expected) Uncomment the "extra" mutexes and it runs fine. Complied with: gcc -g -O2 -march=pentium -D_REENTRANT -D_THREAD_SAFE -Wall -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes -Wno-format -pedantic -Wno-long-long -c ttest.c gcc -static -g -O2 -march=pentium -D_REENTRANT -D_THREAD_SAFE -Wall -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes -Wno-format -pedantic -Wno-long-long ttest.o -o ttest -lkse libs: # ls -l /usr/lib/libkse* -r--r--r-- 1 root wheel 229156 May 24 14:57 /usr/lib/libkse.a lrwxr-xr-x 1 root wheel 11 May 24 14:57 /usr/lib/libkse.so -> libkse.so.1 -r--r--r-- 1 root wheel 121048 May 24 14:57 /usr/lib/libkse.so.1 -r--r--r-- 1 root wheel 243042 May 24 14:57 /usr/lib/libkse_p.a kernel: FreeBSD kompak.vuokselantie10.fi 5.1-BETA FreeBSD 5.1-BETA #7: Sat May 24 10:49:11 GMT 2003 root@kompak.vuokselantie10.fi:/usr/src/sys/i386/compile/EMTEST i386 # ./ttest free spin free spin free spin free spin free spin free spin free spin free spin free spin free spin free spin alloc spin free spin ttest in free(): error: recursive call Abort (core dumped) and the code: (has more stuff than it needs because it has some debugging built in) #include #include #define SLOTS 100000 void rommon_mutex_lock (pthread_mutex_t *mutex, int line) { int retvalue; int lastline; while (retvalue = pthread_mutex_lock (mutex)) { printf ("%d locking %lx failed, line %d (holder:%d)\n",getpid(),mutex,line,lastline); usleep (100000); } } static pthread_mutex_t foom; static char *foo[SLOTS]; live_poll_sharedmem() { while (1) { int i; printf ("alloc spin\n"); for ( i = 0 ; i < SLOTS; i++) { /* rommon_mutex_lock (&foom,__LINE__);*/ if (!foo[i]) { asprintf (&foo[i],"slot %d",i); } /* pthread_mutex_unlock (&foom);*/ } } } main() { static pthread_t smem_thread; pthread_mutexattr_t attr; int i; pthread_mutexattr_init (&attr); pthread_mutexattr_settype (&attr,PTHREAD_MUTEX_ERRORCHECK); pthread_mutex_init (&foom,&attr); pthread_create (&smem_thread,NULL,&live_poll_sharedmem,0); while (1) { printf ("free spin\n"); for ( i = 0; i < 100000; i++) { /* rommon_mutex_lock (&foom,__LINE__);*/ if (foo[i]) { free (foo[i]); foo[i] = NULL; } /* pthread_mutex_unlock (&foom);*/ } } } Daniel Eischen wrote: >On Wed, 28 May 2003, Petri Helenius wrote: > > > >>>And what does `ldd libnetsnmp.so.x`, `ldd libfoo.y`, show? >>> >>> >>They give empty replies. >> >> >> >>>What is `ldd yourexecutable` show? >>> >>> >>It?s usually linked static but if I remove the -static line it says: >> libnetsnmp.so.5 => /usr/local/lib/libnetsnmp.so.5 (0x2807f000) >> libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x280fe000) >> libpcap.so.2 => /usr/lib/libpcap.so.2 (0x28209000) >> libkse.so.1 => /usr/lib/libkse.so.1 (0x28225000) >> libc.so.5 => /usr/lib/libc.so.5 (0x28246000) >> >> >> >>>malloc is thread safe and we've been using it fine >>>with all our tests. I suspect you're using another >>>library that is using libc_r or something. >>> >>> >>malloc works for me with for example linuxthreads. So I do believe that >>the the trigger for malloc locking works, however looking at the code, >>spinlocks are implemented differently depending on which thread library is >>linked in. >> >> > >Also, you do need a relatively recent kernel. There are >a couple of flags in each thread's mailbox that the >kernel needs to recognize. This change was committed >to the kernel around April 21, 2003 > > > From owner-freebsd-threads@FreeBSD.ORG Wed May 28 00:55:32 2003 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 A142937B401 for ; Wed, 28 May 2003 00:55:32 -0700 (PDT) Received: from pop015.verizon.net (pop015pub.verizon.net [206.46.170.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id BCF7D43FA3 for ; Wed, 28 May 2003 00:55:31 -0700 (PDT) (envelope-from mtm@identd.net) Received: from kokeb.ambesa.net ([151.200.236.15]) by pop015.verizon.net (InterMail vM.5.01.05.33 201-253-122-126-133-20030313) with ESMTP id <20030528075531.OQTH20810.pop015.verizon.net@kokeb.ambesa.net>; Wed, 28 May 2003 02:55:31 -0500 Date: Wed, 28 May 2003 03:55:30 -0400 From: Mike Makonnen To: "Petri Helenius" In-Reply-To: <042401c324e2$a7878070$812a40c1@PETEX31> References: <042401c324e2$a7878070$812a40c1@PETEX31> X-Mailer: Sylpheed version 0.8.10 (GTK+ 1.2.10; i386-portbld-freebsd5.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at pop015.verizon.net from [151.200.236.15] at Wed, 28 May 2003 02:55:30 -0500 Message-Id: <20030528075531.OQTH20810.pop015.verizon.net@kokeb.ambesa.net> cc: eischen@pcnet1.pcnet.com cc: freebsd-threads@freebsd.org Subject: Re: malloc(): error: recursive call 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: Wed, 28 May 2003 07:55:32 -0000 On Wed, 28 May 2003 09:30:38 +0300 "Petri Helenius" wrote: > > >I'm going to need a sample. Nothing I have here has this problem, > >from KDE & mozilla, to the ACE tests. > > Are the tests somewhere in the source tree or ports? I could run them > on my config and see what happens. No, you have to download the ACE tests: http://deuce.doc.wustl.edu/Download.html There were instructions on how to build it posted to this list a while back. It should be in the archives. > > >There's also a patch for spinlocks at: > > > > http://people.freebsd.org/~deischen/kse/spinlock.diffs > > Should I drop this to /usr/src/lib/libpthread or /usr/src/lib/libthr ? It's only for libpthread. Libthr is a different library for 1:1 threads, although they are both derived from the same code base (libc_r). I would be interested to know what your experiences with libthr are if you have the time. Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc mtm@identd.net | D228 1A6F C64E 120A A1C9 A3AA DAE1 E2AF DBCC 68B9 mtm@FreeBSD.Org| FreeBSD - The Power To Serve From owner-freebsd-threads@FreeBSD.ORG Wed May 28 01:57:04 2003 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 1022A37B401; Wed, 28 May 2003 01:57:04 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 81FA843F93; Wed, 28 May 2003 01:57:03 -0700 (PDT) (envelope-from davidxu@freebsd.org) Received: from davidw2k (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with SMTP id h4S8v0Up038340; Wed, 28 May 2003 01:57:01 -0700 (PDT) (envelope-from davidxu@freebsd.org) Message-ID: <00ff01c324f7$7571cc20$f001a8c0@davidw2k> From: "David Xu" To: "Petri Helenius" , "Daniel Eischen" References: <3ED4644A.6050401@he.iki.fi> Date: Wed, 28 May 2003 16:59:31 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 cc: Daniel Eischen cc: freebsd-threads@freebsd.org Subject: Re: malloc(): error: recursive call 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: Wed, 28 May 2003 08:57:04 -0000 ----- Original Message -----=20 From: "Petri Helenius" To: "Daniel Eischen" Cc: "Daniel Eischen" ; = Sent: Wednesday, May 28, 2003 3:24 PM Subject: Re: malloc(): error: recursive call > Alright, here goes: > (it's ugly cut&paste with inadequate includes and stuff but fails as=20 > expected) > Uncomment the "extra" mutexes and it runs fine. >=20 > Complied with: > gcc -g -O2 -march=3Dpentium -D_REENTRANT -D_THREAD_SAFE -Wall = -Wshadow=20 > -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion=20 > -Waggregate-return -Wstrict-prototypes -Wno-format -pedantic=20 > -Wno-long-long -c ttest.c > gcc -static -g -O2 -march=3Dpentium -D_REENTRANT -D_THREAD_SAFE = -Wall=20 > -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion=20 > -Waggregate-return -Wstrict-prototypes -Wno-format -pedantic=20 > -Wno-long-long ttest.o -o ttest -lkse >=20 > libs: # ls -l /usr/lib/libkse* > -r--r--r-- 1 root wheel 229156 May 24 14:57 /usr/lib/libkse.a > lrwxr-xr-x 1 root wheel 11 May 24 14:57 /usr/lib/libkse.so ->=20 > libkse.so.1 > -r--r--r-- 1 root wheel 121048 May 24 14:57 /usr/lib/libkse.so.1 > -r--r--r-- 1 root wheel 243042 May 24 14:57 /usr/lib/libkse_p.a >=20 > kernel: > FreeBSD kompak.vuokselantie10.fi 5.1-BETA FreeBSD 5.1-BETA #7: Sat May = > 24 10:49:11 GMT 2003 =20 > root@kompak.vuokselantie10.fi:/usr/src/sys/i386/compile/EMTEST i386 >=20 > # ./ttest > free spin > free spin > free spin > free spin > free spin > free spin > free spin > free spin > free spin > free spin > free spin > alloc spin > free spin > ttest in free(): error: recursive call > Abort (core dumped) >=20 > and the code: > (has more stuff than it needs because it has some debugging built in) > ... Unfortunatly I have run your test program for five minutes without = problem. David Xu From owner-freebsd-threads@FreeBSD.ORG Wed May 28 02:19:48 2003 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 DA33437B401; Wed, 28 May 2003 02:19:48 -0700 (PDT) Received: from silver.he.iki.fi (silver.he.iki.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id BCED043FA3; Wed, 28 May 2003 02:19:47 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from PETEX31 (h81.vuokselantie10.fi [193.64.42.129]) by silver.he.iki.fi (8.12.9/8.11.4) with SMTP id h4S9Jjk8075548; Wed, 28 May 2003 12:19:46 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <049101c324fa$436a9bf0$812a40c1@PETEX31> From: "Petri Helenius" To: "David Xu" , "Daniel Eischen" References: <3ED4644A.6050401@he.iki.fi> <00ff01c324f7$7571cc20$f001a8c0@davidw2k> Date: Wed, 28 May 2003 12:19:37 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: Daniel Eischen cc: freebsd-threads@freebsd.org Subject: Re: malloc(): error: recursive call 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: Wed, 28 May 2003 09:19:49 -0000 Could you send the relevant data from boot messages so we could see if it?s a CPU or platform specific issue. The box the cut&paste was from is; FreeBSD 5.1-BETA #7: Sat May 24 10:49:11 GMT 2003 root@kompak.vuokselantie10.fi:/usr/src/sys/i386/compile/EMTEST Preloaded elf kernel "/boot/kernel/kernel" at 0xc04cf000. Timecounter "i8254" frequency 1193182 Hz Timecounter "TSC" frequency 598009575 Hz CPU: Intel Celeron (598.01-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x683 Stepping = 3 Features=0x383fbff real memory = 267386880 (255 MB) avail memory = 254566400 (242 MB) Pentium Pro MTRR support enabled Pete >Unfortunatly I have run your test program for five minutes without problem. > >David Xu From owner-freebsd-threads@FreeBSD.ORG Wed May 28 02:32:33 2003 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 44F8337B401; Wed, 28 May 2003 02:32:33 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA79543F3F; Wed, 28 May 2003 02:32:32 -0700 (PDT) (envelope-from davidxu@freebsd.org) Received: from davidw2k (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with SMTP id h4S9WUUp043607; Wed, 28 May 2003 02:32:31 -0700 (PDT) (envelope-from davidxu@freebsd.org) Message-ID: <012901c324fc$6aa19a00$f001a8c0@davidw2k> From: "David Xu" To: "Petri Helenius" , "Daniel Eischen" References: <3ED4644A.6050401@he.iki.fi> <00ff01c324f7$7571cc20$f001a8c0@davidw2k> <049101c324fa$436a9bf0$812a40c1@PETEX31> Date: Wed, 28 May 2003 17:35:01 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 cc: Daniel Eischen cc: freebsd-threads@freebsd.org Subject: Re: malloc(): error: recursive call 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: Wed, 28 May 2003 09:32:33 -0000 Copyright (c) 1992-2003 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights = reserved. FreeBSD 5.1-BETA #16: Mon May 26 16:57:01 CST 2003 = davidxu@davidbsd.viasoft.com.cn:/usr/home/davidxu/src/sys/i386/compile/nw= Preloaded elf kernel "/boot/kernel/kernel" at 0xc049c000. Timecounter "i8254" frequency 1193182 Hz Timecounter "TSC" frequency 501139032 Hz CPU: Pentium II/Pentium II Xeon/Celeron (501.14-MHz 686-class CPU) Origin =3D "GenuineIntel" Id =3D 0x665 Stepping =3D 5 = Features=3D0x183f9ff real memory =3D 469696512 (447 MB) avail memory =3D 451170304 (430 MB) Pentium Pro MTRR support enabled npx0: on motherboard npx0: INT 16 interface pcibios: BIOS version 2.10 Using $PIR table, 7 entries at 0xc00fddc0 pcib0: at pcibus 0 on = motherboard pci0: on pcib0 agp0: mem = 0xd0000000-0xd3ffffff at device 0.0 on pci0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pci1: at device 0.0 (no driver attached) isab0: at device 7.0 on pci0 isa0: on isab0 atapci0: port 0xf000-0xf00f at device = 7.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata1: at 0x170 irq 15 on atapci0 uhci0: port 0xe000-0xe01f irq = 10 at device 7.2 on pci0 usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered pci0: at device 7.3 (no driver attached) rl0: port 0xe400-0xe4ff mem = 0xd9000000-0xd90000ff irq 12 at device 10.0 on pci0 rl0: Realtek 8139B detected. Warning, this may be unstable in autoselect = mode rl0: Ethernet address: 00:e0:4c:6b:dc:5e miibus0: on rl0 rlphy0: on miibus0 rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto orm0: