From owner-freebsd-threads@FreeBSD.ORG Sun Jun 29 02:32: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 6388837B401; Sun, 29 Jun 2003 02:32:47 -0700 (PDT) Received: from pandora.cs.kun.nl (pandora.cs.kun.nl [131.174.33.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id F03E344001; Sun, 29 Jun 2003 02:32:45 -0700 (PDT) (envelope-from adridg@cs.kun.nl) Received: from localhost by pandora.cs.kun.nl via odin.cs.kun.nl [131.174.33.33] with ESMTP id h5T9WSTd017967 (8.12.9/3.58); Sun, 29 Jun 2003 11:32:33 +0200 (MET DST) From: Adriaan de Groot To: David Xu , "David Xu" , "Arjan van Leeuwen" , Date: Sun, 29 Jun 2003 11:19:15 +0200 User-Agent: KMail/1.5 References: <200306282137.36740.avleeuwen@piwebs.com> <000d01c33dd1$80363040$0701a8c0@tiger> In-Reply-To: <000d01c33dd1$80363040$0701a8c0@tiger> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200306291119.15839.adridg@cs.kun.nl> cc: kde@freebsd.org Subject: Re: [kde-freebsd] Re: libkse & konsole 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: Sun, 29 Jun 2003 09:32:47 -0000 On Sunday 29 June 2003 02:00, David Xu wrote: > Anyone if has interest to dig it out, here is the kconsole problem code: > > http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdebase/konsole/konsole/TEPty.cpp? > Look into memember function makePty(bool _addutmp) of class TEPty, > there are some abort() calls, I think one of them is triggered. This is code I dive into occasionally. Last time I checked, something was returning a 0 pointer that _can't_ return a 0 under Linux, and hence crashing later. Of course, I neither remember exactly where it was nor what the patch was - it might be in the archives of kde@. -- pub 1024D/FEA2A3FE 2002-06-18 Adriaan de Groot Key fingerprint = 934E 31AA 80A7 723F 54F9 50ED 76AC EE01 FEA2 A3FE From owner-freebsd-threads@FreeBSD.ORG Sun Jun 29 07:49: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 81E1D37B401 for ; Sun, 29 Jun 2003 07:49:04 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id B7C444401E for ; Sun, 29 Jun 2003 07:49:03 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h5TEn0Xh008613; Sun, 29 Jun 2003 10:49:02 -0400 (EDT) Date: Sun, 29 Jun 2003 10:49:00 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Petri Helenius In-Reply-To: <001501c33d5c$2ba7ab00$f8d5473e@PETEX31> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: rtprio and kse X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2003 14:49:04 -0000 On Sat, 28 Jun 2003, Petri Helenius wrote: > > How does kse and rtprio interact? If a thread calls to set realtime priority > does that set the priority for all threads, just the threads that happen > to be scheduled on that kse or just the thread that made the call? The rtprio() call affects the KSEG in which the thread runs. So it is the KSEG that has the realtime priority, and all threads that run in that KSEG will be affected. This doesn't affect other KSEGs, so if you are creating system scope threads (each has their own KSEG and KSE), they will only be affected if you call rtprio() from their threads. -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Sun Jun 29 08:02:14 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 D60E637B401 for ; Sun, 29 Jun 2003 08:02:14 -0700 (PDT) Received: from thuis.piwebs.com (217-19-20-186.dsl.cambrium.nl [217.19.20.186]) by mx1.FreeBSD.org (Postfix) with SMTP id 3DB4E4400F for ; Sun, 29 Jun 2003 08:02:12 -0700 (PDT) (envelope-from avleeuwen@piwebs.com) Received: (qmail 18804 invoked by uid 85); 29 Jun 2003 15:02:18 -0000 Received: from avleeuwen@piwebs.com by thuis.piwebs.com by uid 82 with qmail-scanner-1.15 (uvscan: v4.1.60/v4210. spamassassin: 2.x. Clear:SA:0(-4.3/5.0):. Processed in 11.06236 secs); 29 Jun 2003 15:02:18 -0000 X-Spam-Status: No, hits=-4.3 required=5.0 Received: from unknown (HELO 192.168.0.109) (192.168.0.109) by 0 with SMTP; 29 Jun 2003 15:02:06 -0000 From: Arjan van Leeuwen To: "David Xu" , "David Xu" , Date: Sun, 29 Jun 2003 17:01:59 +0200 User-Agent: KMail/1.5.2 References: <200306282137.36740.avleeuwen@piwebs.com> <000d01c33dd1$80363040$0701a8c0@tiger> In-Reply-To: <000d01c33dd1$80363040$0701a8c0@tiger> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200306291701.59204.avleeuwen@piwebs.com> cc: kde@freebsd.org Subject: Re: libkse & konsole 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: Sun, 29 Jun 2003 15:02:15 -0000 if (! (str_ptr=ttyname(tt)) ) { str_ptr = ttynam; abort(); } This is where it is aborting. I'm not sure where to go from here. Apparently, Konsole has difficulty chowning and chmodding the /dev/ttypx that it wants to use. Arjan On Sunday 29 June 2003 02:00, David Xu wrote: > Anyone if has interest to dig it out, here is the kconsole problem code: > > http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdebase/konsole/konsole/TEPty.cpp? >rev=1.69&content-type=text/x-cvsweb-markup > > Look into memember function makePty(bool _addutmp) of class TEPty, > there are some abort() calls, I think one of them is triggered. > Unfortunatly, unlike other KDE codes, it does not print debug message > in X11 startup text console. > > BTW, kconsole is working as same as before I commited the new signal code. > On my machine, 50% crashes, 50% works. > > David Xu > > ----- Original Message ----- > From: "Arjan van Leeuwen" > To: > Cc: > Sent: Sunday, June 29, 2003 3:37 AM > Subject: libkse & konsole > > > Hi, > > > > With the newest libkse library (mapped via libmap.conf) I can not start > > KDE's terminal emulator Konsole anymore. > > > > Until recently, it was possible to start Konsole with libkse, although it > > would crash about 50% of the time (it always worked fine when it was > > started though). > > > > Now, it crashes 100% of the time. I'm not able to use it anymore. Is > > there any information I can provide that might help to solve this > > problem? > > > > Best regards, > > > > Arjan > > > > _______________________________________________ > > freebsd-threads@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > > To unsubscribe, send any mail to > > "freebsd-threads-unsubscribe@freebsd.org" From owner-freebsd-threads@FreeBSD.ORG Sun Jun 29 08:14:08 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 2D41137B401; Sun, 29 Jun 2003 08:14:08 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DE8743F85; Sun, 29 Jun 2003 08:14:07 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h5TFE6Xh011604; Sun, 29 Jun 2003 11:14:06 -0400 (EDT) Date: Sun, 29 Jun 2003 11:14:06 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Arjan van Leeuwen In-Reply-To: <200306291701.59204.avleeuwen@piwebs.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org cc: kde@freebsd.org cc: David Xu Subject: Re: libkse & konsole X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2003 15:14:08 -0000 On Sun, 29 Jun 2003, Arjan van Leeuwen wrote: > if (! (str_ptr=ttyname(tt)) ) { > str_ptr = ttynam; > abort(); > } > > This is where it is aborting. I'm not sure where to go from here. Apparently, > Konsole has difficulty chowning and chmodding the /dev/ttypx that it wants to > use. Can you debug the open(), chown(), and chmod() of the tty to see what happens (any errors?). Also, I think konsole forks(). There may be something we're (libkse) not doing to properly handle a fork from a multi-threaded process (or something konsole expects that isn't necessarily true). Can you run konsole so it doesn't fork? -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Sun Jun 29 10:32:58 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 67A6637B401; Sun, 29 Jun 2003 10:32:58 -0700 (PDT) Received: from mx8.mail.ru (mx8.mail.ru [194.67.23.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6496B43FBF; Sun, 29 Jun 2003 10:32:57 -0700 (PDT) (envelope-from kabaev@mail.ru) Received: from [151.203.201.219] (port=50073 helo=kan.dnsalias.net) by mx8.mail.ru with esmtp id 19Wg2p-000K3C-00; Sun, 29 Jun 2003 21:32:55 +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 h5THWpca002588; Sun, 29 Jun 2003 13:32:51 -0400 (EDT) (envelope-from kan@kan.dnsalias.net) Received: (from kan@localhost) by kan.dnsalias.net (8.12.9/8.12.9/Submit) id h5THWoLW002587; Sun, 29 Jun 2003 13:32:50 -0400 (EDT) Date: Sun, 29 Jun 2003 13:32:50 -0400 From: Alexander Kabaev To: deischen@freebsd.org Message-Id: <20030629133250.27346449.kabaev@mail.ru> In-Reply-To: References: <200306291701.59204.avleeuwen@piwebs.com> X-Mailer: Sylpheed version 0.9.0claws50 (GTK+ 1.2.10; i386-portbld-freebsd5.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam: Not detected cc: threads@freebsd.org cc: David Xu cc: kde@freebsd.org cc: Arjan van Leeuwen Subject: Re: libkse & konsole 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: Sun, 29 Jun 2003 17:32:58 -0000 On Sun, 29 Jun 2003 11:14:06 -0400 (EDT) Daniel Eischen wrote: > On Sun, 29 Jun 2003, Arjan van Leeuwen wrote: > > > if (! (str_ptr=ttyname(tt)) ) { > > str_ptr = ttynam; > > abort(); > > } > > > > This is where it is aborting. I'm not sure where to go from here. > > Apparently, Konsole has difficulty chowning and chmodding the > > /dev/ttypx that it wants to use. > > Can you debug the open(), chown(), and chmod() of the tty > to see what happens (any errors?). Do not bother. ttyname() calls a isatty() function which in turn calls IOCGETA which in turn fails :) Just use devname there already. From owner-freebsd-threads@FreeBSD.ORG Sun Jun 29 10:46:23 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 13AAF37B401; Sun, 29 Jun 2003 10:46:23 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 271344400B; Sun, 29 Jun 2003 10:46:22 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h5THkLXh002163; Sun, 29 Jun 2003 13:46:21 -0400 (EDT) Date: Sun, 29 Jun 2003 13:46:21 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Alexander Kabaev In-Reply-To: <20030629133250.27346449.kabaev@mail.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org cc: kde@freebsd.org cc: Arjan van Leeuwen cc: David Xu Subject: Re: libkse & konsole X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2003 17:46:23 -0000 On Sun, 29 Jun 2003, Alexander Kabaev wrote: > On Sun, 29 Jun 2003 11:14:06 -0400 (EDT) > Daniel Eischen wrote: > > > On Sun, 29 Jun 2003, Arjan van Leeuwen wrote: > > > > > if (! (str_ptr=ttyname(tt)) ) { > > > str_ptr = ttynam; > > > abort(); > > > } > > > > > > This is where it is aborting. I'm not sure where to go from here. > > > Apparently, Konsole has difficulty chowning and chmodding the > > > /dev/ttypx that it wants to use. > > > > Can you debug the open(), chown(), and chmod() of the tty > > to see what happens (any errors?). > > Do not bother. ttyname() calls a isatty() function which in turn calls > IOCGETA which in turn fails :) Any idea as to why IOCGETA fails? > Just use devname there already. Any idea as to why it aborts under libkse and not under libc_r? -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Sun Jun 29 15:40:34 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 6F43937B401; Sun, 29 Jun 2003 15:40:34 -0700 (PDT) Received: from silver.he.iki.fi (silver.he.iki.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 397B744020; Sun, 29 Jun 2003 15:40:33 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from PETEX31 (gprs-prointernet-3e47d544.mobile.inet.fi [62.71.213.68]) by silver.he.iki.fi (8.12.9/8.11.4) with SMTP id h5TMeGsL031751; Mon, 30 Jun 2003 01:40:21 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <005001c33e8f$6d90d6c0$44d5473e@PETEX31> From: "Petri Helenius" To: References: Date: Mon, 30 Jun 2003 00:40:08 +0200 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: rtprio and kse 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: Sun, 29 Jun 2003 22:40:34 -0000 > > The rtprio() call affects the KSEG in which the thread runs. > So it is the KSEG that has the realtime priority, and all > threads that run in that KSEG will be affected. This doesn't > affect other KSEGs, so if you are creating system scope > threads (each has their own KSEG and KSE), they will only > be affected if you call rtprio() from their threads. > So if I interpret this correctly, to achieve the "expected" result, one should link with -lthr, not -lkse? Expected result being priorities apply only to threads which call for it. Does -lthr have any (known) issues with spinlocks like linuxthreads has, where a thread with rtprio going into a spinlock might monopolize the CPU and the other thread never gets a quantum to actually release the lock? Pete From owner-freebsd-threads@FreeBSD.ORG Sun Jun 29 17:22:24 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 59F7C37B401 for ; Sun, 29 Jun 2003 17:22:24 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9EA7144014 for ; Sun, 29 Jun 2003 17:22:23 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h5U0MMAI002599; Sun, 29 Jun 2003 20:22:22 -0400 (EDT) Date: Sun, 29 Jun 2003 20:22:22 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Petri Helenius In-Reply-To: <005001c33e8f$6d90d6c0$44d5473e@PETEX31> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: rtprio and kse X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2003 00:22:24 -0000 On Mon, 30 Jun 2003, Petri Helenius wrote: > > The rtprio() call affects the KSEG in which the thread runs. > > So it is the KSEG that has the realtime priority, and all > > threads that run in that KSEG will be affected. This doesn't > > affect other KSEGs, so if you are creating system scope > > threads (each has their own KSEG and KSE), they will only > > be affected if you call rtprio() from their threads. > > > So if I interpret this correctly, to achieve the "expected" result, What is the expected result? I expect the expected result to be exactly the way that libkse works. If you were to do the same thing in Solaris (pthreads), it would behave just like libkse works: it affects the LWP, not the thread, so any threads running in the LWP would benefit from the priority change. > one should link with -lthr, not -lkse? Expected result being > priorities apply only to threads which call for it. If you want (real-time) priority to apply only to the thread that calls it, then create those threads as scope system threads. > Does -lthr have any (known) issues with spinlocks like linuxthreads has, where > a thread with rtprio going into a spinlock might monopolize the CPU > and the other thread never gets a quantum to actually release the lock? Libpthread(^Wlibkse) has no such problems with mixing KSEs with different kernel priorities. -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Sun Jun 29 19:32: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 6527737B401; Sun, 29 Jun 2003 19:32:53 -0700 (PDT) Received: from mail.chesapeake.net (chesapeake.net [208.142.252.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FE9A44008; Sun, 29 Jun 2003 19:32:49 -0700 (PDT) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost) by mail.chesapeake.net (8.11.6/8.11.6) with ESMTP id h5U2Wgl33084; Sun, 29 Jun 2003 22:32:42 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Date: Sun, 29 Jun 2003 22:32:42 -0400 (EDT) From: Jeff Roberson To: Petri Helenius In-Reply-To: <005001c33e8f$6d90d6c0$44d5473e@PETEX31> Message-ID: <20030629223142.W17881-100000@mail.chesapeake.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: deischen@freebsd.org cc: freebsd-threads@freebsd.org Subject: Re: rtprio and kse 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: Mon, 30 Jun 2003 02:32:53 -0000 On Mon, 30 Jun 2003, Petri Helenius wrote: > > > > The rtprio() call affects the KSEG in which the thread runs. > > So it is the KSEG that has the realtime priority, and all > > threads that run in that KSEG will be affected. This doesn't > > affect other KSEGs, so if you are creating system scope > > threads (each has their own KSEG and KSE), they will only > > be affected if you call rtprio() from their threads. > > > So if I interpret this correctly, to achieve the "expected" result, > one should link with -lthr, not -lkse? Expected result being > priorities apply only to threads which call for it. > > Does -lthr have any (known) issues with spinlocks like linuxthreads has, where > a thread with rtprio going into a spinlock might monopolize the CPU > and the other thread never gets a quantum to actually release the lock? > If you mean spinlock_t, no, there are no issues with that. There is a race condition that sometimes leads to deadlocked threads if you use the pthread mutex. I expect that to be tracked down and fixed soon. Cheers, Jeff From owner-freebsd-threads@FreeBSD.ORG Sun Jun 29 20:01:08 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 3026237B401 for ; Sun, 29 Jun 2003 20:01:08 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A1DD4400E for ; Sun, 29 Jun 2003 20:01:07 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from athlon.pn.xcllnt.net (athlon.pn.xcllnt.net [192.168.4.3]) by ns1.xcllnt.net (8.12.9/8.12.9) with ESMTP id h5U317DZ052198 for ; Sun, 29 Jun 2003 20:01:07 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from athlon.pn.xcllnt.net (localhost [127.0.0.1]) by athlon.pn.xcllnt.net (8.12.9/8.12.9) with ESMTP id h5U316a9001418 for ; Sun, 29 Jun 2003 20:01:06 -0700 (PDT) (envelope-from marcel@athlon.pn.xcllnt.net) Received: (from marcel@localhost) by athlon.pn.xcllnt.net (8.12.9/8.12.9/Submit) id h5U316Ja001417 for threads@FreeBSD.org; Sun, 29 Jun 2003 20:01:06 -0700 (PDT) (envelope-from marcel) Date: Sun, 29 Jun 2003 20:01:06 -0700 From: Marcel Moolenaar To: threads@FreeBSD.org Message-ID: <20030630030106.GA1345@athlon.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.4i Subject: Regression in libthr on ia64 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: Mon, 30 Jun 2003 03:01:08 -0000 Gang, I have a small threaded program that I normally use for basic testing. Nothing fancy. The source can be found here: http://www.xcllnt.net/~marcel/t.c This simple program does not work anymore with libthr. This is what I get: itanium% ./thr cpu0: boot and that's as far as it goes. ps(1) shows: 4293 d0 SL+ 0:00.01 ./thr 4293 d0 SL+ 0:00.01 ./thr 4293 d0 SL+ 0:00.01 ./thr 4293 d0 SL+ 0:00.01 ./thr 4293 d0 SL+ 0:00.01 ./thr 4293 d0 SL+ 0:00.01 ./thr and top gives me: 4293 marcel 20 0 5048K 1856K pause 0:00 0.78% 0.78% thr 4293 marcel 20 0 5048K 1856K pause 0:00 0.00% 0.00% thr 4293 marcel 20 0 5048K 1856K pause 0:00 0.00% 0.00% thr 4293 marcel 20 0 5048K 1856K pause 0:00 0.00% 0.00% thr 4293 marcel 20 0 5048K 1856K pause 0:00 0.00% 0.00% thr 4293 marcel 20 0 5048K 1856K pause 0:00 0.00% 0.00% thr I can kill the program with ^C. If I link staticly, I have more action: itanium% ./thr cpu2: boot cpu3: boot cpu3: data at 0x600000000001a080 cpu3: data at 0x600000000001a080 cpu_dtor: ptr=0x600000000001a080 cpu0: boot cpu0: data at 0x600000000001a080 cpu0: data at 0x600000000001a080 cpu_dtor: ptr=0x600000000001a080 cpu1: boot cpu2: data at 0x600000000001a080 cpu2: data at 0x600000000001a080 cpu_dtor: ptr=0x600000000001a080 But still it hangs. ps(1) and top(1) show: 4827 d0 SL+ 0:00.01 ./thr 4827 d0 SL+ 0:00.01 ./thr 4827 d0 SL+ 0:00.01 ./thr 4827 marcel 20 0 2864K 504K pause 0:00 0.00% 0.00% thr 4827 marcel 20 0 2864K 504K pause 0:00 0.00% 0.00% thr 4827 marcel 20 0 2864K 504K pause 0:00 0.00% 0.00% thr It doesn't matter if I compile with -DWITH_SLEEP or not. Is this a known issue? Is there some work in progress still? -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-threads@FreeBSD.ORG Sun Jun 29 20:51:37 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 B338D37B401 for ; Sun, 29 Jun 2003 20:51:37 -0700 (PDT) Received: from pop015.verizon.net (pop015pub.verizon.net [206.46.170.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id C291043FCB for ; Sun, 29 Jun 2003 20:51:36 -0700 (PDT) (envelope-from mtm@identd.net) Received: from kokeb.ambesa.net ([138.88.32.7]) by pop015.verizon.net (InterMail vM.5.01.05.33 201-253-122-126-133-20030313) with ESMTP id <20030630035135.WEWF20810.pop015.verizon.net@kokeb.ambesa.net>; Sun, 29 Jun 2003 22:51:35 -0500 Date: Sun, 29 Jun 2003 23:51:34 -0400 From: Mike Makonnen To: Marcel Moolenaar In-Reply-To: <20030630030106.GA1345@athlon.pn.xcllnt.net> References: <20030630030106.GA1345@athlon.pn.xcllnt.net> 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 [138.88.32.7] at Sun, 29 Jun 2003 22:51:35 -0500 Message-Id: <20030630035135.WEWF20810.pop015.verizon.net@kokeb.ambesa.net> cc: threads@freebsd.org Subject: Re: Regression in libthr on ia64 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: Mon, 30 Jun 2003 03:51:38 -0000 On Sun, 29 Jun 2003 20:01:06 -0700 Marcel Moolenaar wrote: > It doesn't matter if I compile with -DWITH_SLEEP or not. > > Is this a known issue? Is there some work in progress still? > 2nd question first: yes, there is still more work to be done, but committed bits should be self-contained and not break anything. Did you update both your kernel and libthr together? when? There was a window of opportunity (several hours) yesterday where the interface to sigtimedwait was changed but libthr was not. Also, is it possible to narrow down the time frame during which it broke? It seems strange; however, that a statically linked executable would behave differently. 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 Sun Jun 29 21:07:57 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 94A5C37B401 for ; Sun, 29 Jun 2003 21:07:57 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 902D24400B for ; Sun, 29 Jun 2003 21:07:56 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from athlon.pn.xcllnt.net (athlon.pn.xcllnt.net [192.168.4.3]) by ns1.xcllnt.net (8.12.9/8.12.9) with ESMTP id h5U47uDZ052449; Sun, 29 Jun 2003 21:07:56 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from athlon.pn.xcllnt.net (localhost [127.0.0.1]) by athlon.pn.xcllnt.net (8.12.9/8.12.9) with ESMTP id h5U47u7V006044; Sun, 29 Jun 2003 21:07:56 -0700 (PDT) (envelope-from marcel@athlon.pn.xcllnt.net) Received: (from marcel@localhost) by athlon.pn.xcllnt.net (8.12.9/8.12.9/Submit) id h5U47qKf006043; Sun, 29 Jun 2003 21:07:52 -0700 (PDT) (envelope-from marcel) Date: Sun, 29 Jun 2003 21:07:51 -0700 From: Marcel Moolenaar To: Mike Makonnen Message-ID: <20030630040751.GA5993@athlon.pn.xcllnt.net> References: <20030630030106.GA1345@athlon.pn.xcllnt.net> <20030630035135.WEWF20810.pop015.verizon.net@kokeb.ambesa.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030630035135.WEWF20810.pop015.verizon.net@kokeb.ambesa.net> User-Agent: Mutt/1.5.4i cc: threads@freebsd.org Subject: Re: Regression in libthr on ia64 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: Mon, 30 Jun 2003 04:07:57 -0000 On Sun, Jun 29, 2003 at 11:51:34PM -0400, Mike Makonnen wrote: > On Sun, 29 Jun 2003 20:01:06 -0700 > Marcel Moolenaar wrote: > > > It doesn't matter if I compile with -DWITH_SLEEP or not. > > > > Is this a known issue? Is there some work in progress still? > > > > 2nd question first: yes, there is still more work to be done, but committed bits > should be self-contained and not break anything. Ok. > Did you update both your kernel and libthr together? when? Yes, yesterday. I manually updated both libkse and libthr after some new commits (without seeing any related kernel commits). I'm rebuilding the kernel just to be sure. i386 has the same problem and libkse causes a nice coredump: This GDB was configured as "i386-undermydesk-freebsd"... panic: page fault panic messages: --- Fatal trap 12: page fault while in kernel mode fault virtual address = 0x0 fault code = supervisor write, page not present instruction pointer = 0x8:0xc0237f0e stack pointer = 0x10:0xd2235a90 frame pointer = 0x10:0xd2235a9c code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 548 (gnome-terminal) trap number = 12 panic: page fault syncing disks, buffers remaining... 2227 2227 2226 2226 2226 2226 2226 2226 2226 2226 2226 2226 2226 2226 2226 2226 2226 2226 2226 2226 2226 2226 giving up on 1240 buffers Uptime: 4h22m59s Dumping 255 MB ata0: resetting devices .. done [CTRL-C to abort] 16 32 48 64 80[CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] 96 112 128 144 160 176 192 208 224 240 --- Reading symbols from /usr/obj/nfs/freebsd/5.x/src/sys/ATHLON/modules/nfs/freebsd/5.x/src/sys/modules/linux/linux.ko.debug...done. Loaded symbols for /usr/obj/nfs/freebsd/5.x/src/sys/ATHLON/modules/nfs/freebsd/5.x/src/sys/modules/linux/linux.ko.debug #0 doadump () at /nfs/freebsd/5.x/src/sys/kern/kern_shutdown.c:240 240 dumping++; (kgdb) bt #0 doadump () at /nfs/freebsd/5.x/src/sys/kern/kern_shutdown.c:240 #1 0xc023149d in boot (howto=256) at /nfs/freebsd/5.x/src/sys/kern/kern_shutdown.c:372 #2 0xc0231859 in panic () at /nfs/freebsd/5.x/src/sys/kern/kern_shutdown.c:550 #3 0xc037a012 in trap_fatal (frame=0xd2235a50, eva=0) at /nfs/freebsd/5.x/src/sys/i386/i386/trap.c:836 #4 0xc03795d3 in trap (frame= {tf_fs = 24, tf_es = 16, tf_ds = 16, tf_edi = -1033618160, tf_esi = -1033632128, tf_ebp = -769434980, tf_isp = -769435012, tf_ebx = -1030172480, tf_edx = 0, tf_ecx = -1031741888, tf_eax = 0, tf_trapno = 12, tf_err = 2, tf_eip = -1071415538, tf_cs = 8, tf_eflags = 66118, tf_esp = -1058233696, tf_ss = 0}) at /nfs/freebsd/5.x/src/sys/i386/i386/trap.c:256 #5 0xc036a0b8 in calltrap () at {standard input}:96 #6 0xc0239aff in mi_switch () at /nfs/freebsd/5.x/src/sys/kern/kern_synch.c:524 #7 0xc020bcf4 in cv_switch_catch (td=0xc2643d10) at /nfs/freebsd/5.x/src/sys/kern/kern_condvar.c:123 #8 0xc020b409 in cv_timedwait_sig (cvp=0x0, mp=0xc0428680, timo=0) at /nfs/freebsd/5.x/src/sys/kern/kern_condvar.c:433 #9 0xc0259647 in poll (td=0xc2643d10, uap=0xd2235d10) at /nfs/freebsd/5.x/src/sys/kern/sys_generic.c:1027 #10 0xc037a33a in syscall (frame= {tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = 681148880, tf_esi = 0, tf_ebp = 134852520, tf_isp = -769434252, tf_ebx = 681149764, tf_edx = 12, tf_ecx = 12, tf_eax = 209, tf_trapno = 22, tf_err = 2, tf_eip = 683943555, tf_cs = 31, tf_eflags = 514, tf_esp = 134852428, tf_ss = 47}) at /nfs/freebsd/5.x/src/sys/i386/i386/trap.c:1023 #11 0xc036a10d in Xint0x80_syscall () at {standard input}:138 ---Can't read userspace from dump, or kernel process--- Notice frame #8... > There was a window of opportunity (several hours) yesterday where the interface > to sigtimedwait was changed but libthr was not. I kept close track of that. The library I used is guaranteed the latest. Rebuilt today, with no new commits. Kernel has been built after the signal changes, with no significant commits not included. > Also, is it possible to narrow down the time frame during which it broke? I'll try. I'm not sure I have the time. I first have to tie a couple of loose ends... -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-threads@FreeBSD.ORG Sun Jun 29 21:21:39 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 3ABDA37B401 for ; Sun, 29 Jun 2003 21:21:39 -0700 (PDT) Received: from out002.verizon.net (out002pub.verizon.net [206.46.170.141]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3453A43F85 for ; Sun, 29 Jun 2003 21:21:38 -0700 (PDT) (envelope-from mtm@identd.net) Received: from kokeb.ambesa.net ([138.88.32.7]) by out002.verizon.net (InterMail vM.5.01.05.33 201-253-122-126-133-20030313) with ESMTP id <20030630042137.XLFW13328.out002.verizon.net@kokeb.ambesa.net>; Sun, 29 Jun 2003 23:21:37 -0500 Date: Mon, 30 Jun 2003 00:21:36 -0400 From: Mike Makonnen To: Marcel Moolenaar In-Reply-To: <20030630040751.GA5993@athlon.pn.xcllnt.net> References: <20030630030106.GA1345@athlon.pn.xcllnt.net> <20030630035135.WEWF20810.pop015.verizon.net@kokeb.ambesa.net> <20030630040751.GA5993@athlon.pn.xcllnt.net> 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 out002.verizon.net from [138.88.32.7] at Sun, 29 Jun 2003 23:21:37 -0500 Message-Id: <20030630042137.XLFW13328.out002.verizon.net@kokeb.ambesa.net> cc: threads@freebsd.org Subject: Re: Regression in libthr on ia64 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: Mon, 30 Jun 2003 04:21:39 -0000 On Sun, 29 Jun 2003 21:07:51 -0700 Marcel Moolenaar wrote: > > > There was a window of opportunity (several hours) yesterday where the > > interface to sigtimedwait was changed but libthr was not. > > I kept close track of that. The library I used is guaranteed the > latest. Rebuilt today, with no new commits. Kernel has been built > after the signal changes, with no significant commits not included. > I should have added: libthr tries to play nice with old kernels that have the broken sigtimedwait semantics. But, it relies on the FreeBSD version, which was not changed with the kernel changes, but rather with the libthr changes. Your kernel must be either before the kernel sigtimedwait changes OR after the libthr changes but not inbetween. in pseudo math: :-) kernel < kernel sigtimedwait changes OR kernel > libthr changes 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 Sun Jun 29 21:43: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 4977437B401 for ; Sun, 29 Jun 2003 21:43:48 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F5C94400B for ; Sun, 29 Jun 2003 21:43:47 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from athlon.pn.xcllnt.net (athlon.pn.xcllnt.net [192.168.4.3]) by ns1.xcllnt.net (8.12.9/8.12.9) with ESMTP id h5U4hkDZ052591; Sun, 29 Jun 2003 21:43:47 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from athlon.pn.xcllnt.net (localhost [127.0.0.1]) by athlon.pn.xcllnt.net (8.12.9/8.12.9) with ESMTP id h5U4hk7V016389; Sun, 29 Jun 2003 21:43:46 -0700 (PDT) (envelope-from marcel@athlon.pn.xcllnt.net) Received: (from marcel@localhost) by athlon.pn.xcllnt.net (8.12.9/8.12.9/Submit) id h5U4hkM9016388; Sun, 29 Jun 2003 21:43:46 -0700 (PDT) (envelope-from marcel) Date: Sun, 29 Jun 2003 21:43:46 -0700 From: Marcel Moolenaar To: Mike Makonnen Message-ID: <20030630044346.GA15162@athlon.pn.xcllnt.net> References: <20030630030106.GA1345@athlon.pn.xcllnt.net> <20030630035135.WEWF20810.pop015.verizon.net@kokeb.ambesa.net> <20030630040751.GA5993@athlon.pn.xcllnt.net> <20030630042137.XLFW13328.out002.verizon.net@kokeb.ambesa.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030630042137.XLFW13328.out002.verizon.net@kokeb.ambesa.net> User-Agent: Mutt/1.5.4i cc: threads@freebsd.org Subject: Re: Regression in libthr on ia64 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: Mon, 30 Jun 2003 04:43:48 -0000 On Mon, Jun 30, 2003 at 12:21:36AM -0400, Mike Makonnen wrote: > in pseudo math: :-) > kernel < kernel sigtimedwait changes OR kernel > libthr changes Very possible. That's one of the loose ends I need to tie. I'm rebuilding everything. The i386 on which I had the coredump may also not be as up-to-date as other machines, or differently out of sync if you like. In short: don't worry about it. If I continue to see this, I'll post a follow-up. But it appears that chances of that happening are slim. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-threads@FreeBSD.ORG Sun Jun 29 21:45: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 6DB0637B428 for ; Sun, 29 Jun 2003 21:45:30 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C82E44027 for ; Sun, 29 Jun 2003 21:45:27 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h5U4jQAI010388; Mon, 30 Jun 2003 00:45:26 -0400 (EDT) Date: Mon, 30 Jun 2003 00:45:26 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Marcel Moolenaar In-Reply-To: <20030630040751.GA5993@athlon.pn.xcllnt.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org Subject: Re: Regression in libthr on ia64 X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2003 04:45:30 -0000 On Sun, 29 Jun 2003, Marcel Moolenaar wrote: > On Sun, Jun 29, 2003 at 11:51:34PM -0400, Mike Makonnen wrote: > > On Sun, 29 Jun 2003 20:01:06 -0700 > > Marcel Moolenaar wrote: > > > > > It doesn't matter if I compile with -DWITH_SLEEP or not. > > > > > > Is this a known issue? Is there some work in progress still? > > > > > > > 2nd question first: yes, there is still more work to be done, but committed bits > > should be self-contained and not break anything. > > Ok. > > > Did you update both your kernel and libthr together? when? > > Yes, yesterday. I manually updated both libkse and libthr after some > new commits (without seeing any related kernel commits). I'm rebuilding > the kernel just to be sure. > > i386 has the same problem and libkse causes a nice coredump: I assume not with your test program; t.c works just fine with libkse for me. > (kgdb) bt > #0 doadump () at /nfs/freebsd/5.x/src/sys/kern/kern_shutdown.c:240 > #1 0xc023149d in boot (howto=256) > at /nfs/freebsd/5.x/src/sys/kern/kern_shutdown.c:372 > #2 0xc0231859 in panic () at /nfs/freebsd/5.x/src/sys/kern/kern_shutdown.c:550 > #3 0xc037a012 in trap_fatal (frame=0xd2235a50, eva=0) > at /nfs/freebsd/5.x/src/sys/i386/i386/trap.c:836 > #4 0xc03795d3 in trap (frame= > {tf_fs = 24, tf_es = 16, tf_ds = 16, tf_edi = -1033618160, tf_esi = -1033632128, tf_ebp = -769434980, tf_isp = -769435012, tf_ebx = -1030172480, tf_edx = 0, tf_ecx = -1031741888, tf_eax = 0, tf_trapno = 12, tf_err = 2, tf_eip = -1071415538, tf_cs = 8, tf_eflags = 66118, tf_esp = -1058233696, tf_ss = 0}) > at /nfs/freebsd/5.x/src/sys/i386/i386/trap.c:256 > #5 0xc036a0b8 in calltrap () at {standard input}:96 > #6 0xc0239aff in mi_switch () > at /nfs/freebsd/5.x/src/sys/kern/kern_synch.c:524 > #7 0xc020bcf4 in cv_switch_catch (td=0xc2643d10) > at /nfs/freebsd/5.x/src/sys/kern/kern_condvar.c:123 > #8 0xc020b409 in cv_timedwait_sig (cvp=0x0, mp=0xc0428680, timo=0) > at /nfs/freebsd/5.x/src/sys/kern/kern_condvar.c:433 > #9 0xc0259647 in poll (td=0xc2643d10, uap=0xd2235d10) > at /nfs/freebsd/5.x/src/sys/kern/sys_generic.c:1027 > #10 0xc037a33a in syscall (frame= > {tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = 681148880, tf_esi = 0, tf_ebp = 134852520, tf_isp = -769434252, tf_ebx = 681149764, tf_edx = 12, tf_ecx = 12, tf_eax = 209, tf_trapno = 22, tf_err = 2, tf_eip = 683943555, tf_cs = 31, tf_eflags = 514, tf_esp = 134852428, tf_ss = 47}) > at /nfs/freebsd/5.x/src/sys/i386/i386/trap.c:1023 > #11 0xc036a10d in Xint0x80_syscall () at {standard input}:138 > ---Can't read userspace from dump, or kernel process--- > > Notice frame #8... Hmm, something sure seems to be borken in the kernel. I haven't seen this yet, but I'm using kde not gnome. -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Sun Jun 29 23:24:05 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 E9B7137B401; Sun, 29 Jun 2003 23:24:05 -0700 (PDT) Received: from InterJet.elischer.org (12-233-125-100.client.attbi.com [12.233.125.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id B735443F85; Sun, 29 Jun 2003 23:24:04 -0700 (PDT) (envelope-from julian@elischer.org) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id XAA45856; Sun, 29 Jun 2003 23:23:59 -0700 (PDT) Date: Sun, 29 Jun 2003 23:23:58 -0700 (PDT) From: Julian Elischer To: Petri Helenius In-Reply-To: <005001c33e8f$6d90d6c0$44d5473e@PETEX31> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: deischen@freebsd.org cc: freebsd-threads@freebsd.org Subject: Re: rtprio and kse 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: Mon, 30 Jun 2003 06:24:06 -0000 On Mon, 30 Jun 2003, Petri Helenius wrote: > > > > The rtprio() call affects the KSEG in which the thread runs. > > So it is the KSEG that has the realtime priority, and all > > threads that run in that KSEG will be affected. This doesn't > > affect other KSEGs, so if you are creating system scope > > threads (each has their own KSEG and KSE), they will only > > be affected if you call rtprio() from their threads. > > > So if I interpret this correctly, to achieve the "expected" result, > one should link with -lthr, not -lkse? Expected result being > priorities apply only to threads which call for it. yes and no.. That's only YOUR expectation.. if your thread is a "scope-process" thread then you cannot expect your thread to go to rt priority without effecting the priority of the rest of the group it is a part of. That's what the process-scope part means... The thread's priority is only relevant within teh process as a whole and doesn;t effect it's priority vs other processes. Your thread is only scheduled within the scope of the process it is a part of. if the process is not at rt priority, then the thread cannot really be.. If your thread is "system scope" then each thread can have an independent priority from the system's point of view. If you link with libthr you are specifying that all threads are "scope system" threads. in libkse you get a choice of which you want. So to answer your original point.. if you want "scope system" threads and a system-wide scheduling priority then you need to ask for that.. but.. that;s expeceted. Note.. asking for a new thread to be "scope system" is something that I leave to Dan to tell you about :-) > > Does -lthr have any (known) issues with spinlocks like linuxthreads has, where > a thread with rtprio going into a spinlock might monopolize the CPU > and the other thread never gets a quantum to actually release the lock? probably. it's a programmer error to do that.. > > Pete > > _______________________________________________ > freebsd-threads@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > To unsubscribe, send any mail to "freebsd-threads-unsubscribe@freebsd.org" > From owner-freebsd-threads@FreeBSD.ORG Sun Jun 29 23:34:03 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 AD5B937B401; Sun, 29 Jun 2003 23:34:03 -0700 (PDT) Received: from InterJet.elischer.org (12-233-125-100.client.attbi.com [12.233.125.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D15943FAF; Sun, 29 Jun 2003 23:34:03 -0700 (PDT) (envelope-from julian@elischer.org) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id XAA45932; Sun, 29 Jun 2003 23:33:57 -0700 (PDT) Date: Sun, 29 Jun 2003 23:33:57 -0700 (PDT) From: Julian Elischer To: Jeff Roberson In-Reply-To: <20030629223142.W17881-100000@mail.chesapeake.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: deischen@freebsd.org cc: freebsd-threads@freebsd.org Subject: Re: rtprio and kse 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: Mon, 30 Jun 2003 06:34:04 -0000 On Sun, 29 Jun 2003, Jeff Roberson wrote: > On Mon, 30 Jun 2003, Petri Helenius wrote: > > > > > > > The rtprio() call affects the KSEG in which the thread runs. > > > So it is the KSEG that has the realtime priority, and all > > > threads that run in that KSEG will be affected. This doesn't > > > affect other KSEGs, so if you are creating system scope > > > threads (each has their own KSEG and KSE), they will only > > > be affected if you call rtprio() from their threads. > > > > > So if I interpret this correctly, to achieve the "expected" result, > > one should link with -lthr, not -lkse? Expected result being > > priorities apply only to threads which call for it. > > > > Does -lthr have any (known) issues with spinlocks like linuxthreads has, where > > a thread with rtprio going into a spinlock might monopolize the CPU > > and the other thread never gets a quantum to actually release the lock? > > > > If you mean spinlock_t, no, there are no issues with that. There is a > race condition that sometimes leads to deadlocked threads if you use the > pthread mutex. I expect that to be tracked down and fixed soon. Theoretically any process with rt priority can monopolise the CPU if it spins, regardless of whether it's threaded or not.. Is not that what having RT-priority means? > > Cheers, > Jeff > > _______________________________________________ > freebsd-threads@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > To unsubscribe, send any mail to "freebsd-threads-unsubscribe@freebsd.org" > From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 06:30:14 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 A8A9637B401 for ; Mon, 30 Jun 2003 06:30:14 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id BDDEB43FB1 for ; Mon, 30 Jun 2003 06:30:13 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h5UDU4AI024040; Mon, 30 Jun 2003 09:30:05 -0400 (EDT) Date: Mon, 30 Jun 2003 09:30:04 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Julian Elischer In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: rtprio and kse X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2003 13:30:15 -0000 On Sun, 29 Jun 2003, Julian Elischer wrote: > On Mon, 30 Jun 2003, Petri Helenius wrote: > > > The rtprio() call affects the KSEG in which the thread runs. > > > So it is the KSEG that has the realtime priority, and all > > > threads that run in that KSEG will be affected. This doesn't > > > affect other KSEGs, so if you are creating system scope > > > threads (each has their own KSEG and KSE), they will only > > > be affected if you call rtprio() from their threads. > > > > > So if I interpret this correctly, to achieve the "expected" result, > > one should link with -lthr, not -lkse? Expected result being > > priorities apply only to threads which call for it. > > yes and no.. > That's only YOUR expectation.. > > if your thread is a "scope-process" thread then you cannot expect your > thread to go to rt priority without effecting the priority of the rest > of the group it is a part of. That's what the process-scope part > means... The thread's priority is only relevant within teh process as a > whole and doesn;t effect it's priority vs other processes. > > Your thread is only scheduled within the scope of the process it is a > part of. if the process is not at rt priority, then the thread cannot > really be.. If your thread is "system scope" then each thread can have > an independent priority from the system's point of view. > > If you link with libthr you are specifying that all threads are "scope > system" threads. in libkse you get a choice of which you want. Actually, doesn't libthr create new KSE's within the same KSEG? Perhaps this has changed, but unless libthr creates new KSEGs then all threads would be affected by kernel priority changes. > So to answer your original point.. > if you want "scope system" threads and a system-wide scheduling priority > then you need to ask for that.. but.. that;s expeceted. > Note.. asking for a new thread to be "scope system" is something that > I leave to Dan to tell you about :-) > > > > > Does -lthr have any (known) issues with spinlocks like linuxthreads has, where > > a thread with rtprio going into a spinlock might monopolize the CPU > > and the other thread never gets a quantum to actually release the lock? > > probably. it's a programmer error to do that.. This is the implementation he's talking about. Use of true spinlocks can cause a deadlock. Libpthread doesn't use spinlocks so it doesn't have this problem. There may be problems with the kernel's use of spinlocks though... -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 06:37:51 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 1895A37B401 for ; Mon, 30 Jun 2003 06:37:51 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7791B43FBF for ; Mon, 30 Jun 2003 06:37:50 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h5UDbnAI025243; Mon, 30 Jun 2003 09:37:49 -0400 (EDT) Date: Mon, 30 Jun 2003 09:37:49 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: xiong jinshan In-Reply-To: <20030630080920.82179.qmail@web80504.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org Subject: Re: About the kse signal process X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2003 13:37:51 -0000 On Mon, 30 Jun 2003, xiong jinshan wrote: > Hi, > I am wondering that the following piece of code > can't work with the unix semantics. I tested it with > 5.1 release and i386 arch. By unix sementics, if I > send the SIGALRM to this running programme, it should > be received by the thr_func() only, and print a prompt > msg on the console. Yes, only thr_func() should receive the alarm. > > Reguards, > JinShan > > Ps: c code: > > /* vi: set ts=4 sw=4 expandtab: */ > #include > #include > #include > > void sigalrm_handler(int signo) > { > if(signo != SIGALRM) > abort(); > > printf("Received sig alarm!\n"); > return; > } > > void thr_func(void) > { > sigset_t mask; > struct sigaction sa; > > sigemptyset(&mask); > sigaddset(&mask, SIGALRM); > pthread_sigmask(SIG_UNBLOCK, &mask, NULL); > > memset(&sa, 0, sizeof(struct sigaction)); > sa.sa_handler = sigalrm_handler; > sigaction(SIGALRM, &sa, NULL); > > while(1); > } > > main() > { > int err; > pthread_t pth; > sigset_t mask; > > sigfillset(&mask); > sigprocmask(SIG_BLOCK, &mask, NULL); > > err = pthread_create(&pth, NULL, thr_func, NULL); > if(err < 0) { > perror("pthread_create!\n"); > return -1; > } > > while(1); -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 07:22: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 4F9AB37B401; Mon, 30 Jun 2003 07:22:32 -0700 (PDT) Received: from silver.he.iki.fi (silver.he.iki.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA5DD43FEA; Mon, 30 Jun 2003 07:22:30 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from PETEX31 (gprs-prointernet-3e47d64c.mobile.inet.fi [62.71.214.76]) by silver.he.iki.fi (8.12.9/8.11.4) with SMTP id h5UEM2sL037724; Mon, 30 Jun 2003 17:22:08 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <019601c33f13$015daa30$44d5473e@PETEX31> From: "Petri Helenius" To: "Julian Elischer" , "Jeff Roberson" References: Date: Mon, 30 Jun 2003 11:22:03 +0200 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: deischen@freebsd.org cc: freebsd-threads@freebsd.org Subject: Re: rtprio and kse 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: Mon, 30 Jun 2003 14:22:32 -0000 > > Theoretically any process with rt priority can monopolise the CPU if it > spins, regardless of whether it's threaded or not.. > > Is not that what having RT-priority means? Yes, but in non-threaded environment with multiple processes competing for CPU libc is not expected to have locks. In threaded environment it does have them around things like malloc. My concern is the realtime thread spinlocking waiting for a lock which is held somewhere which does not get scheduled. These locks are not visible to the appliation and thus one must either put additional mutexes around them or know that libc stuff is rtprio-thread-safe. Pete From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 07:59: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 2159D37B401 for ; Mon, 30 Jun 2003 07:59:53 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74E5A43FBF for ; Mon, 30 Jun 2003 07:59:52 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h5UExjAI007853; Mon, 30 Jun 2003 10:59:45 -0400 (EDT) Date: Mon, 30 Jun 2003 10:59:45 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Petri Helenius In-Reply-To: <019601c33f13$015daa30$44d5473e@PETEX31> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Julian Elischer cc: freebsd-threads@freebsd.org Subject: Re: rtprio and kse X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2003 14:59:53 -0000 On Mon, 30 Jun 2003, Petri Helenius wrote: > > > > Theoretically any process with rt priority can monopolise the CPU if it > > spins, regardless of whether it's threaded or not.. > > > > Is not that what having RT-priority means? > > Yes, but in non-threaded environment with multiple processes > competing for CPU libc is not expected to have locks. In threaded > environment it does have them around things like malloc. My concern > is the realtime thread spinlocking waiting for a lock which is held > somewhere which does not get scheduled. These locks are not > visible to the appliation and thus one must either put additional > mutexes around them or know that libc stuff is rtprio-thread-safe. Libpthread silently converts libc spinlocks into non-spinning locks; there should be no deadlock or starvation issues in userland. I don't know if libthr ans any issues with spinlocks or not. -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 08:20:43 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 CFE3737B401; Mon, 30 Jun 2003 08:20:43 -0700 (PDT) Received: from silver.he.iki.fi (silver.he.iki.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9EB3143F3F; Mon, 30 Jun 2003 08:20:42 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from PETEX31 (gprs-prointernet-3e47d679.mobile.inet.fi [62.71.214.121]) by silver.he.iki.fi (8.12.9/8.11.4) with SMTP id h5UFKMsL038131; Mon, 30 Jun 2003 18:20:26 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <024c01c33f1b$24bb08d0$44d5473e@PETEX31> From: "Petri Helenius" To: References: Date: Mon, 30 Jun 2003 17:20:14 +0200 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: Julian Elischer cc: freebsd-threads@freebsd.org Subject: Re: rtprio and kse 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: Mon, 30 Jun 2003 15:20:44 -0000 > Libpthread silently converts libc spinlocks into non-spinning > locks; there should be no deadlock or starvation issues in > userland. I don't know if libthr ans any issues with spinlocks > or not. > > Dan Eischen > Sounds like I have to take the dive first and if I ends up being too shallow, ask questions later :-) Thanks, Pete From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 08:46: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 C176737B401 for ; Mon, 30 Jun 2003 08:46:19 -0700 (PDT) Received: from web80511.mail.yahoo.com (web80511.mail.yahoo.com [66.218.79.81]) by mx1.FreeBSD.org (Postfix) with SMTP id 0F96F43FDF for ; Mon, 30 Jun 2003 08:46:19 -0700 (PDT) (envelope-from xiongjinshan@yahoo.com) Message-ID: <20030630154618.93274.qmail@web80511.mail.yahoo.com> Received: from [211.144.73.27] by web80511.mail.yahoo.com via HTTP; Mon, 30 Jun 2003 08:46:18 PDT Date: Mon, 30 Jun 2003 08:46:18 -0700 (PDT) From: xiong jinshan To: deischen@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: threads@freebsd.org Subject: Re: About the kse signal process 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: Mon, 30 Jun 2003 15:46:20 -0000 --- Daniel Eischen wrote: > On Mon, 30 Jun 2003, xiong jinshan wrote: > > > Hi, > > I am wondering that the following piece of code > > can't work with the unix semantics. I tested it > with > > 5.1 release and i386 arch. By unix sementics, if I > > send the SIGALRM to this running programme, it > should > > be received by the thr_func() only, and print a > prompt > > msg on the console. > > Yes, only thr_func() should receive the alarm. This is the issue. Nothing printed on the console when I sent the signal SIGALRM, it meant that none of the thread received this signal. > > > > > Reguards, > > JinShan > > > > Ps: c code: > > > > /* vi: set ts=4 sw=4 expandtab: */ > > #include > > #include > > #include > > > > void sigalrm_handler(int signo) > > { > > if(signo != SIGALRM) > > abort(); > > > > printf("Received sig alarm!\n"); > > return; > > } > > > > void thr_func(void) > > { > > sigset_t mask; > > struct sigaction sa; > > > > sigemptyset(&mask); > > sigaddset(&mask, SIGALRM); > > pthread_sigmask(SIG_UNBLOCK, &mask, NULL); > > > > memset(&sa, 0, sizeof(struct sigaction)); > > sa.sa_handler = sigalrm_handler; > > sigaction(SIGALRM, &sa, NULL); > > > > while(1); > > } > > > > main() > > { > > int err; > > pthread_t pth; > > sigset_t mask; > > > > sigfillset(&mask); > > sigprocmask(SIG_BLOCK, &mask, NULL); > > > > err = pthread_create(&pth, NULL, thr_func, > NULL); > > if(err < 0) { > > perror("pthread_create!\n"); > > return -1; > > } > > > > while(1); > > -- > Dan Eischen > __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 09:17: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 8ECEB37B401 for ; Mon, 30 Jun 2003 09:17:38 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id CEE1343F93 for ; Mon, 30 Jun 2003 09:17:37 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h5UGHbAI020457; Mon, 30 Jun 2003 12:17:37 -0400 (EDT) Date: Mon, 30 Jun 2003 12:17:37 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: xiong jinshan In-Reply-To: <20030630154618.93274.qmail@web80511.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org Subject: Re: About the kse signal process X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2003 16:17:38 -0000 On Mon, 30 Jun 2003, xiong jinshan wrote: > --- Daniel Eischen wrote: > > On Mon, 30 Jun 2003, xiong jinshan wrote: > > > > > Hi, > > > I am wondering that the following piece of code > > > can't work with the unix semantics. I tested it > > with > > > 5.1 release and i386 arch. By unix sementics, if I > > > send the SIGALRM to this running programme, it > > should > > > be received by the thr_func() only, and print a > > prompt > > > msg on the console. > > > > Yes, only thr_func() should receive the alarm. > This is the issue. Nothing printed on the console when > I sent the signal SIGALRM, it meant that none of the > thread received this signal. It works for me with both libc_r and libkse. This is from a very recent -current. I can't test under 5.1-release. There have been some changes lately with regard to signals in -current and libkse. I don't know about libc_r... -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 10:35: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 4DB2737B404; Mon, 30 Jun 2003 10:35:48 -0700 (PDT) Received: from stork.mail.pas.earthlink.net (stork.mail.pas.earthlink.net [207.217.120.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id B758743F75; Mon, 30 Jun 2003 10:35:47 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-38lc133.dialup.mindspring.com ([209.86.4.99] helo=mindspring.com) by stork.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19X2Z6-0007RL-00; Mon, 30 Jun 2003 10:35:45 -0700 Message-ID: <3F0074A9.FE998647@mindspring.com> Date: Mon, 30 Jun 2003 10:34:33 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: deischen@freebsd.org References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a44a9f80b2947c8cbe4900e333fdd75c08666fa475841a1c7a350badd9bab72f9c350badd9bab72f9c cc: freebsd-threads@freebsd.org Subject: Re: rtprio and kse 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: Mon, 30 Jun 2003 17:35:48 -0000 Daniel Eischen wrote: > On Mon, 30 Jun 2003, Petri Helenius wrote: > > So if I interpret this correctly, to achieve the "expected" result, > > What is the expected result? I expect the expected result > to be exactly the way that libkse works. If you were to > do the same thing in Solaris (pthreads), it would behave > just like libkse works: it affects the LWP, not the thread, > so any threads running in the LWP would benefit from > the priority change. I'd expect the creation of a seperate KSEG, so that only the thread that made the request gets the priority boost. -- Terry From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 12:53:20 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 5F4FE37B404; Mon, 30 Jun 2003 12:53:20 -0700 (PDT) Received: from out006.verizon.net (out006pub.verizon.net [206.46.170.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 49C7443FF2; Mon, 30 Jun 2003 12:53:19 -0700 (PDT) (envelope-from mtm@identd.net) Received: from kokeb.ambesa.net ([138.88.17.186]) by out006.verizon.net (InterMail vM.5.01.05.33 201-253-122-126-133-20030313) with ESMTP id <20030630195318.CHOB16647.out006.verizon.net@kokeb.ambesa.net>; Mon, 30 Jun 2003 14:53:18 -0500 Date: Mon, 30 Jun 2003 15:53:17 -0400 From: Mike Makonnen To: deischen@freebsd.org In-Reply-To: References: <019601c33f13$015daa30$44d5473e@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 out006.verizon.net from [138.88.17.186] at Mon, 30 Jun 2003 14:53:17 -0500 Message-Id: <20030630195318.CHOB16647.out006.verizon.net@kokeb.ambesa.net> cc: julian@elischer.org cc: freebsd-threads@freebsd.org Subject: Re: rtprio and kse 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: Mon, 30 Jun 2003 19:53:20 -0000 On Mon, 30 Jun 2003 10:59:45 -0400 (EDT) Daniel Eischen wrote: > > Libpthread silently converts libc spinlocks into non-spinning > locks; there should be no deadlock or starvation issues in > userland. I don't know if libthr ans any issues with spinlocks > or not. None that I can think of. All locks are non-spinning in libthr. -- 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 Mon Jun 30 13:03:41 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 B4AAC37B401 for ; Mon, 30 Jun 2003 13:03:41 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 170CE43F85 for ; Mon, 30 Jun 2003 13:03:39 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h5UK3cAI029080; Mon, 30 Jun 2003 16:03:38 -0400 (EDT) Date: Mon, 30 Jun 2003 16:03:38 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Terry Lambert In-Reply-To: <3F0074A9.FE998647@mindspring.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: rtprio and kse X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2003 20:03:42 -0000 On Mon, 30 Jun 2003, Terry Lambert wrote: > Daniel Eischen wrote: > > On Mon, 30 Jun 2003, Petri Helenius wrote: > > > So if I interpret this correctly, to achieve the "expected" result, > > > > What is the expected result? I expect the expected result > > to be exactly the way that libkse works. If you were to > > do the same thing in Solaris (pthreads), it would behave > > just like libkse works: it affects the LWP, not the thread, > > so any threads running in the LWP would benefit from > > the priority change. > > I'd expect the creation of a seperate KSEG, so that only the thread > that made the request gets the priority boost. Obviously you're expectations are not correct :-) Aside from breaking POSIX (a scope process thread being silently converted to a scope system thread), rtprio() is a system call and affects the kernel priority. -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 15:12:23 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 4DB8A37B401; Mon, 30 Jun 2003 15:12:23 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 990CD43FF3; Mon, 30 Jun 2003 15:12:20 -0700 (PDT) (envelope-from davidxu@freebsd.org) Received: from tiger (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with SMTP id h5UMCGUp011408; Mon, 30 Jun 2003 15:12:18 -0700 (PDT) (envelope-from davidxu@freebsd.org) Message-ID: <002501c33f55$1ed32530$0701a8c0@tiger> From: "David Xu" To: , "Terry Lambert" References: Date: Tue, 1 Jul 2003 06:15:28 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 cc: freebsd-threads@freebsd.org Subject: Re: rtprio and kse X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: David Xu List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2003 22:12:23 -0000 ----- Original Message -----=20 From: "Daniel Eischen" To: "Terry Lambert" Cc: Sent: Tuesday, July 01, 2003 4:03 AM Subject: Re: rtprio and kse > On Mon, 30 Jun 2003, Terry Lambert wrote: > > Daniel Eischen wrote: > > > On Mon, 30 Jun 2003, Petri Helenius wrote: > > > > So if I interpret this correctly, to achieve the "expected" = result, > > >=20 > > > What is the expected result? I expect the expected result > > > to be exactly the way that libkse works. If you were to > > > do the same thing in Solaris (pthreads), it would behave > > > just like libkse works: it affects the LWP, not the thread, > > > so any threads running in the LWP would benefit from > > > the priority change. > >=20 > > I'd expect the creation of a seperate KSEG, so that only the thread > > that made the request gets the priority boost. >=20 > Obviously you're expectations are not correct :-) Aside from > breaking POSIX (a scope process thread being silently converted > to a scope system thread), rtprio() is a system call and > affects the kernel priority. > rtprio means he want to exclusively use CPU, not only between threads in process but also between threads in system, I can not image a guy is stilling using PTHREAD_SCOPE_PROCESS but not PTHREAD_SCOPE_SYSTEM to define a competition scope in process but not system wide, if he want to be rtprio in a process but not system scope, I think he'd use pthread_setprio(), otherwise setting thread to PTHREAD_SCOPE_SYSTEM is necessary. > --=20 > Dan Eischen >=20 > _______________________________________________ > freebsd-threads@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > To unsubscribe, send any mail to = "freebsd-threads-unsubscribe@freebsd.org" > From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 15:21:57 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 097C437B401 for ; Mon, 30 Jun 2003 15:21:57 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B6F143FD7 for ; Mon, 30 Jun 2003 15:21:56 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h5UMLtAI021763; Mon, 30 Jun 2003 18:21:55 -0400 (EDT) Date: Mon, 30 Jun 2003 18:21:55 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: David Xu In-Reply-To: <002501c33f55$1ed32530$0701a8c0@tiger> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: rtprio and kse X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2003 22:21:57 -0000 On Tue, 1 Jul 2003, David Xu wrote: > From: "Daniel Eischen" > > > > Obviously you're expectations are not correct :-) Aside from > > breaking POSIX (a scope process thread being silently converted > > to a scope system thread), rtprio() is a system call and > > affects the kernel priority. > > > > rtprio means he want to exclusively use CPU, not only between > threads in process but also between threads in system, I can > not image a guy is stilling using PTHREAD_SCOPE_PROCESS but not > PTHREAD_SCOPE_SYSTEM to define a competition scope in process > but not system wide, if he want to be rtprio in a process but > not system scope, I think he'd use pthread_setprio(), otherwise > setting thread to PTHREAD_SCOPE_SYSTEM is necessary. It is legitimate to want a single (or set) of threads to have real-time priority and not the others. Since the priority is in the KSEG, this is possible to do without fork()ing. -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 15:23:07 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 05FE237B407; Mon, 30 Jun 2003 15:23:07 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7120F43FB1; Mon, 30 Jun 2003 15:23:06 -0700 (PDT) (envelope-from davidxu@freebsd.org) Received: from tiger (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with SMTP id h5UMN3Up012000; Mon, 30 Jun 2003 15:23:04 -0700 (PDT) (envelope-from davidxu@freebsd.org) Message-ID: <000701c33f56$9fc98f70$0701a8c0@tiger> From: "David Xu" To: "xiong jinshan" , References: <20030630154618.93274.qmail@web80511.mail.yahoo.com> Date: Tue, 1 Jul 2003 06:26:14 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 cc: threads@freebsd.org Subject: Re: About the kse signal process X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: David Xu List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2003 22:23:07 -0000 ----- Original Message -----=20 From: "xiong jinshan" To: Cc: Sent: Monday, June 30, 2003 11:46 PM Subject: Re: About the kse signal process >=20 > --- Daniel Eischen wrote: > > On Mon, 30 Jun 2003, xiong jinshan wrote: > >=20 > > > Hi, > > > I am wondering that the following piece of code > > > can't work with the unix semantics. I tested it > > with > > > 5.1 release and i386 arch. By unix sementics, if I > > > send the SIGALRM to this running programme, it > > should > > > be received by the thr_func() only, and print a > > prompt > > > msg on the console. > >=20 > > Yes, only thr_func() should receive the alarm. > This is the issue. Nothing printed on the console when > I sent the signal SIGALRM, it meant that none of the > thread received this signal. >=20 > >=20 > > >=20 > > > Reguards, > > > JinShan > > >=20 > > > Ps: c code: > > >=20 > > > /* vi: set ts=3D4 sw=3D4 expandtab: */ > > > #include > > > #include > > > #include > > >=20 > > > void sigalrm_handler(int signo) > > > { > > > if(signo !=3D SIGALRM) > > > abort(); > > >=20 > > > printf("Received sig alarm!\n"); > > > return; > > > } > > >=20 > > > void thr_func(void) > > > { > > > sigset_t mask; > > > struct sigaction sa; > > >=20 > > > sigemptyset(&mask); > > > sigaddset(&mask, SIGALRM); > > > pthread_sigmask(SIG_UNBLOCK, &mask, NULL); > > >=20 > > > memset(&sa, 0, sizeof(struct sigaction)); > > > sa.sa_handler =3D sigalrm_handler; > > > sigaction(SIGALRM, &sa, NULL); > > >=20 > > > while(1); > > > } > > >=20 > > > main() > > > { > > > int err; > > > pthread_t pth; > > > sigset_t mask; > > >=20 > > > sigfillset(&mask); > > > sigprocmask(SIG_BLOCK, &mask, NULL); > > >=20 > > > err =3D pthread_create(&pth, NULL, thr_func, > > NULL); > > > if(err < 0) { > > > perror("pthread_create!\n"); > > > return -1; > > > } > > >=20 > > > while(1); > >=20 > > --=20 > > Dan Eischen > >=20 >=20 >=20 Missing alarm() call ? From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 15:28:06 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 E9A6337B401 for ; Mon, 30 Jun 2003 15:28:06 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22BA843FAF for ; Mon, 30 Jun 2003 15:28:06 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h5UMS5AI022713; Mon, 30 Jun 2003 18:28:05 -0400 (EDT) Date: Mon, 30 Jun 2003 18:28:05 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: David Xu In-Reply-To: <000701c33f56$9fc98f70$0701a8c0@tiger> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org cc: xiong jinshan Subject: Re: About the kse signal process X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2003 22:28:07 -0000 On Tue, 1 Jul 2003, David Xu wrote: > From: "xiong jinshan" > > > > --- Daniel Eischen wrote: > > > On Mon, 30 Jun 2003, xiong jinshan wrote: > > > > > > > Hi, > > > > I am wondering that the following piece of code > > > > can't work with the unix semantics. I tested it > > > with > > > > 5.1 release and i386 arch. By unix sementics, if I > > > > send the SIGALRM to this running programme, it > > > should > > > > be received by the thr_func() only, and print a > > > prompt > > > > msg on the console. > > > > > > Yes, only thr_func() should receive the alarm. > > This is the issue. Nothing printed on the console when > > I sent the signal SIGALRM, it meant that none of the > > thread received this signal. [ ... ] > > Missing alarm() call ? I noticed that too, but I assumed he knew that. I sent the alarm with kill(1) from another shell. -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 19:03:56 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 E643C37B401 for ; Mon, 30 Jun 2003 19:03:56 -0700 (PDT) Received: from web80509.mail.yahoo.com (web80509.mail.yahoo.com [66.218.79.79]) by mx1.FreeBSD.org (Postfix) with SMTP id 42DED43FEC for ; Mon, 30 Jun 2003 19:03:54 -0700 (PDT) (envelope-from xiongjinshan@yahoo.com) Message-ID: <20030701020354.40108.qmail@web80509.mail.yahoo.com> Received: from [218.79.98.26] by web80509.mail.yahoo.com via HTTP; Mon, 30 Jun 2003 19:03:54 PDT Date: Mon, 30 Jun 2003 19:03:54 -0700 (PDT) From: xiong jinshan To: deischen@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: threads@freebsd.org Subject: Re: About the kse signal process 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, 01 Jul 2003 02:03:57 -0000 --- Daniel Eischen wrote: > On Mon, 30 Jun 2003, xiong jinshan wrote: > > --- Daniel Eischen wrote: > > > On Mon, 30 Jun 2003, xiong jinshan wrote: > > > > > > > Hi, > > > > I am wondering that the following piece of > code > > > > can't work with the unix semantics. I tested > it > > > with > > > > 5.1 release and i386 arch. By unix sementics, > if I > > > > send the SIGALRM to this running programme, it > > > should > > > > be received by the thr_func() only, and print > a > > > prompt > > > > msg on the console. > > > > > > Yes, only thr_func() should receive the alarm. > > This is the issue. Nothing printed on the console > when > > I sent the signal SIGALRM, it meant that none of > the > > thread received this signal. > > It works for me with both libc_r and libkse. This > is from > a very recent -current. I can't test under > 5.1-release. > There have been some changes lately with regard to > signals > in -current and libkse. I don't know about > libc_r... It received the SIGSEGV before the main() when I linked with libc_r;(. > > -- > Dan Eischen > __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 19:08:00 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 0595A37B401 for ; Mon, 30 Jun 2003 19:08:00 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5144C43FF5 for ; Mon, 30 Jun 2003 19:07:59 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h6127wAI026924; Mon, 30 Jun 2003 22:07:58 -0400 (EDT) Date: Mon, 30 Jun 2003 22:07:58 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: xiong jinshan In-Reply-To: <20030701020354.40108.qmail@web80509.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org Subject: Re: About the kse signal process X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2003 02:08:00 -0000 On Mon, 30 Jun 2003, xiong jinshan wrote: > It received the SIGSEGV before the main() when I > linked with libc_r;(. I think you have something screwed up somewhere. How did you compile and link it? -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 19:29:21 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 6B76C37B401 for ; Mon, 30 Jun 2003 19:29:21 -0700 (PDT) Received: from web80503.mail.yahoo.com (web80503.mail.yahoo.com [66.218.79.73]) by mx1.FreeBSD.org (Postfix) with SMTP id BAAF943F3F for ; Mon, 30 Jun 2003 19:29:20 -0700 (PDT) (envelope-from xiongjinshan@yahoo.com) Message-ID: <20030701022915.50290.qmail@web80503.mail.yahoo.com> Received: from [218.79.98.26] by web80503.mail.yahoo.com via HTTP; Mon, 30 Jun 2003 19:29:15 PDT Date: Mon, 30 Jun 2003 19:29:15 -0700 (PDT) From: xiong jinshan To: deischen@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: threads@freebsd.org Subject: Re: About the kse signal process 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, 01 Jul 2003 02:29:21 -0000 --- Daniel Eischen wrote: > On Mon, 30 Jun 2003, xiong jinshan wrote: > > It received the SIGSEGV before the main() when I > > linked with libc_r;(. > > I think you have something screwed up somewhere. > How did you compile and link it? Yes, it maybe my fault. If I link libc_r with static, it works correctly. If I link it with dynamic, segv occurs. If I not linked c_r, th_func() couldn't received the alarm. Why must it be linked with static mode? Does it mean the native c library in release 5.1 not reentrant? > > -- > Dan Eischen > __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 20: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 67B0337B401 for ; Mon, 30 Jun 2003 20:02:47 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFB9843F75 for ; Mon, 30 Jun 2003 20:02:46 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h6132jAI004906; Mon, 30 Jun 2003 23:02:45 -0400 (EDT) Date: Mon, 30 Jun 2003 23:02:45 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: xiong jinshan In-Reply-To: <20030701022915.50290.qmail@web80503.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org Subject: Re: About the kse signal process X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2003 03:02:47 -0000 On Mon, 30 Jun 2003, xiong jinshan wrote: > > --- Daniel Eischen wrote: > > On Mon, 30 Jun 2003, xiong jinshan wrote: > > > It received the SIGSEGV before the main() when I > > > linked with libc_r;(. > > > > I think you have something screwed up somewhere. > > How did you compile and link it? > > Yes, it maybe my fault. > > If I link libc_r with static, it works correctly. > If I link it with dynamic, segv occurs. > If I not linked c_r, th_func() couldn't received the > alarm. > > Why must it be linked with static mode? Does it mean > the native c library in release 5.1 not reentrant? It doesn't have to be statically linked. Are you explicitly using -lc? (don't!) In 5.x, you link threaded programs (if linking against libc_r) with: gcc -o app app.c -lc_r Or, using the deprecated -pthread option: gcc -o app -pthread app.c As I said, it works here for me on -current. It doesn't look like anything has changed in libc_r since 5.1. -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Mon Jun 30 20:33:52 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 2CB2837B405 for ; Mon, 30 Jun 2003 20:33:52 -0700 (PDT) Received: from web80502.mail.yahoo.com (web80502.mail.yahoo.com [66.218.79.72]) by mx1.FreeBSD.org (Postfix) with SMTP id 6254843FF9 for ; Mon, 30 Jun 2003 20:33:51 -0700 (PDT) (envelope-from xiongjinshan@yahoo.com) Message-ID: <20030701033351.62612.qmail@web80502.mail.yahoo.com> Received: from [218.79.98.26] by web80502.mail.yahoo.com via HTTP; Mon, 30 Jun 2003 20:33:51 PDT Date: Mon, 30 Jun 2003 20:33:51 -0700 (PDT) From: xiong jinshan To: deischen@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: threads@freebsd.org Subject: Re: About the kse signal process 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, 01 Jul 2003 03:33:52 -0000 --- Daniel Eischen wrote: > On Mon, 30 Jun 2003, xiong jinshan wrote: > > > > --- Daniel Eischen wrote: > > > On Mon, 30 Jun 2003, xiong jinshan wrote: > > > > It received the SIGSEGV before the main() when > I > > > > linked with libc_r;(. > > > > > > I think you have something screwed up somewhere. > > > How did you compile and link it? > > > > Yes, it maybe my fault. > > > > If I link libc_r with static, it works correctly. > > If I link it with dynamic, segv occurs. > > If I not linked c_r, th_func() couldn't received > the > > alarm. > > > > Why must it be linked with static mode? Does it > mean > > the native c library in release 5.1 not reentrant? > > It doesn't have to be statically linked. Are you > explicitly using -lc? (don't!) In 5.x, you link > threaded programs (if linking against libc_r) with: > > gcc -o app app.c -lc_r > > Or, using the deprecated -pthread option: > > gcc -o app -pthread app.c > > As I said, it works here for me on -current. It > doesn't > look like anything has changed in libc_r since 5.1. > It seems ok now, thank you! > -- > Dan Eischen > __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From owner-freebsd-threads@FreeBSD.ORG Tue Jul 1 02:23:37 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 2D78437B401; Tue, 1 Jul 2003 02:23:37 -0700 (PDT) Received: from silver.he.iki.fi (silver.he.iki.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id D77014400B; Tue, 1 Jul 2003 02:23:35 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from PETEX31 (gprs-prointernet-3e47d7f9.mobile.inet.fi [62.71.215.249]) by silver.he.iki.fi (8.12.9/8.11.4) with SMTP id h619NAsL044705; Tue, 1 Jul 2003 12:23:16 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <007601c33fb2$6c5d2c80$f9d7473e@PETEX31> From: "Petri Helenius" To: , "David Xu" References: Date: Tue, 1 Jul 2003 11:21:19 +0200 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: rtprio and kse 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, 01 Jul 2003 09:23:37 -0000 > It is legitimate to want a single (or set) of threads to > have real-time priority and not the others. Since the > priority is in the KSEG, this is possible to do without > fork()ing. > > Dan Eischen > So to summarize, in order to achieve rtprio for one of the ~dozen threads in the process, winthout affecting the rest of the threads in the same process, set PTHREAD_SCOPE_SYSTEM when creating the thread and ask for rtprio in the thread after it has started? Pete From owner-freebsd-threads@FreeBSD.ORG Tue Jul 1 02:43: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 C820F37B478; Tue, 1 Jul 2003 02:43:34 -0700 (PDT) Received: from exchhz01.viatech.com.cn (ip-167-164-97-218.anlai.com [218.97.164.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF83C44025; Tue, 1 Jul 2003 02:43:30 -0700 (PDT) (envelope-from davidxu@viatech.com.cn) Received: from davidw2k (ip-240-1-168-192.rev.dyxnet.com [192.168.1.240]) by exchhz01.viatech.com.cn with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id M4G4DVMR; Tue, 1 Jul 2003 17:27:28 +0800 Message-ID: <000b01c33fb5$a9fbd570$f001a8c0@davidw2k> From: "David Xu" To: "Petri Helenius" , References: <007601c33fb2$6c5d2c80$f9d7473e@PETEX31> Date: Tue, 1 Jul 2003 17:46:36 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" 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: freebsd-threads@freebsd.org Subject: Re: rtprio and kse 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, 01 Jul 2003 09:43:40 -0000 ----- Original Message -----=20 From: "Petri Helenius" To: ; "David Xu" Cc: Sent: Tuesday, July 01, 2003 5:21 PM Subject: Re: rtprio and kse >=20 > > It is legitimate to want a single (or set) of threads to > > have real-time priority and not the others. Since the > > priority is in the KSEG, this is possible to do without > > fork()ing. > >=20 > > Dan Eischen > >=20 > So to summarize, in order to achieve rtprio for one of the ~dozen = threads > in the process, winthout affecting the rest of the threads in the same = process, > set PTHREAD_SCOPE_SYSTEM when creating the thread > and ask for rtprio in the thread after it has started? >=20 Yes, quite right. :-) > Pete > =20 > _______________________________________________ > freebsd-threads@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > To unsubscribe, send any mail to = "freebsd-threads-unsubscribe@freebsd.org" >=20 From owner-freebsd-threads@FreeBSD.ORG Tue Jul 1 06:30:06 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 45F7937B401 for ; Tue, 1 Jul 2003 06:30:06 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7FA0F43FBD for ; Tue, 1 Jul 2003 06:30:05 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h61DU4AI011843; Tue, 1 Jul 2003 09:30:04 -0400 (EDT) Date: Tue, 1 Jul 2003 09:30:04 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Petri Helenius In-Reply-To: <007601c33fb2$6c5d2c80$f9d7473e@PETEX31> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: David Xu cc: freebsd-threads@freebsd.org Subject: Re: rtprio and kse 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, 01 Jul 2003 13:30:06 -0000 On Tue, 1 Jul 2003, Petri Helenius wrote: > > It is legitimate to want a single (or set) of threads to > > have real-time priority and not the others. Since the > > priority is in the KSEG, this is possible to do without > > fork()ing. > > > > Dan Eischen > > > So to summarize, in order to achieve rtprio for one of the ~dozen threads > in the process, winthout affecting the rest of the threads in the same process, > set PTHREAD_SCOPE_SYSTEM when creating the thread > and ask for rtprio in the thread after it has started? I don't understand. Do you want all threads in the process to be affected by rtprio()? Or are you saying there are more than 12 threads in the process, but you only want rtprio() to affect those 12 threads? As I've said before, rtprio() affects the thread's calling KSEG. Threads created with scope system each get their own KSEG. Threads created with scope process all run in the same KSEG. Threads never migrate between KSEGs. That's all you need to know. Do with it what you will. -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Tue Jul 1 10:22:24 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 1257E37B401 for ; Tue, 1 Jul 2003 10:22:24 -0700 (PDT) Received: from silver.he.iki.fi (silver.he.iki.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAC1E43FF3 for ; Tue, 1 Jul 2003 10:22:22 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from PETEX31 (gprs-prointernet-3e47d418.mobile.inet.fi [62.71.212.24]) by silver.he.iki.fi (8.12.9/8.11.4) with SMTP id h61HLrsN047497; Tue, 1 Jul 2003 20:22:09 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <003101c33ff5$50fcfb80$18d4473e@PETEX31> From: "Petri Helenius" To: "Daniel Eischen" References: Date: Tue, 1 Jul 2003 19:19:25 +0200 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: David Xu cc: freebsd-threads@freebsd.org Subject: Re: rtprio and kse 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, 01 Jul 2003 17:22:24 -0000 > > I don't understand. Do you want all threads in the process > to be affected by rtprio()? Or are you saying there are > more than 12 threads in the process, but you only want > rtprio() to affect those 12 threads? No, just the one that calls rtprio. The rest should stay as they were. > > As I've said before, rtprio() affects the thread's calling > KSEG. Threads created with scope system each get their own > KSEG. Threads created with scope process all run in the > same KSEG. Threads never migrate between KSEGs. That's > all you need to know. Do with it what you will. > I know, though since there has been quite a few messages flying back and forth, I thought it would be a good idea to put the whole thing into one. Thanks, Pete From owner-freebsd-threads@FreeBSD.ORG Tue Jul 1 10:55:16 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 5F4A437B401 for ; Tue, 1 Jul 2003 10:55:16 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id A750743FCB for ; Tue, 1 Jul 2003 10:55:15 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h61Ht8AI021821; Tue, 1 Jul 2003 13:55:10 -0400 (EDT) Date: Tue, 1 Jul 2003 13:55:08 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Petri Helenius In-Reply-To: <003101c33ff5$50fcfb80$18d4473e@PETEX31> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: David Xu cc: freebsd-threads@freebsd.org Subject: Re: rtprio and kse X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: desichen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2003 17:55:16 -0000 On Tue, 1 Jul 2003, Petri Helenius wrote: > > > > I don't understand. Do you want all threads in the process > > to be affected by rtprio()? Or are you saying there are > > more than 12 threads in the process, but you only want > > rtprio() to affect those 12 threads? > > No, just the one that calls rtprio. The rest should stay as they were. Ok. You just need to know which thread will be calling rtprio() and create that one thread as scope system. You don't need (and probably don't want) the others to be scope system. -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Wed Jul 2 01:42:36 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 6654537B401 for ; Wed, 2 Jul 2003 01:42:36 -0700 (PDT) Received: from emeise-software-design.de (emeise-software-design.de [217.160.109.8]) by mx1.FreeBSD.org (Postfix) with SMTP id 027A143FF5 for ; Wed, 2 Jul 2003 01:42:33 -0700 (PDT) (envelope-from ceyxx@web.de) Received: (qmail 95078 invoked from network); 2 Jul 2003 08:46:00 -0000 Received: from unknown (HELO c226069.adsl.hansenet.de) (213.39.226.69) by p15093550.pureserver.info with SMTP; 2 Jul 2003 08:46:00 -0000 From: Dietmar Grabowski To: freebsd-threads@freebsd.org Date: Wed, 2 Jul 2003 10:45:54 +0200 User-Agent: KMail/1.5 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200307021045.54122.ceyxx@web.de> cc: ceyxx@web.de Subject: libthr und libkse-Probs with python X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ceyxx@web.de List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jul 2003 08:42:36 -0000 Hi, some testing of libthr and libkse with python: libkse: hangs after 20 seconds, unkillable process libthr: hangs also, but killable i am running current from Mon Jun 30 greeting dietmar --------------------------------- #!/usr/local/bin/python import time, threading, whrandom class MyThread(threading.Thread): """ Each thread picks a 'random' integer between 0 and 19 and reports in once per second for that many seconds. """ def run(self): iterations = whrandom.randint(0, 19) for i in range(iterations): print " ", self.getName(), "is reporting in" time.sleep(1) print self.getName(), "is DONE" if __name__ == '__main__': threadList = [] # Create 200 MyThread() threads for i in range(200) : thread = MyThread() threadList.append(thread) # Start all threads for thread in threadList: thread.start() # As long as we have more than just the 'main' thread running, print # out a status message while threading.activeCount() > 1 : print str(threading.activeCount()), "threads running incl. main" time.sleep(1) ------------------------- From owner-freebsd-threads@FreeBSD.ORG Wed Jul 2 18:51:51 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 000A637B401 for ; Wed, 2 Jul 2003 18:51:50 -0700 (PDT) Received: from pool-151-200-10-97.res.east.verizon.net (pool-151-200-245-139.res.east.verizon.net [151.200.245.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id E586C43FF9 for ; Wed, 2 Jul 2003 18:51:49 -0700 (PDT) (envelope-from mtm@identd.net) Received: from kokeb.ambesa.net (localhost [IPv6:::1]) id h631pmck001859 for ; Wed, 2 Jul 2003 21:51:48 -0400 (EDT) (envelope-from mtm@identd.net) Received: (from mtm@localhost) by kokeb.ambesa.net (8.12.9/8.12.6/Submit) id h631pmst001858 for freebsd-threads@FreeBSD.Org; Wed, 2 Jul 2003 21:51:48 -0400 (EDT) (envelope-from mtm@identd.net) Date: Wed, 2 Jul 2003 21:51:48 -0400 From: Mike Makonnen To: freebsd-threads@FreeBSD.Org Message-ID: <20030703015148.GA1593@kokeb.ambesa.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="PNTmBPCT7hxwcZjr" Content-Disposition: inline User-Agent: Mutt/1.4i X-Operating-System: FreeBSD/5.1-CURRENT (i386) Subject: kernel signal bug 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, 03 Jul 2003 01:51:51 -0000 --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi guys, I've tracked down the cause of an apparent deadlock in libthr, and the problem is that signals targeted at a specific thread were sometimes not delivered to it. For example, if Thread1 sends a signal to Thread2, but Thread2 has that signal masked, the signal is instead posted to the process. If another threads unmasks the signal before Thread2 it will receive the signal. This is clearly wrong according to POSIX. A signal sent to a specific thread must be delivered to that thread. This is problematic for us because thr and kse disagree on what 'thread' means :-) To solve the problem correctly I'm going to need the help of the KSE guys in formulating a solution that takes into account the difference in thread mapping between thr and kse. In the meantime; however, I would like to commit the following patch which solves the problem well enough. I would like to know if this breaks anything for KSE. There is one problem that I know of with the patch: when a signal is reposted for some reason, it is posted back to the thread that handled it because the information about the target of the signal has been lost by this time. I think this is an acceptable compromise for the moment. As I said, solving the problem correctly will require that we take into account both thr and kse. 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 --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="tdsignal.diff" Index: sys/kern/kern_sig.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_sig.c,v retrieving revision 1.247 diff -u -r1.247 kern_sig.c --- sys/kern/kern_sig.c 28 Jun 2003 08:29:04 -0000 1.247 +++ sys/kern/kern_sig.c 2 Jul 2003 22:45:34 -0000 @@ -95,7 +95,7 @@ static struct thread *sigtd(struct proc *p, int sig, int prop); static int kern_sigtimedwait(struct thread *td, sigset_t set, siginfo_t *info, struct timespec *timeout); -static void do_tdsignal(struct thread *td, int sig); +static void do_tdsignal(struct thread *td, int sig, sigtarget_t target); struct filterops sig_filtops = { 0, filt_sigattach, filt_sigdetach, filt_signal }; @@ -761,7 +761,7 @@ /* Repost if we got an error. */ if (error && info.si_signo) { PROC_LOCK(td->td_proc); - tdsignal(td, info.si_signo); + tdsignal(td, info.si_signo, SIGTARGET_TD); PROC_UNLOCK(td->td_proc); } return (error); @@ -800,7 +800,7 @@ /* Repost if we got an error. */ if (error && info.si_signo) { PROC_LOCK(td->td_proc); - tdsignal(td, info.si_signo); + tdsignal(td, info.si_signo, SIGTARGET_TD); PROC_UNLOCK(td->td_proc); } else { td->td_retval[0] = info.si_signo; @@ -831,7 +831,7 @@ /* Repost if we got an error. */ if (error && info.si_signo) { PROC_LOCK(td->td_proc); - tdsignal(td, info.si_signo); + tdsignal(td, info.si_signo, SIGTARGET_TD); PROC_UNLOCK(td->td_proc); } else { td->td_retval[0] = info.si_signo; @@ -1538,7 +1538,7 @@ mtx_unlock(&ps->ps_mtx); p->p_code = code; /* XXX for core dump/debugger */ p->p_sig = sig; /* XXX to verify code */ - tdsignal(td, sig); + tdsignal(td, sig, SIGTARGET_TD); } PROC_UNLOCK(p); } @@ -1607,21 +1607,21 @@ */ td = sigtd(p, sig, prop); - tdsignal(td, sig); + tdsignal(td, sig, SIGTARGET_P); } /* * MPSAFE */ void -tdsignal(struct thread *td, int sig) +tdsignal(struct thread *td, int sig, sigtarget_t target) { sigset_t saved; struct proc *p = td->td_proc; if (p->p_flag & P_SA) saved = p->p_siglist; - do_tdsignal(td, sig); + do_tdsignal(td, sig, target); if ((p->p_flag & P_SA) && !(p->p_flag & P_SIGEVENT)) { if (SIGSETEQ(saved, p->p_siglist)) return; @@ -1634,7 +1634,7 @@ } static void -do_tdsignal(struct thread *td, int sig) +do_tdsignal(struct thread *td, int sig, sigtarget_t target) { struct proc *p; register sig_t action; @@ -1656,12 +1656,17 @@ /* * If this thread is blocking this signal then we'll leave it in the - * proc so that we can find it in the first thread that unblocks it. + * proc so that we can find it in the first thread that unblocks + * it-- unless the signal is meant for the thread and not the process. */ - if (SIGISMEMBER(td->td_sigmask, sig)) - siglist = &p->p_siglist; - else + if (target == SIGTARGET_TD) { siglist = &td->td_siglist; + } else { + if (SIGISMEMBER(td->td_sigmask, sig)) + siglist = &p->p_siglist; + else + siglist = &td->td_siglist; + } /* * If proc is traced, always give parent a chance; Index: sys/kern/kern_thr.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_thr.c,v retrieving revision 1.10 diff -u -r1.10 kern_thr.c --- sys/kern/kern_thr.c 11 Jun 2003 00:56:57 -0000 1.10 +++ sys/kern/kern_thr.c 3 Jul 2003 01:12:42 -0000 @@ -258,11 +258,7 @@ goto out; } - /* - * We need a way to force this to go into this thread's siglist. - * Until then blocked signals will go to the proc. - */ - tdsignal(ttd, uap->sig); + tdsignal(ttd, uap->sig, SIGTARGET_TD); out: PROC_UNLOCK(p); Index: sys/kern/kern_thread.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_thread.c,v retrieving revision 1.148 diff -u -r1.148 kern_thread.c --- sys/kern/kern_thread.c 30 Jun 2003 10:04:04 -0000 1.148 +++ sys/kern/kern_thread.c 2 Jul 2003 22:37:28 -0000 @@ -413,7 +413,7 @@ if (sig > 0) { td2->td_flags &= ~TDF_INTERRUPT; mtx_unlock_spin(&sched_lock); - tdsignal(td2, sig); + tdsignal(td2, sig, SIGTARGET_P); } else if (sig == 0) { mtx_unlock_spin(&sched_lock); } else { Index: sys/sys/signalvar.h =================================================================== RCS file: /home/ncvs/src/sys/sys/signalvar.h,v retrieving revision 1.62 diff -u -r1.62 signalvar.h --- sys/sys/signalvar.h 14 May 2003 15:00:24 -0000 1.62 +++ sys/sys/signalvar.h 2 Jul 2003 22:47:00 -0000 @@ -205,6 +205,13 @@ #ifdef _KERNEL +/* + * Specifies the target of a signal. + * P - Doesn't matter which thread it gets delivered to. + * TD - Must be delivered to a specific thread. + */ +typedef enum sigtarget_enum { SIGTARGET_TD, SIGTARGET_P } sigtarget_t; + /* Return nonzero if process p has an unmasked pending signal. */ #define SIGPENDING(td) \ (!SIGISEMPTY((td)->td_siglist) && \ @@ -267,7 +274,7 @@ int sig_ffs(sigset_t *set); void siginit(struct proc *p); void signotify(struct thread *td); -void tdsignal(struct thread *td, int sig); +void tdsignal(struct thread *td, int sig, sigtarget_t target); void trapsignal(struct thread *td, int sig, u_long code); /* --PNTmBPCT7hxwcZjr-- From owner-freebsd-threads@FreeBSD.ORG Wed Jul 2 19:40: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 B5A6437B401 for ; Wed, 2 Jul 2003 19:40:47 -0700 (PDT) Received: from pool-151-200-10-97.res.east.verizon.net (pool-151-200-245-139.res.east.verizon.net [151.200.245.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id B8F4D43FCB for ; Wed, 2 Jul 2003 19:40:46 -0700 (PDT) (envelope-from mtm@identd.net) Received: from kokeb.ambesa.net (localhost [IPv6:::1]) id h632ejck002161 for ; Wed, 2 Jul 2003 22:40:45 -0400 (EDT) (envelope-from mtm@identd.net) Received: (from mtm@localhost) by kokeb.ambesa.net (8.12.9/8.12.6/Submit) id h632ejwm002160 for freebsd-threads@freebsd.org; Wed, 2 Jul 2003 22:40:45 -0400 (EDT) (envelope-from mtm@identd.net) Date: Wed, 2 Jul 2003 22:40:45 -0400 From: Mike Makonnen To: freebsd-threads@freebsd.org Message-ID: <20030703024045.GB1593@kokeb.ambesa.net> References: <20030703015148.GA1593@kokeb.ambesa.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030703015148.GA1593@kokeb.ambesa.net> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD/5.1-CURRENT (i386) Subject: Re: kernel signal bug 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, 03 Jul 2003 02:40:48 -0000 A brief explanation of what it does: All callers to tdsignal() are required to pass a third argument about whether the threads are destined for the process of the thread. If it's destined for the thread the signal is put on the thread's siglist, regardless of whether the thread has it masked or not. 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 Jul 2 23:55:20 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 3892737B401 for ; Wed, 2 Jul 2003 23:55:20 -0700 (PDT) Received: from mail.chesapeake.net (chesapeake.net [208.142.252.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4660543F93 for ; Wed, 2 Jul 2003 23:55:19 -0700 (PDT) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost) by mail.chesapeake.net (8.11.6/8.11.6) with ESMTP id h636tFT33704; Thu, 3 Jul 2003 02:55:15 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Date: Thu, 3 Jul 2003 02:55:15 -0400 (EDT) From: Jeff Roberson To: Mike Makonnen In-Reply-To: <20030703024045.GB1593@kokeb.ambesa.net> Message-ID: <20030703025403.A17881-100000@mail.chesapeake.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: kernel signal bug 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, 03 Jul 2003 06:55:20 -0000 > All callers to tdsignal() are required to pass a third > argument about whether the threads are destined for the > process of the thread. If it's destined for the thread > the signal is put on the thread's siglist, regardless > of whether the thread has it masked or not. I like this. It was something that I had intended to do as noted by the comment. You should run this by bruce though. I'm not sure if the sigtarget is style(9) compliant. Commit as soon as you can. :-) From owner-freebsd-threads@FreeBSD.ORG Thu Jul 3 01:53:00 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 9E6EF37B401 for ; Thu, 3 Jul 2003 01:53:00 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE14143FE9 for ; Thu, 3 Jul 2003 01:52:59 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.9/8.12.9) with ESMTP id h638qxDZ051002 for ; Thu, 3 Jul 2003 01:52:59 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.9/8.12.9) with ESMTP id h638qwUw019686 for ; Thu, 3 Jul 2003 01:52:58 -0700 (PDT) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.9/8.12.9/Submit) id h638qwZx019685 for threads@FreeBSD.org; Thu, 3 Jul 2003 01:52:58 -0700 (PDT) Date: Thu, 3 Jul 2003 01:52:58 -0700 From: Marcel Moolenaar To: threads@FreeBSD.org Message-ID: <20030703085258.GA19450@dhcp01.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.4i Subject: libthr: Non-Zero blocked signal nesting level 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, 03 Jul 2003 08:53:00 -0000 Mike, Is your signal patch related to: /bin/sh ../../mkinstalldirs /usr/X11R6/etc/gtk-2.0 ../../gtk/gtk-query-immodules-2.0 > /usr/X11R6/etc/gtk-2.0/gtk.immodules Fatal error 'Non-Zero blocked signal nesting level.' at line 104 in file /nfs/freebsd/5.x/src/lib/libthr/thread/thr_kern.c (errno = 25) Abort trap (core dumped) *** Error code 134 Stop in /usr/obj/nfs/freebsd/ports/x11-toolkits/gtk20/work/gtk+-2.2.2/modules/input. *** Error code 1 \begin{info} libthr=post Wed Jul 2 23:56:46 PDT 2003 arch=ia64 port=x11-toolkits/gtk20 \end{info} -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-threads@FreeBSD.ORG Thu Jul 3 03:04:51 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 53B5137B401 for ; Thu, 3 Jul 2003 03:04:51 -0700 (PDT) Received: from pool-151-200-10-97.res.east.verizon.net (pool-138-88-156-213.esr.east.verizon.net [138.88.156.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3348A43FBF for ; Thu, 3 Jul 2003 03:04:50 -0700 (PDT) (envelope-from mtm@identd.net) Received: from kokeb.ambesa.net (localhost [IPv6:::1]) id h63A4nck006901; Thu, 3 Jul 2003 06:04:49 -0400 (EDT) (envelope-from mtm@identd.net) Received: (from mtm@localhost) by kokeb.ambesa.net (8.12.9/8.12.6/Submit) id h63A4n8e006900; Thu, 3 Jul 2003 06:04:49 -0400 (EDT) (envelope-from mtm@identd.net) Date: Thu, 3 Jul 2003 06:04:48 -0400 From: Mike Makonnen To: Marcel Moolenaar Message-ID: <20030703100448.GF1593@kokeb.ambesa.net> References: <20030703085258.GA19450@dhcp01.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ctP54qlpMx3WjD+/" Content-Disposition: inline In-Reply-To: <20030703085258.GA19450@dhcp01.pn.xcllnt.net> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD/5.1-CURRENT (i386) cc: threads@freebsd.org Subject: Re: libthr: Non-Zero blocked signal nesting level 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, 03 Jul 2003 10:04:51 -0000 --ctP54qlpMx3WjD+/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jul 03, 2003 at 01:52:58AM -0700, Marcel Moolenaar wrote: > Mike, > > Is your signal patch related to: > No, but I think the attached patch will fix the problem you're seeing. 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 --ctP54qlpMx3WjD+/ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="trylock.diff" Index: lib/libthr/thread/thr_mutex.c =================================================================== RCS file: /home/ncvs/src/lib/libthr/thread/thr_mutex.c,v retrieving revision 1.15 diff -u -r1.15 thr_mutex.c --- lib/libthr/thread/thr_mutex.c 2 Jul 2003 02:05:23 -0000 1.15 +++ lib/libthr/thread/thr_mutex.c 3 Jul 2003 09:59:11 -0000 @@ -309,6 +309,8 @@ if (mutex == NULL) ret = EINVAL; + _thread_sigblock(); + /* * If the mutex is statically initialized, perform the dynamic * initialization marking the mutex private (delete safe): @@ -316,6 +318,9 @@ else if ((*mutex != PTHREAD_MUTEX_INITIALIZER) || (ret = mutex_init(mutex, 1)) == 0) ret = mutex_lock_common(mutex, 1); + + if (ret != 0) + _thread_sigunblock(); return (ret); } --ctP54qlpMx3WjD+/-- From owner-freebsd-threads@FreeBSD.ORG Thu Jul 3 16:56:17 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 DAFC037B401 for ; Thu, 3 Jul 2003 16:56:17 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F22B44033 for ; Thu, 3 Jul 2003 16:56:17 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.9/8.12.9) with ESMTP id h63NuGv1004024; Thu, 3 Jul 2003 16:56:16 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.9/8.12.9) with ESMTP id h63NuGUw023924; Thu, 3 Jul 2003 16:56:16 -0700 (PDT) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.9/8.12.9/Submit) id h63NuGZe023923; Thu, 3 Jul 2003 16:56:16 -0700 (PDT) Date: Thu, 3 Jul 2003 16:56:16 -0700 From: Marcel Moolenaar To: Mike Makonnen Message-ID: <20030703235616.GA23888@dhcp01.pn.xcllnt.net> References: <20030703085258.GA19450@dhcp01.pn.xcllnt.net> <20030703100448.GF1593@kokeb.ambesa.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030703100448.GF1593@kokeb.ambesa.net> User-Agent: Mutt/1.5.4i cc: threads@freebsd.org Subject: Re: libthr: Non-Zero blocked signal nesting level 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, 03 Jul 2003 23:56:18 -0000 On Thu, Jul 03, 2003 at 06:04:48AM -0400, Mike Makonnen wrote: > On Thu, Jul 03, 2003 at 01:52:58AM -0700, Marcel Moolenaar wrote: > > Mike, > > > > Is your signal patch related to: > > > > No, but I think the attached patch will fix the problem you're seeing. Confirmed. I noticed you already committed it. Thanks, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net