From owner-freebsd-threads@FreeBSD.ORG Mon Jan 19 11:03:39 2004 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 D25D916A4CE for ; Mon, 19 Jan 2004 11:03:39 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E8F043D7E for ; Mon, 19 Jan 2004 11:01:35 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) i0JJ1YFR061953 for ; Mon, 19 Jan 2004 11:01:34 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i0JJ1YR0061947 for freebsd-threads@freebsd.org; Mon, 19 Jan 2004 11:01:34 -0800 (PST) (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 19 Jan 2004 11:01:34 -0800 (PST) Message-Id: <200401191901.i0JJ1YR0061947@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, 19 Jan 2004 19:03:39 -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 Mon Jan 19 21:39:49 2004 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 7815F16A4CE for ; Mon, 19 Jan 2004 21:39:49 -0800 (PST) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4701643D1D for ; Mon, 19 Jan 2004 21:39:48 -0800 (PST) (envelope-from rodrigc@crodrigues.org) Received: from h00609772adf0.ne.client2.attbi.com ([66.31.45.197]) by comcast.net (rwcrmhc12) with ESMTP id <20040120053947014006tmspe>; Tue, 20 Jan 2004 05:39:47 +0000 Received: from h00609772adf0.ne.client2.attbi.com (localhost.crodrigues.org [127.0.0.1])i0K5dk2m005575 for ; Tue, 20 Jan 2004 00:39:46 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost)i0K5dkvi005574 for freebsd-threads@freebsd.org; Tue, 20 Jan 2004 00:39:46 -0500 (EST) (envelope-from rodrigc) Date: Tue, 20 Jan 2004 00:39:45 -0500 From: Craig Rodrigues To: freebsd-threads@freebsd.org Message-ID: <20040120053945.GA4096@crodrigues.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: sem_wait() is a cancellation point in libkse? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2004 05:39:49 -0000 Hi, I am trying to learn about pthread cancellation points, and am reading "Multithreaded Programming with PThreads" by Bil Lewis. In chapter 10 of this book, it states that sem_wait() should be implemented as a pthread cancellation point. I am not sure that sem_wait() is implemented as a cancellation point in libkse. I looked again at some of the Linux NPTL tests which I ported to FreeBSD: http://crodrigues.org/freebsd/nptl-tests.tar.gz The tst-cancel12 test seems to be failing. In this test, a thread is spawned with pthread_create(), and then soon after pthread_create(), pthread_cancel() is called on this thread. Inside the thread, sem_wait() is called. The test is expecting that the thread should immediately exit at the sem_wait() call because sem_wait() should be a cancellation point. However, the thread does not exist after calling sem_wait(), so the test fails. I see that in libkse's thr_sem.c, that there is a _sem_wait() which looks like it is doing cancellation stuff, but it doesn't seem to be working. Am I misunderstanding how this should work? BTW, I could not compile tst_cancel12 against libthr, because tst_cancel12 makes use of pthread barriers, which don't seem to be implemented in libthr. Thanks for any clarification. -- Craig Rodrigues http://crodrigues.org rodrigc@crodrigues.org From owner-freebsd-threads@FreeBSD.ORG Mon Jan 19 22:02:15 2004 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 9ED1416A4CE for ; Mon, 19 Jan 2004 22:02:15 -0800 (PST) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6970F43D41 for ; Mon, 19 Jan 2004 22:02:14 -0800 (PST) (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 i0K62Ciw016402; Tue, 20 Jan 2004 01:02:12 -0500 (EST) Date: Tue, 20 Jan 2004 01:02:12 -0500 (EST) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Craig Rodrigues In-Reply-To: <20040120053945.GA4096@crodrigues.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: sem_wait() is a cancellation point in libkse? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2004 06:02:15 -0000 On Tue, 20 Jan 2004, Craig Rodrigues wrote: > Hi, > > I am trying to learn about pthread cancellation points, > and am reading "Multithreaded Programming with PThreads" by > Bil Lewis. In chapter 10 of this book, it states > that sem_wait() should be implemented as a pthread > cancellation point. > > I am not sure that sem_wait() is implemented as > a cancellation point in libkse. > > I looked again at some of the Linux NPTL tests > which I ported to FreeBSD: > > http://crodrigues.org/freebsd/nptl-tests.tar.gz > > > The tst-cancel12 test seems to be failing. > In this test, a thread is spawned with > pthread_create(), and then soon after > pthread_create(), pthread_cancel() is called > on this thread. > > Inside the thread, sem_wait() is called. > The test is expecting that the thread should > immediately exit at the sem_wait() call because > sem_wait() should be a cancellation point. > However, the thread does not exist after calling > sem_wait(), so the test fails. > > I see that in libkse's thr_sem.c, that there > is a _sem_wait() which looks like it is doing > cancellation stuff, but it doesn't > seem to be working. > > Am I misunderstanding how this should work? libc uses strong symbols for sem_wait which override the weak symbols that libpthread is using. The sem_wait in libc isn't a cancellation point yet. I think the sem_foo stuff in libc should be refactored to just make the system calls (like semop/semctl) and not know about waiting threads. The threads libraries can wrap them if they want to provide cancellation points and faster userland thread switches for (process scope) thread waits/wakeups. In short, we know about this. -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Tue Jan 20 08:48:11 2004 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 7D86516A4CE for ; Tue, 20 Jan 2004 08:48:11 -0800 (PST) Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [204.127.202.56]) by mx1.FreeBSD.org (Postfix) with ESMTP id 906B143D78 for ; Tue, 20 Jan 2004 08:47:44 -0800 (PST) (envelope-from rodrigc@crodrigues.org) Received: from h00609772adf0.ne.client2.attbi.com ([66.31.45.197]) by comcast.net (sccrmhc12) with ESMTP id <20040120164739012002ek81e>; Tue, 20 Jan 2004 16:47:40 +0000 Received: from h00609772adf0.ne.client2.attbi.com (localhost.crodrigues.org [127.0.0.1])i0KGlc7O005173; Tue, 20 Jan 2004 11:47:38 -0500 (EST) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost)i0KGlbXl005172; Tue, 20 Jan 2004 11:47:37 -0500 (EST) (envelope-from rodrigc) Date: Tue, 20 Jan 2004 11:47:37 -0500 From: Craig Rodrigues To: Daniel Eischen Message-ID: <20040120164737.GA778@crodrigues.org> References: <20040120053945.GA4096@crodrigues.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i cc: freebsd-threads@freebsd.org Subject: Re: sem_wait() is a cancellation point in libkse? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2004 16:48:11 -0000 On Tue, Jan 20, 2004 at 01:02:12AM -0500, Daniel Eischen wrote: > > is a _sem_wait() which looks like it is doing > > cancellation stuff, but it doesn't > > seem to be working. > > > libc uses strong symbols for sem_wait which override > the weak symbols that libpthread is using. The sem_wait > in libc isn't a cancellation point yet. I think the > sem_foo stuff in libc should be refactored to just make > the system calls (like semop/semctl) and not know about > waiting threads. The threads libraries can wrap them > if they want to provide cancellation points and faster > userland thread switches for (process scope) thread > waits/wakeups. The thread libraries already seem to wrap sem_wait(). It is in: src/lib/libc_r/uthread/uthread_sem.c src/lib/libthr/thread/thr_sem.c src/lib/libpthread/thread/thr_sem.c sem_wait() in those files is implemented as _sem_wait(), and is a proper cancellation point. Is there anything wrong with making sem_wait() a weak symbol in libc? I tried the following patch, and it works quite nicely, i.e. tst-cancel12 in the NPTL tests now succeeds. --- sem.c.orig Tue Jan 20 11:37:35 2004 +++ sem.c Tue Jan 20 11:44:20 2004 @@ -53,6 +53,8 @@ static LIST_HEAD(, sem) named_sems = LIST_HEAD_INITIALIZER(&named_sems); static pthread_mutex_t named_sems_mtx = PTHREAD_MUTEX_INITIALIZER; +__weak_reference(_sem_wait, sem_wait); + static void sem_free(sem_t sem) { @@ -255,7 +257,7 @@ } int -sem_wait(sem_t *sem) +_sem_wait(sem_t *sem) { int retval; -- Craig Rodrigues http://crodrigues.org rodrigc@crodrigues.org From owner-freebsd-threads@FreeBSD.ORG Wed Jan 21 06:21:39 2004 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 1470D16A4CE for ; Wed, 21 Jan 2004 06:21:39 -0800 (PST) Received: from winston.piwebs.com (217-19-20-186.dsl.cambrium.nl [217.19.20.186]) by mx1.FreeBSD.org (Postfix) with SMTP id 8CD1743D5A for ; Wed, 21 Jan 2004 06:21:37 -0800 (PST) (envelope-from avleeuwen@piwebs.com) Received: (qmail 19371 invoked from network); 21 Jan 2004 14:21:36 -0000 Received: from vincent.piwebs.com (192.168.0.97) by winston.piwebs.com with SMTP; 21 Jan 2004 14:21:36 -0000 From: Arjan van Leeuwen To: threads@freebsd.org Date: Wed, 21 Jan 2004 15:21:35 +0100 User-Agent: KMail/1.5.94 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200401211521.35918.avleeuwen@piwebs.com> Subject: Switching libkse to libpthread X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: avleeuwen@piwebs.com List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2004 14:21:39 -0000 Now that 5.2-RELEASE is out, it looks like the right time to switch libkse to libpthread. Will this happen anytime soon? Arjan From owner-freebsd-threads@FreeBSD.ORG Fri Jan 23 08:52:39 2004 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 B53A916A4CE for ; Fri, 23 Jan 2004 08:52:39 -0800 (PST) Received: from titan.exolab.org (smtp.intalio.com [65.222.219.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 193C643DAA for ; Fri, 23 Jan 2004 08:51:42 -0800 (PST) (envelope-from boisvert@intalio.com) Received: from intalio.com (fwin.intalio.com [65.222.219.17]) by titan.exolab.org (8.11.1/8.11.1) with ESMTP id i0NGngM14414 for ; Fri, 23 Jan 2004 08:49:42 -0800 Message-ID: <40115126.8040106@intalio.com> Date: Fri, 23 Jan 2004 08:51:50 -0800 From: Alex Boisvert User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20040117 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-threads@freebsd.org References: <200401211521.35918.avleeuwen@piwebs.com> In-Reply-To: <200401211521.35918.avleeuwen@piwebs.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: "maxthr" state 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, 23 Jan 2004 16:52:39 -0000 Hi, What does the following "maxthr" state mean? (output from top) PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND 854 boisvert 20 0 432M 36936K maxthr 1 0:06 0.00% 0.00% java Does it mean I'm running into a maximum number of thread limit? If so, how I can increase the number of threads? My application uses a large number of threads and just goes to sleep at some point. I can provide more details or debug output if necessary. TIA, alex From owner-freebsd-threads@FreeBSD.ORG Fri Jan 23 09:05:24 2004 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 293C916A4CE for ; Fri, 23 Jan 2004 09:05:24 -0800 (PST) Received: from titan.exolab.org (smtp.intalio.com [65.222.219.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CEA143D5D for ; Fri, 23 Jan 2004 09:04:18 -0800 (PST) (envelope-from boisvert@intalio.com) Received: from intalio.com (fwin.intalio.com [65.222.219.17]) by titan.exolab.org (8.11.1/8.11.1) with ESMTP id i0NH3fM14490 for ; Fri, 23 Jan 2004 09:03:41 -0800 Message-ID: <4011546D.9010904@intalio.com> Date: Fri, 23 Jan 2004 09:05:49 -0800 From: Alex Boisvert User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20040117 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-threads@freebsd.org References: <200401211521.35918.avleeuwen@piwebs.com> <40115126.8040106@intalio.com> In-Reply-To: <40115126.8040106@intalio.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: "maxthr" state 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, 23 Jan 2004 17:05:24 -0000 Nevermind, I discovered the kernel sysctl "kern.threads.max_threads_per_proc" with default value 150. I bumped the value to 300 and the app runs fine. (We simulate 250 clients with 250 connections or threads, hence the need for a large value...) alex Alex Boisvert wrote: > > Hi, > > What does the following "maxthr" state mean? (output from top) > > PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU > COMMAND > 854 boisvert 20 0 432M 36936K maxthr 1 0:06 0.00% 0.00% java > > Does it mean I'm running into a maximum number of thread limit? If > so, how I can increase the number of threads? > > My application uses a large number of threads and just goes to sleep > at some point. I can provide more details or debug output if necessary. > > TIA, > alex > > > _______________________________________________ > 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 Fri Jan 23 15:23:17 2004 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 6DC7E16A4CE for ; Fri, 23 Jan 2004 15:23:17 -0800 (PST) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 91CB943D8D for ; Fri, 23 Jan 2004 15:22:19 -0800 (PST) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (rwcrmhc12) with ESMTP id <200401232322170140088lpge>; Fri, 23 Jan 2004 23:22:17 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id PAA42369; Fri, 23 Jan 2004 15:22:18 -0800 (PST) Date: Fri, 23 Jan 2004 15:22:17 -0800 (PST) From: Julian Elischer To: Alex Boisvert In-Reply-To: <40115126.8040106@intalio.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: "maxthr" state 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, 23 Jan 2004 23:23:17 -0000 which threading package are you using? On Fri, 23 Jan 2004, Alex Boisvert wrote: > > Hi, > > What does the following "maxthr" state mean? (output from top) > > PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND > 854 boisvert 20 0 432M 36936K maxthr 1 0:06 0.00% 0.00% java > > Does it mean I'm running into a maximum number of thread limit? If so, > how I can increase the number of threads? > > My application uses a large number of threads and just goes to sleep at > some point. I can provide more details or debug output if necessary. > > TIA, > alex > > > _______________________________________________ > 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 Fri Jan 23 15:26:23 2004 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 A4BBA16A4CE for ; Fri, 23 Jan 2004 15:26:23 -0800 (PST) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id DACA343D8A for ; Fri, 23 Jan 2004 15:25:34 -0800 (PST) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (rwcrmhc12) with ESMTP id <20040123232519014006sllme>; Fri, 23 Jan 2004 23:25:19 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id PAA42421; Fri, 23 Jan 2004 15:25:21 -0800 (PST) Date: Fri, 23 Jan 2004 15:25:19 -0800 (PST) From: Julian Elischer To: Alex Boisvert In-Reply-To: <4011546D.9010904@intalio.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: "maxthr" state 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, 23 Jan 2004 23:26:23 -0000 On Fri, 23 Jan 2004, Alex Boisvert wrote: > > Nevermind, I discovered the kernel sysctl > "kern.threads.max_threads_per_proc" with default value 150. I bumped > the value to 300 and the app runs fine. (We simulate 250 clients with > 250 connections or threads, hence the need for a large value...) yes, the number could be made bigger but we didn't want to make it too easy for wildly out-of-control threadded programs to kill the system while the threading system is still "young".. > > alex > > Alex Boisvert wrote: > > > > > Hi, > > > > What does the following "maxthr" state mean? (output from top) > > > > PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU > > COMMAND > > 854 boisvert 20 0 432M 36936K maxthr 1 0:06 0.00% 0.00% java > > > > Does it mean I'm running into a maximum number of thread limit? If > > so, how I can increase the number of threads? > > > > My application uses a large number of threads and just goes to sleep > > at some point. I can provide more details or debug output if necessary. > > > > TIA, > > alex > > > > > > _______________________________________________ > > 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" > > > > _______________________________________________ > 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" >