From owner-freebsd-threads@FreeBSD.ORG Mon Oct 6 11:01:33 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA2E016A4B3 for ; Mon, 6 Oct 2003 11:01:33 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0610943F93 for ; Mon, 6 Oct 2003 11:01:30 -0700 (PDT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h96I1UFY060744 for ; Mon, 6 Oct 2003 11:01:30 -0700 (PDT) (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h96I1TAP060733 for freebsd-threads@freebsd.org; Mon, 6 Oct 2003 11:01:29 -0700 (PDT) (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 6 Oct 2003 11:01:29 -0700 (PDT) Message-Id: <200310061801.h96I1TAP060733@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-threads@FreeBSD.org Subject: Current problem reports assigned to you 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, 06 Oct 2003 18:01:33 -0000 Current FreeBSD problem reports Critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/06/13] kern/19247 threads uthread_sigaction.c does not do anything o [2002/01/16] kern/33951 threads pthread_cancel is ignored 2 problems total. Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/07/18] kern/20016 threads pthreads: Cannot set scheduling timer/Can o [2000/08/26] misc/20861 threads libc_r does not honor socket timeouts o [2001/01/19] bin/24472 threads libc_r does not honor SO_SNDTIMEO/SO_RCVT o [2001/01/25] bin/24632 threads libc_r delicate deviation from libc in ha o [2001/01/25] misc/24641 threads pthread_rwlock_rdlock can deadlock o [2001/04/02] bin/26307 threads libc_r aborts when using the KDE media pl o [2001/10/31] bin/31661 threads pthread_kill signal handler doesn't get s o [2001/11/26] bin/32295 threads pthread dont dequeue signals o [2002/02/01] i386/34536 threads accept() blocks other threads o [2002/03/07] bin/35622 threads sigaltstack is missing in libc_r o [2002/05/25] kern/38549 threads the procces compiled whith pthread stoppe o [2002/06/27] bin/39922 threads [PATCH?] Threaded applications executed w o [2002/08/04] misc/41331 threads Pthread library open sets O_NONBLOCK flag o [2002/10/10] kern/43887 threads abnormal CPU useage when use pthread_mute o [2003/03/02] bin/48856 threads Setting SIGCHLD to SIG_IGN still leaves z o [2003/03/10] bin/49087 threads Signals lost in programs linked with libc a [2003/04/08] bin/50733 threads buildworld won't build, because of linkin o [2003/05/07] bin/51949 threads thread in accept cannot be cancelled o [2003/05/30] kern/52817 threads top(1) shows garbage for threaded process 19 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/05/25] misc/18824 threads gethostbyname is not thread safe o [2000/10/21] misc/22190 threads A threaded read(2) from a socketpair(2) f o [2001/09/09] bin/30464 threads pthread mutex attributes -- pshared o [2002/05/02] bin/37676 threads libc_r: msgsnd(), msgrcv(), pread(), pwri o [2002/07/16] misc/40671 threads pthread_cancel doesn't remove thread from 5 problems total. From owner-freebsd-threads@FreeBSD.ORG Fri Oct 10 10:17: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 CD66716A4B3 for ; Fri, 10 Oct 2003 10:17:06 -0700 (PDT) Received: from gw.celabo.org (gw.celabo.org [208.42.49.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5EFFA43FB1 for ; Fri, 10 Oct 2003 10:17:05 -0700 (PDT) (envelope-from nectar@celabo.org) Received: from madman.celabo.org (madman.celabo.org [10.0.1.111]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "madman.celabo.org", Issuer "celabo.org CA" (verified OK)) by gw.celabo.org (Postfix) with ESMTP id 0DCA154861; Fri, 10 Oct 2003 12:17:05 -0500 (CDT) Received: by madman.celabo.org (Postfix, from userid 1001) id C13576D454; Fri, 10 Oct 2003 12:17:04 -0500 (CDT) Date: Fri, 10 Oct 2003 12:17:04 -0500 From: "Jacques A. Vidrine" To: Petri Helenius Message-ID: <20031010171704.GV45920@madman.celabo.org> Mail-Followup-To: "Jacques A. Vidrine" , Petri Helenius , freebsd-threads@FreeBSD.org References: <3F4F5467.1050404@he.iki.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F4F5467.1050404@he.iki.fi> X-Url: http://www.celabo.org/ User-Agent: Mutt/1.5.4i-ja.1 cc: freebsd-threads@FreeBSD.org Subject: Re: threads and openssl 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: Fri, 10 Oct 2003 17:17:06 -0000 On Fri, Aug 29, 2003 at 04:25:59PM +0300, Petri Helenius wrote: > > Is there a plan to resolve > > > bin/51205: openssl in base system is not compiled thread safe > > or has it been resolved but the pr has been left unattended? It sounds > like it would make > sense to have the library thread safe, specially in 5-CURRENT where the > threads have > a performance gain. So far OpenSSL with threads enabled does not work in my tests ons 5-CURRENT. Cheers, -- Jacques Vidrine . NTT/Verio SME . FreeBSD UNIX . Heimdal nectar@celabo.org . jvidrine@verio.net . nectar@freebsd.org . nectar@kth.se From owner-freebsd-threads@FreeBSD.ORG Fri Oct 10 13:52: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 77B5116A4B3; Fri, 10 Oct 2003 13:52:19 -0700 (PDT) Received: from silver.he.iki.fi (helenius.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 104C843FAF; Fri, 10 Oct 2003 13:52:18 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from he.iki.fi (h81.vuokselantie10.fi [193.64.42.129]) by silver.he.iki.fi (8.12.9/8.11.4) with ESMTP id h9AKqFNn052870; Fri, 10 Oct 2003 23:52:16 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <3F871BFD.4070506@he.iki.fi> Date: Fri, 10 Oct 2003 23:52:13 +0300 From: Petri Helenius User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20030916 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Jacques A. Vidrine" References: <3F4F5467.1050404@he.iki.fi> <20031010171704.GV45920@madman.celabo.org> In-Reply-To: <20031010171704.GV45920@madman.celabo.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-threads@FreeBSD.org Subject: Re: threads and openssl 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: Fri, 10 Oct 2003 20:52:19 -0000 Jacques A. Vidrine wrote: >So far OpenSSL with threads enabled does not work in my tests ons >5-CURRENT. > > > I ended up putting CFLAGS+=-DOPENSSL_THREADS in make.conf and recompiling world. Works for me. However it would make sense to fix it more cleanly. Pete From owner-freebsd-threads@FreeBSD.ORG Fri Oct 10 14: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 847A116A4B3 for ; Fri, 10 Oct 2003 14:03:56 -0700 (PDT) Received: from gw.celabo.org (gw.celabo.org [208.42.49.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4D7F43FBD for ; Fri, 10 Oct 2003 14:03:55 -0700 (PDT) (envelope-from nectar@celabo.org) Received: from madman.celabo.org (madman.celabo.org [10.0.1.111]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "madman.celabo.org", Issuer "celabo.org CA" (verified OK)) by gw.celabo.org (Postfix) with ESMTP id 4C37554861; Fri, 10 Oct 2003 16:03:55 -0500 (CDT) Received: by madman.celabo.org (Postfix, from userid 1001) id DA36D6D454; Fri, 10 Oct 2003 16:03:54 -0500 (CDT) Date: Fri, 10 Oct 2003 16:03:54 -0500 From: "Jacques A. Vidrine" To: Petri Helenius Message-ID: <20031010210354.GA47867@madman.celabo.org> Mail-Followup-To: "Jacques A. Vidrine" , Petri Helenius , freebsd-threads@FreeBSD.org References: <3F4F5467.1050404@he.iki.fi> <20031010171704.GV45920@madman.celabo.org> <3F871BFD.4070506@he.iki.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F871BFD.4070506@he.iki.fi> X-Url: http://www.celabo.org/ User-Agent: Mutt/1.5.4i-ja.1 cc: freebsd-threads@FreeBSD.org Subject: Re: threads and openssl 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: Fri, 10 Oct 2003 21:03:56 -0000 On Fri, Oct 10, 2003 at 11:52:13PM +0300, Petri Helenius wrote: > Jacques A. Vidrine wrote: > > >So far OpenSSL with threads enabled does not work in my tests ons > >5-CURRENT. > > > > > > > I ended up putting CFLAGS+=-DOPENSSL_THREADS > in make.conf and recompiling world. Works for me. > > However it would make sense to fix it more cleanly. You then linked against a threading library? Blew up here. Cheers, -- Jacques Vidrine . NTT/Verio SME . FreeBSD UNIX . Heimdal nectar@celabo.org . jvidrine@verio.net . nectar@freebsd.org . nectar@kth.se From owner-freebsd-threads@FreeBSD.ORG Fri Oct 10 14:48: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 05E4D16A4B3; Fri, 10 Oct 2003 14:48:36 -0700 (PDT) Received: from silver.he.iki.fi (helenius.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E75B43FE0; Fri, 10 Oct 2003 14:48:34 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from he.iki.fi (h81.vuokselantie10.fi [193.64.42.129]) by silver.he.iki.fi (8.12.9/8.11.4) with ESMTP id h9ALmXNn053189; Sat, 11 Oct 2003 00:48:33 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <3F87292F.2030702@he.iki.fi> Date: Sat, 11 Oct 2003 00:48:31 +0300 From: Petri Helenius User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20030916 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Jacques A. Vidrine" References: <3F4F5467.1050404@he.iki.fi> <20031010171704.GV45920@madman.celabo.org> <3F871BFD.4070506@he.iki.fi> <20031010210354.GA47867@madman.celabo.org> In-Reply-To: <20031010210354.GA47867@madman.celabo.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit cc: freebsd-threads@FreeBSD.org Subject: Re: threads and openssl 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: Fri, 10 Oct 2003 21:48:36 -0000 Jacques A. Vidrine wrote: >On Fri, Oct 10, 2003 at 11:52:13PM +0300, Petri Helenius wrote: > > >>Jacques A. Vidrine wrote: >> >> >>> >>> >>I ended up putting CFLAGS+=-DOPENSSL_THREADS >>in make.conf and recompiling world. Works for me. >> >>However it would make sense to fix it more cleanly. >> >> > >You then linked against a threading library? Blew up here. > > > I´m sorry but I´m unable to follow your train of thought, please explain. Pete From owner-freebsd-threads@FreeBSD.ORG Sat Oct 11 01:36:58 2003 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E6A1616A4B3; Sat, 11 Oct 2003 01:36:58 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B51643FAF; Sat, 11 Oct 2003 01:36:58 -0700 (PDT) (envelope-from kris@FreeBSD.org) Received: from freefall.freebsd.org (kris@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h9B8awFY028954; Sat, 11 Oct 2003 01:36:58 -0700 (PDT) (envelope-from kris@freefall.freebsd.org) Received: (from kris@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h9B8aw95028950; Sat, 11 Oct 2003 01:36:58 -0700 (PDT) (envelope-from kris) Date: Sat, 11 Oct 2003 01:36:58 -0700 (PDT) From: Kris Kennaway Message-Id: <200310110836.h9B8aw95028950@freefall.freebsd.org> To: kris@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-threads@FreeBSD.org Subject: Re: kern/47531: mutex_d panics SMP kernel 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: Sat, 11 Oct 2003 08:36:59 -0000 Synopsis: mutex_d panics SMP kernel Responsible-Changed-From-To: freebsd-bugs->freebsd-threads Responsible-Changed-By: kris Responsible-Changed-When: Sat Oct 11 01:36:50 PDT 2003 Responsible-Changed-Why: Assign to threads developers http://www.freebsd.org/cgi/query-pr.cgi?pr=47531 From owner-freebsd-threads@FreeBSD.ORG Sat Oct 11 06:45: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 CBBEB16A4B3 for ; Sat, 11 Oct 2003 06:45:19 -0700 (PDT) Received: from maxwell.syr.edu (maxwell.syr.edu [128.230.129.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id D1FFE43F3F for ; Sat, 11 Oct 2003 06:45:18 -0700 (PDT) (envelope-from cmsedore@maxwell.syr.edu) Received: from exchange.maxwell.syr.edu (excluster2.maxwell.syr.edu [128.230.129.231]) by maxwell.syr.edu (8.12.10/8.9.1) with ESMTP id h9BDjHo2051313 for ; Sat, 11 Oct 2003 09:45:17 -0400 (EDT) X-MIMEOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Sat, 11 Oct 2003 09:45:18 -0400 Message-ID: <32A8B2CB12BFC84D8D11D872C787AA9A515CD3@EXCHANGE.forest.maxwell.syr.edu> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: odd problem(s) with libthr and libkse Thread-Index: AcOP/egQcf07hy63SdeRAFjEr8d4tQ== From: "Christopher M. Sedore" To: Subject: odd problem(s) with libthr and libkse X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2003 13:45:19 -0000 I have a multithreaded program that I've built to run under libc_r, = libthr, and libkse. I use the libc_r build for debugging and the others = for actual work (the program is disk/network io intensive and I want the = disk io concurrency from thr or kse). =20 Anyway, here is the issue I'm seeing. It may be the same or a related = problem for both, or may not be. =20 When running under libthr, everything works fine for an indeterminate = period, usually between 10 seconds and 30 minutes. Eventually, all = program function stops. If I watch in top, threads get stuck in = "sigwai". First one, then a couple, then all. =20 =20 When running under kse, the program pauses periodically. I have one = thread that prints out a heartbeat once per second, and prints debug = info. I get pauses of up to 5 seconds between my heartbeat: =20 8 per sec (40/5) - 3739 total, 6047 pce active 6 per sec (32/5) - 3722 total timer 1065864344 timer 1065864347 timer 1065864348 7 per sec (38/5) - 3777 total, 6034 pce active 7 per sec (39/5) - 3761 total timer 1065864350 timer 1065864351 accepted on 14 accepted on 15 timer 1065864353 4 per sec (20/5) - 3797 total, 6058 pce active 6 per sec (30/5) - 3791 total timer 1065864354 timer 1065864355 timer 1065864357 (note skips from 1065864348 to 350, 351 to 353, 355 to 357) =20 When the pauses occur, network traffic dips to nearly nothing: Overall = program performance with libkse is about 25-50% of what it is under = libthr (when working) or ~30-60% of libc_r. =20 I have no problems when running under libc_r. Any suggestions to debug = this? =20 I'm running 5.1-CURRENT-20030917-JPSNAP. =20 Thanks, =20 -Chris =20 From owner-freebsd-threads@FreeBSD.ORG Sat Oct 11 09:37:26 2003 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ED8A816A4B3; Sat, 11 Oct 2003 09:37:26 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CCB843F3F; Sat, 11 Oct 2003 09:36:06 -0700 (PDT) (envelope-from deischen@FreeBSD.org) Received: from freefall.freebsd.org (deischen@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h9BGa6FY022146; Sat, 11 Oct 2003 09:36:06 -0700 (PDT) (envelope-from deischen@freefall.freebsd.org) Received: (from deischen@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h9BGYkJq022119; Sat, 11 Oct 2003 09:34:46 -0700 (PDT) (envelope-from deischen) Date: Sat, 11 Oct 2003 09:34:46 -0700 (PDT) From: Daniel Eischen Message-Id: <200310111634.h9BGYkJq022119@freefall.freebsd.org> To: arun@sharma-home.net, deischen@FreeBSD.org, freebsd-threads@FreeBSD.org Subject: Re: kern/47531: mutex_d panics SMP kernel 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: Sat, 11 Oct 2003 16:37:27 -0000 Synopsis: mutex_d panics SMP kernel State-Changed-From-To: open->closed State-Changed-By: deischen State-Changed-When: Sat Oct 11 09:32:14 PDT 2003 State-Changed-Why: This is an old PR; the bug doesn't exist anymore. http://www.freebsd.org/cgi/query-pr.cgi?pr=47531 From owner-freebsd-threads@FreeBSD.ORG Sat Oct 11 17:28: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 AFE4C16A4B3; Sat, 11 Oct 2003 17:28:37 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 13EC643F85; Sat, 11 Oct 2003 17:28:37 -0700 (PDT) (envelope-from davidxu@freebsd.org) Received: from freebsd.org (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h9C0SZFY069350; Sat, 11 Oct 2003 17:28:36 -0700 (PDT) (envelope-from davidxu@freebsd.org) Message-ID: <3F88A2BA.3070503@freebsd.org> Date: Sun, 12 Oct 2003 08:39:22 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5b) Gecko/20031004 Thunderbird/0.2 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Christopher M. Sedore" References: <32A8B2CB12BFC84D8D11D872C787AA9A515CD3@EXCHANGE.forest.maxwell.syr.edu> In-Reply-To: <32A8B2CB12BFC84D8D11D872C787AA9A515CD3@EXCHANGE.forest.maxwell.syr.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: odd problem(s) with libthr and libkse X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Oct 2003 00:28:37 -0000 Christopher M. Sedore wrote: >I have a multithreaded program that I've built to run under libc_r, libthr, and libkse. I use the libc_r build for debugging and the others for actual work (the program is disk/network io intensive and I want the disk io concurrency from thr or kse). > >Anyway, here is the issue I'm seeing. It may be the same or a related problem for both, or may not be. > >When running under libthr, everything works fine for an indeterminate period, usually between 10 seconds and 30 minutes. Eventually, all program function stops. If I watch in top, threads get stuck in "sigwai". First one, then a couple, then all. > >When running under kse, the program pauses periodically. I have one thread that prints out a heartbeat once per second, and prints debug info. I get pauses of up to 5 seconds between my heartbeat: > >8 per sec (40/5) - 3739 total, 6047 pce active >6 per sec (32/5) - 3722 total >timer 1065864344 >timer 1065864347 >timer 1065864348 >7 per sec (38/5) - 3777 total, 6034 pce active >7 per sec (39/5) - 3761 total >timer 1065864350 >timer 1065864351 >accepted on 14 >accepted on 15 >timer 1065864353 >4 per sec (20/5) - 3797 total, 6058 pce active >6 per sec (30/5) - 3791 total >timer 1065864354 >timer 1065864355 >timer 1065864357 > >(note skips from 1065864348 to 350, 351 to 353, 355 to 357) > >When the pauses occur, network traffic dips to nearly nothing: Overall program performance with libkse is about 25-50% of what it is under libthr (when working) or ~30-60% of libc_r. > >I have no problems when running under libc_r. Any suggestions to debug this? > >I'm running 5.1-CURRENT-20030917-JPSNAP. > > Can you tell me how many threads in your process ? Make sure you didn't hit the hard limits in kernel : #sysctl -a |grep kern.threads kern.threads.debug: 0 kern.threads.max_threads_per_proc: 150 kern.threads.max_groups_per_proc: 50 kern.threads.max_threads_hits: 0 kern.threads.virtual_cpu: 1 > >Thanks, > >-Chris > >_______________________________________________ >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 Sat Oct 11 18:52:26 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 A700A16A4B3 for ; Sat, 11 Oct 2003 18:52:26 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id B179943FA3 for ; Sat, 11 Oct 2003 18:52:25 -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.10/8.12.1) with ESMTP id h9C1qOrq007780; Sat, 11 Oct 2003 21:52:24 -0400 (EDT) Date: Sat, 11 Oct 2003 21:52:24 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: "Christopher M. Sedore" In-Reply-To: <32A8B2CB12BFC84D8D11D872C787AA9A515CD3@EXCHANGE.forest.maxwell.syr.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: odd problem(s) with libthr and libkse X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Oct 2003 01:52:26 -0000 On Sat, 11 Oct 2003, Christopher M. Sedore wrote: > I have a multithreaded program that I've built to run under libc_r, libthr, > and libkse. I use the libc_r build for debugging and the others for actual > work (the program is disk/network io intensive and I want the disk io > concurrency from thr or kse). > Anyway, here is the issue I'm seeing. It may be the same or a related > problem for both, or may not be. > When running under libthr, everything works fine for an indeterminate > period, usually between 10 seconds and 30 minutes. Eventually, all program > function stops. If I watch in top, threads get stuck in "sigwai". First > one, then a couple, then all. > When running under kse, the program pauses periodically. I have one thread > that prints out a heartbeat once per second, and prints debug info. I get > pauses of up to 5 seconds between my heartbeat: sigwait() may not be behaving as you'd expect in libkse. It is slightly different than in libc_r, but should be POSIX compliant nonetheless. I use the following to test libkse for I/O intensive applications: http://people.freebsd.org/~deischen/kse/crew.c http://people.freebsd.org/~deischen/kse/sched_bug.c The latter test may be similar to what you are describing. It spawns a bunch of threads to perform disk I/O and one thread that just sleeps and prints an incrementing number once a second. Use the first test as "crew node /usr/src" and it will spawn worker threads to search for the string "node" in all files in /usr/src. It is one of Butenhof's tests. Other than that, you'll need to give more info. SCHED_4BSD or SCHED_ULE? SMP or UP? scope system threads or scope process threads? Sample program to demonstrate the problem? -- Dan Eischen