From owner-freebsd-threads@FreeBSD.ORG Mon May 30 11:02:08 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org 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 AE39916A41C for ; Mon, 30 May 2005 11:02:08 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F70043D53 for ; Mon, 30 May 2005 11:02:08 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j4UB28ml030161 for ; Mon, 30 May 2005 11:02:08 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j4UB270c030155 for freebsd-threads@freebsd.org; Mon, 30 May 2005 11:02:07 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 30 May 2005 11:02:07 GMT Message-Id: <200505301102.j4UB270c030155@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-threads@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2005 11:02:08 -0000 Current FreeBSD problem reports Critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2005/01/26] threads/76690threads fork hang in child for (-lc_r & -lthr) o [2005/05/11] threads/80887threads ULE with SMP broke libpthread/libthr on 5 2 problems total. Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/07/18] kern/20016 threads pthreads: Cannot set scheduling timer/Can o [2000/08/26] kern/20861 threads libc_r does not honor socket timeouts o [2001/01/20] threads/24472threads libc_r does not honor SO_SNDTIMEO/SO_RCVT o [2001/01/25] threads/24632threads libc_r delicate deviation from libc in ha o [2001/01/25] kern/24641 threads pthread_rwlock_rdlock can deadlock o [2001/11/26] bin/32295 threads pthread dont dequeue signals o [2002/02/01] threads/34536threads accept() blocks other threads o [2002/05/25] kern/38549 threads the procces compiled whith pthread stoppe o [2002/06/27] threads/39922threads [PATCH?] Threaded applications executed w o [2002/08/04] kern/41331 threads Pthread library open sets O_NONBLOCK flag o [2003/03/02] threads/48856threads Setting SIGCHLD to SIG_IGN still leaves z o [2003/03/10] threads/49087threads Signals lost in programs linked with libc o [2003/05/08] threads/51949threads thread in accept cannot be cancelled s [2004/03/15] kern/64313 threads FreeBSD (OpenBSD) pthread implicit set/un o [2004/08/26] threads/70975threads unexpected and unreliable behaviour when o [2004/09/14] threads/71725threads Mysql Crashes frequently giving Sock Erro o [2004/10/05] threads/72353threads Assertion fails in /usr/src/lib/libpthrea o [2004/10/07] threads/72429threads threads blocked in stdio (fgets, etc) are o [2004/10/21] threads/72953threads fork() unblocks blocked signals w/o PTHRE o [2004/12/19] threads/75273threads FBSD 5.3 libpthread (KSE) bug o [2004/12/21] threads/75374threads pthread_kill() ignores SA_SIGINFO flag o [2005/01/26] threads/76694threads fork cause hang in dup()/close() function o [2005/03/10] threads/78660threads Java hangs unkillably in STOP state after o [2005/04/08] threads/79683threads svctcp_create() fails if multiple threads o [2005/04/28] threads/80435threads panic on high loads o [2005/05/19] threads/81258threads Thread specific data is sometimes assigne 26 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/05/26] kern/18824 threads gethostbyname is not thread safe o [2000/06/13] kern/19247 threads uthread_sigaction.c does not do anything o [2000/10/21] kern/22190 threads A threaded read(2) from a socketpair(2) f o [2001/09/09] threads/30464threads pthread mutex attributes -- pshared o [2002/05/02] threads/37676threads libc_r: msgsnd(), msgrcv(), pread(), pwri s [2002/07/16] threads/40671threads pthread_cancel doesn't remove thread from o [2004/07/13] threads/69020threads pthreads library leaks _gc_mutex o [2004/09/21] threads/71966threads Mlnet Core Dumped : Fatal error '_pq_inse o [2004/11/21] threads/74180threads KSE problem. Applications those riched ma o [2005/01/20] threads/76513threads libpthread is not working o [2005/04/13] threads/79887threads [patch] freopen() isn't thread-safe o [2005/05/13] threads/80992threads abort() sometimes not caught by gdb depen o [2005/05/26] threads/81534threads [PATCH] libc_r close() will fail on any f 13 problems total. From owner-freebsd-threads@FreeBSD.ORG Wed Jun 1 02:57:48 2005 Return-Path: X-Original-To: threads@freebsd.org 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 C496416A41C; Wed, 1 Jun 2005 02:57:48 +0000 (GMT) (envelope-from anupamc@cs.rice.edu) Received: from cs.rice.edu (cs.rice.edu [128.42.1.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 84CD743D53; Wed, 1 Jun 2005 02:57:48 +0000 (GMT) (envelope-from anupamc@cs.rice.edu) Received: from localhost (calypso.cs.rice.edu [128.42.1.127]) by cs.rice.edu (Postfix) with ESMTP id D301E4A9AD; Tue, 31 May 2005 21:57:47 -0500 (CDT) Received: from cs.rice.edu ([128.42.1.30]) by localhost (calypso.cs.rice.edu [128.42.1.127]) (amavisd-new, port 10024) with LMTP id 05413-01-30; Tue, 31 May 2005 21:57:47 -0500 (CDT) Received: from frosty.cs.rice.edu (frosty.cs.rice.edu [128.42.1.20]) by cs.rice.edu (Postfix) with ESMTP id C5D9D4A9A2; Tue, 31 May 2005 21:57:46 -0500 (CDT) Received: from localhost (anupamc@localhost) by frosty.cs.rice.edu (8.9.3+Sun/8.9.0) with ESMTP id VAA06322; Tue, 31 May 2005 21:57:21 -0500 (CDT) X-Authentication-Warning: frosty.cs.rice.edu: anupamc owned process doing -bs Date: Tue, 31 May 2005 21:57:20 -0500 (CDT) From: Anupam Chanda To: threads@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavis-2.2.1 at cs.rice.edu Cc: alc@freebsd.org, Alan Cox Subject: ITIMERs & pthreads X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2005 02:57:48 -0000 Hello, My platform is FreeBSD 5.4-PRERELEASE. I am trying to use itimers with programs using pthreads which use the scheduler activation based libpthread. Thought ITIMER_REAL/SIGALRM works fine, ITIMER_VIRTUAL/SIGVTALRM and ITIMER_PROF/SIGPROF are not being delivered to the process. The problem seems to be in the following function in kern/kern_clock.c which ignores itimers for scheduler activation-enabled processes. (I have annotated this line with /*********/). Can you please provide a fix to this problem. Thanks, Anupam void hardclock_process(frame) register struct clockframe *frame; { struct pstats *pstats; struct thread *td = curthread; struct proc *p = td->td_proc; /* * Run current process's virtual and profile time, as needed. */ mtx_lock_spin_flags(&sched_lock, MTX_QUIET); if (p->p_flag & P_SA) { /* XXXKSE What to do? */ /******************************************************************/ } else { pstats = p->p_stats; if (CLKF_USERMODE(frame) && timevalisset(&pstats->p_timer[ITIMER_VIRTUAL].it_value) && itimerdecr(&pstats->p_timer[ITIMER_VIRTUAL], tick) == 0) { p->p_sflag |= PS_ALRMPEND; td->td_flags |= TDF_ASTPENDING; } if (timevalisset(&pstats->p_timer[ITIMER_PROF].it_value) && itimerdecr(&pstats->p_timer[ITIMER_PROF], tick) == 0) { p->p_sflag |= PS_PROFPEND; td->td_flags |= TDF_ASTPENDING; } } mtx_unlock_spin_flags(&sched_lock, MTX_QUIET); } From owner-freebsd-threads@FreeBSD.ORG Fri Jun 3 10:15:42 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org 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 3472516A41C for ; Fri, 3 Jun 2005 10:15:42 +0000 (GMT) (envelope-from ant@emict.com) Received: from mail.emict.com (brig.emict.com [212.90.172.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0664643D48 for ; Fri, 3 Jun 2005 10:15:35 +0000 (GMT) (envelope-from ant@emict.com) Received: from [10.0.0.232] (unknown [10.0.0.232]) by mail.emict.com (Postfix) with ESMTP id 3DE951241D for ; Fri, 3 Jun 2005 13:15:05 +0300 (EEST) From: Andriy Tkachuk Organization: eMICT To: freebsd-threads@freebsd.org Date: Fri, 3 Jun 2005 13:15:04 +0300 User-Agent: KMail/1.8 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200506031315.04920.ant@emict.com> Subject: pthreaded program killed by sigsegv from time to time under load X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2005 10:15:42 -0000 hi folks. what can be the reason of $subj ? is the problem with libpthread or with my prog? thanks. > gdb client client.core GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd"... warning: exec file is newer than core file. Core was generated by `client'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/libpthread.so.1...done. Loaded symbols for /usr/lib/libpthread.so.1 Reading symbols from /usr/lib/libstdc++.so.4...done. Loaded symbols for /usr/lib/libstdc++.so.4 Reading symbols from /lib/libm.so.3...done. Loaded symbols for /lib/libm.so.3 Reading symbols from /lib/libc.so.5...done. Loaded symbols for /lib/libc.so.5 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x280ac31b in pthread_testcancel () from /usr/lib/libpthread.so.1 (gdb) bt #0 0x280ac31b in pthread_testcancel () from /usr/lib/libpthread.so.1 #1 0x280a4902 in pthread_mutexattr_init () from /usr/lib/libpthread.so.1 #2 0x00000000 in ?? () (gdb) > uname -a FreeBSD ant 5.4-RELEASE-p1 FreeBSD 5.4-RELEASE-p1 #3: Wed May 18 09:08:16 EEST 2005 ant@ant:/lin/fbsd_obj/usr/src/sys/ANT i386 From owner-freebsd-threads@FreeBSD.ORG Fri Jun 3 10:50:18 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org 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 F180F16A41C for ; Fri, 3 Jun 2005 10:50:17 +0000 (GMT) (envelope-from marcolz@stack.nl) Received: from mailhost.stack.nl (vaak.stack.nl [131.155.140.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id A179143D48 for ; Fri, 3 Jun 2005 10:50:17 +0000 (GMT) (envelope-from marcolz@stack.nl) Received: from hammer.stack.nl (hammer.stack.nl [IPv6:2001:610:1108:5010::153]) by mailhost.stack.nl (Postfix) with ESMTP id 263CF1F0B3; Fri, 3 Jun 2005 12:50:16 +0200 (CEST) Received: by hammer.stack.nl (Postfix, from userid 333) id 037C86384; Fri, 3 Jun 2005 12:50:15 +0200 (CEST) Date: Fri, 3 Jun 2005 12:50:15 +0200 From: Marc Olzheim To: Andriy Tkachuk Message-ID: <20050603105015.GA62248@stack.nl> References: <200506031315.04920.ant@emict.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FCuugMFkClbJLl1L" Content-Disposition: inline In-Reply-To: <200506031315.04920.ant@emict.com> X-Operating-System: FreeBSD hammer.stack.nl 5.4-STABLE FreeBSD 5.4-STABLE X-URL: http://www.stack.nl/~marcolz/ User-Agent: Mutt/1.5.9i Cc: freebsd-threads@freebsd.org Subject: Re: pthreaded program killed by sigsegv from time to time under load X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2005 10:50:18 -0000 --FCuugMFkClbJLl1L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jun 03, 2005 at 01:15:04PM +0300, Andriy Tkachuk wrote: [snip] > #0 0x280ac31b in pthread_testcancel () from /usr/lib/libpthread.so.1 > (gdb) bt > #0 0x280ac31b in pthread_testcancel () from /usr/lib/libpthread.so.1 > #1 0x280a4902 in pthread_mutexattr_init () from /usr/lib/libpthread.so.1 > #2 0x00000000 in ?? () > (gdb) > uname -a > FreeBSD ant 5.4-RELEASE-p1 FreeBSD 5.4-RELEASE-p1 #3: Wed May 18 09:08:16 EEST 2005 ant@ant:/lin/fbsd_obj/usr/src/sys/ANT i386 Perhaps an "info threads" could shed some light on the situation... Marc --FCuugMFkClbJLl1L Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFCoDXnezjnobFOgrERAtpdAKCJ4lnq6Go6bBdE8p//HIwDyogg7wCdEaTI 6HjPKlND8f5Fbr47P/7wHhc= =zfkE -----END PGP SIGNATURE----- --FCuugMFkClbJLl1L-- From owner-freebsd-threads@FreeBSD.ORG Fri Jun 3 16:29:08 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org 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 559B816A41C for ; Fri, 3 Jun 2005 16:29:08 +0000 (GMT) (envelope-from ant@emict.com) Received: from mail.emict.com (brig.emict.com [212.90.172.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id AFA7B43D1D for ; Fri, 3 Jun 2005 16:29:07 +0000 (GMT) (envelope-from ant@emict.com) Received: from [10.0.0.232] (unknown [10.0.0.232]) by mail.emict.com (Postfix) with ESMTP id E843F2756D for ; Fri, 3 Jun 2005 19:29:05 +0300 (EEST) From: Andriy Tkachuk Organization: eMICT To: freebsd-threads@freebsd.org Date: Fri, 3 Jun 2005 19:29:05 +0300 User-Agent: KMail/1.8 References: <200506031315.04920.ant@emict.com> In-Reply-To: <200506031315.04920.ant@emict.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200506031929.05576.ant@emict.com> Subject: Re: pthreaded program killed by sigsegv from time to time under load X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2005 16:29:08 -0000 the same program linked with -lthr killed from the start: > gdb client client.core GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd"... Core was generated by `client'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/libthr.so.1...done. Loaded symbols for /usr/lib/libthr.so.1 Reading symbols from /usr/lib/libstdc++.so.4...done. Loaded symbols for /usr/lib/libstdc++.so.4 Reading symbols from /lib/libm.so.3...done. Loaded symbols for /lib/libm.so.3 Reading symbols from /lib/libc.so.5...done. Loaded symbols for /lib/libc.so.5 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x282439ff in flockfile () from /lib/libc.so.5 (gdb) bt #0 0x282439ff in flockfile () from /lib/libc.so.5 #1 0x282258fb in fgets () from /lib/libc.so.5 #2 0x28220c66 in gethostent () from /lib/libc.so.5 #3 0x28220e95 in _ht_gethostbyname () from /lib/libc.so.5 #4 0x28220809 in nsdispatch () from /lib/libc.so.5 #5 0x2821fcf5 in gethostbyname2 () from /lib/libc.so.5 #6 0x2821fca3 in gethostbyname () from /lib/libc.so.5 #7 0x0804d86c in client_connect (host_addr=0x8805100 "10.100.3.1", port=1604) at lib.cc:93 #8 0x0804d46c in client_thread (termc=0x8800d24) at client.cc:1685 #9 0x28097390 in _thread_start () at /usr/src/lib/libthr/thread/thr_create.c:167 #10 0x2822d253 in _ctx_start () from /lib/libc.so.5 On Friday 03 June 2005 13:15, Andriy Tkachuk wrote: > hi folks. what can be the reason of $subj ? > > is the problem with libpthread or with my prog? > > thanks. > > > gdb client client.core > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you are > welcome to change it and/or distribute copies of it under certain conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "i386-marcel-freebsd"... > > warning: exec file is newer than core file. > Core was generated by `client'. > Program terminated with signal 11, Segmentation fault. > Reading symbols from /usr/lib/libpthread.so.1...done. > Loaded symbols for /usr/lib/libpthread.so.1 > Reading symbols from /usr/lib/libstdc++.so.4...done. > Loaded symbols for /usr/lib/libstdc++.so.4 > Reading symbols from /lib/libm.so.3...done. > Loaded symbols for /lib/libm.so.3 > Reading symbols from /lib/libc.so.5...done. > Loaded symbols for /lib/libc.so.5 > Reading symbols from /libexec/ld-elf.so.1...done. > Loaded symbols for /libexec/ld-elf.so.1 > #0 0x280ac31b in pthread_testcancel () from /usr/lib/libpthread.so.1 > (gdb) bt > #0 0x280ac31b in pthread_testcancel () from /usr/lib/libpthread.so.1 > #1 0x280a4902 in pthread_mutexattr_init () from /usr/lib/libpthread.so.1 > #2 0x00000000 in ?? () > (gdb) > uname -a > FreeBSD ant 5.4-RELEASE-p1 FreeBSD 5.4-RELEASE-p1 #3: Wed May 18 09:08:16 EEST 2005 ant@ant:/lin/fbsd_obj/usr/src/sys/ANT i386 > From owner-freebsd-threads@FreeBSD.ORG Fri Jun 3 17:26:09 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org 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 DA0FA16A41F for ; Fri, 3 Jun 2005 17:26:09 +0000 (GMT) (envelope-from mezz7@cox.net) Received: from lakermmtao08.cox.net (lakermmtao08.cox.net [68.230.240.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59DA443D1D for ; Fri, 3 Jun 2005 17:26:09 +0000 (GMT) (envelope-from mezz7@cox.net) Received: from mezz.mezzweb.com ([68.103.32.140]) by lakermmtao08.cox.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050603172608.KZKT18139.lakermmtao08.cox.net@mezz.mezzweb.com>; Fri, 3 Jun 2005 13:26:08 -0400 To: "Andriy Tkachuk" References: <200506031315.04920.ant@emict.com> Message-ID: Date: Fri, 03 Jun 2005 12:27:28 -0500 From: "Jeremy Messenger" Content-Type: text/plain; format=flowed; delsp=yes; charset=us-ascii MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In-Reply-To: <200506031315.04920.ant@emict.com> User-Agent: Opera M2/8.0 (Linux, build 1095) Cc: freebsd-threads@freebsd.org Subject: Re: pthreaded program killed by sigsegv from time to time under load X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2005 17:26:10 -0000 On Fri, 03 Jun 2005 05:15:04 -0500, Andriy Tkachuk wrote: > hi folks. what can be the reason of $subj ? > > is the problem with libpthread or with my prog? See here to use 'info thread' for example: http://people.freebsd.org/~mezz/gdb/gdb-evolution.txt Cheers, Mezz > thanks. > >> gdb client client.core > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you > are > welcome to change it and/or distribute copies of it under certain > conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for > details. > This GDB was configured as "i386-marcel-freebsd"... > > warning: exec file is newer than core file. > Core was generated by `client'. > Program terminated with signal 11, Segmentation fault. > Reading symbols from /usr/lib/libpthread.so.1...done. > Loaded symbols for /usr/lib/libpthread.so.1 > Reading symbols from /usr/lib/libstdc++.so.4...done. > Loaded symbols for /usr/lib/libstdc++.so.4 > Reading symbols from /lib/libm.so.3...done. > Loaded symbols for /lib/libm.so.3 > Reading symbols from /lib/libc.so.5...done. > Loaded symbols for /lib/libc.so.5 > Reading symbols from /libexec/ld-elf.so.1...done. > Loaded symbols for /libexec/ld-elf.so.1 > #0 0x280ac31b in pthread_testcancel () from /usr/lib/libpthread.so.1 > (gdb) bt > #0 0x280ac31b in pthread_testcancel () from /usr/lib/libpthread.so.1 > #1 0x280a4902 in pthread_mutexattr_init () from /usr/lib/libpthread.so.1 > #2 0x00000000 in ?? () > (gdb) > uname -a > FreeBSD ant 5.4-RELEASE-p1 FreeBSD 5.4-RELEASE-p1 #3: Wed May 18 > 09:08:16 EEST 2005 ant@ant:/lin/fbsd_obj/usr/src/sys/ANT i386 -- mezz7@cox.net - mezz@FreeBSD.org FreeBSD GNOME Team http://www.FreeBSD.org/gnome/ - gnome@FreeBSD.org From owner-freebsd-threads@FreeBSD.ORG Sat Jun 4 13:07:04 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org 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 3B0E716A41C for ; Sat, 4 Jun 2005 13:07:04 +0000 (GMT) (envelope-from ant@emict.com) Received: from mail.emict.com (brig.emict.com [212.90.172.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id D149A43D48 for ; Sat, 4 Jun 2005 13:07:03 +0000 (GMT) (envelope-from ant@emict.com) Received: from [10.0.0.232] (unknown [10.0.0.232]) by mail.emict.com (Postfix) with ESMTP id F0206275E1; Sat, 4 Jun 2005 16:07:01 +0300 (EEST) From: Andriy Tkachuk Organization: eMICT To: freebsd-threads@freebsd.org Date: Sat, 4 Jun 2005 16:07:00 +0300 User-Agent: KMail/1.8 References: <200506031315.04920.ant@emict.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-u" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200506041607.00513.ant@emict.com> Cc: Subject: Re: pthreaded program killed by sigsegv from time to time under load X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jun 2005 13:07:04 -0000 ok, using info threads i found: 128 Thread 128 (runnable) 0x08055b82 in pack (buf=0x2826b498, fmt=0xdff2
) at etip.c:618 then: (gdb) thread 128 [Switching to thread 128 (Thread 128 (runnable))]#0 0x08055b82 in pack (buf=0x2826b498, fmt=0xdff2
) at etip.c:618 618 for (p = fmt; *p != '\0'; p++) { (gdb) bt #0 0x08055b82 in pack (buf=0x2826b498, fmt=0xdff2
) at etip.c:618 #1 0x281f97dc in ldexp () from /lib/libc.so.5 #2 0x00000000 in ?? () (gdb) bt full #0 0x08055b82 in pack (buf=0x2826b498, fmt=0xdff2
) at etip.c:618 bp = (uchar *) 0x28265b0c "HJ\f" s = 48698 args = 0x28265b0c "HJ\f" p = 0x8e312c0 "ÀvÎ\b@" l = 0 #1 0x281f97dc in ldexp () from /lib/libc.so.5 No symbol table info available. #2 0x00000000 in ?? () No symbol table info available. i use pack function this way only in my program: int pack(void *buf, const char *fmt, ...); pack(buf_0 + 8, "sc", term_code, oper_code); i.e. second argument is format specifyer like fmt in printf. Actually this is the function from book of Kernighan & Pike Practice of Programming. I just checked all the code - everywhere threre are static strings. btw. how to get the real backtrace? It is imposiible that this function is called from ldexp() thank you.