From owner-freebsd-threads@FreeBSD.ORG Mon Jan 5 11:07:01 2009 Return-Path: Delivered-To: freebsd-threads@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D279106566B for ; Mon, 5 Jan 2009 11:07:01 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1A5F28FC14 for ; Mon, 5 Jan 2009 11:07:01 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n05B70RI002952 for ; Mon, 5 Jan 2009 11:07:00 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n05B70fc002948 for freebsd-threads@FreeBSD.org; Mon, 5 Jan 2009 11:07:00 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 5 Jan 2009 11:07:00 GMT Message-Id: <200901051107.n05B70fc002948@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-threads@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-threads@FreeBSD.org X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 11:07:01 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o threa/129956 threads Threaded process stuck in "vmopar" state, other in "uf o threa/128922 threads threads hang with xorg running o threa/128180 threads pthread_cond_broadcast(3) lost wakeup o threa/127225 threads bug in lib/libthr/thread/thr_init.c o threa/122923 threads 'nice' does not prevent background process from steali o threa/121336 threads lang/neko threading ok on UP, broken on SMP (FreeBSD 7 o threa/118715 threads kse problem o threa/116668 threads can no longer use jdk15 with libthr on -stable SMP o threa/116181 threads /dev/io-related io access permissions are not propagat o threa/115211 threads pthread_atfork misbehaves in initial thread o threa/110636 threads [request] gdb(1): using gdb with multi thread applicat o threa/110306 threads apache 2.0 segmentation violation when calling gethost o threa/103975 threads Implicit loading/unloading of libpthread.so may crash o threa/101323 threads [patch] fork(2) in threaded programs broken. s threa/100815 threads FBSD 5.5 broke nanosleep in libc_r s threa/94467 threads send(), sendto() and sendmsg() are not correct in libc s threa/84483 threads problems with devel/nspr and -lc_r on 4.x o threa/83914 threads [libc] popen() doesn't work in static threaded program o threa/80992 threads abort() sometimes not caught by gdb depending on threa o threa/80435 threads panic on high loads o threa/79887 threads [patch] freopen() isn't thread-safe o threa/79683 threads svctcp_create() fails if multiple threads call at the s threa/76694 threads fork cause hang in dup()/close() function in child (-l s threa/76690 threads fork hang in child for -lc_r o threa/75374 threads pthread_kill() ignores SA_SIGINFO flag o threa/75273 threads FBSD 5.3 libpthread (KSE) bug o threa/72953 threads fork() unblocks blocked signals w/o PTHREAD_SCOPE_SYST o threa/70975 threads [sysvipc] unexpected and unreliable behaviour when usi s threa/69020 threads pthreads library leaks _gc_mutex s threa/49087 threads Signals lost in programs linked with libc_r s threa/48856 threads Setting SIGCHLD to SIG_IGN still leaves zombies under s threa/40671 threads pthread_cancel doesn't remove thread from condition qu s threa/39922 threads [threads] [patch] Threaded applications executed with s threa/37676 threads libc_r: msgsnd(), msgrcv(), pread(), pwrite() need wra s threa/34536 threads accept() blocks other threads s threa/32295 threads [libc_r] [patch] pthread(3) dont dequeue signals s threa/30464 threads pthread mutex attributes -- pshared s threa/24632 threads libc_r delicate deviation from libc in handling SIGCHL s threa/24472 threads libc_r does not honor SO_SNDTIMEO/SO_RCVTIMEO socket o 39 problems total. From owner-freebsd-threads@FreeBSD.ORG Thu Jan 8 01:10:03 2009 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41BFD106566C for ; Thu, 8 Jan 2009 01:10:03 +0000 (UTC) (envelope-from craig@animalhead.com) Received: from animalhead.com (animalhead.com [198.66.255.31]) by mx1.freebsd.org (Postfix) with ESMTP id 292308FC1B for ; Thu, 8 Jan 2009 01:10:02 +0000 (UTC) (envelope-from craig@animalhead.com) Received: from [192.168.0.4] (pool-71-116-115-15.snfcca.dsl-w.verizon.net [71.116.115.15]) (authenticated bits=0) by animalhead.com (8.13.6.20060614/8.13.6) with ESMTP id n080hMAB039432 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Wed, 7 Jan 2009 16:43:23 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v753.1) Content-Transfer-Encoding: 7bit Message-Id: <9F36BDB2-36D4-4941-BD05-36D2CC5C77AB@animalhead.com> Content-Type: text/plain; charset=US-ASCII; format=flowed To: freebsd-threads@freebsd.org From: craig@animalhead.com Date: Wed, 7 Jan 2009 16:43:16 -0800 X-Mailer: Apple Mail (2.753.1) Subject: ThreadsPerChild in Apache2 vs THR in top using Event MPM X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 01:10:03 -0000 This is more of an Apache question than a FreeBSD question, but I've received no response from enquiries to the users@httpd list. Perhaps someone receiving from this list will be able to help? Our server is running Apache 2.2.11 with the Event MPM under FreeBSD 6.3, on a site that's largely mod_perl2 driven. ThreadsPerChild is specified as 25 in an include file of httpd.conf. The documentation of the Worker MPM (which is said to have the same configuration characteristics as Event) states that each child process creates threads when it starts, and never changes the number of threads. But the THR column of the 'top' utility shows 11 threads per process. Is 'top' just wrong, or is something constraining how many threads are being created? Might my Internet Hosting Provider have built FreeBSD with some such constraint? How can I get more data? The only way I know to ask Apache about its threads configuration is the Apache2::MPM->query facility. Using this facility for all of the values noted in the Apache2::Const documentation yields: MPMQ_MAX_DAEMON_USED(1) = -1 MPMQ_IS_THREADED(2) = 1 MPMQ_IS_FORKED(3) = 2 MPMQ_HARD_LIMIT_DAEMONS(4) = 16 MPMQ_HARD_LIMIT_THREADS(5) = 64 MPMQ_MAX_THREADS(6) = 25 MPMQ_MIN_SPARE_DAEMONS(7) = 0 MPMQ_MIN_SPARE_THREADS(8) = 25 MPMQ_MAX_SPARE_DAEMONS(9) = 0 MPMQ_MAX_SPARE_THREADS(10) = 150 MPMQ_MAX_REQUESTS_DAEMON(11) = 0 MPMQ_MAX_DAEMONS(12) = 10 MPMQ_MAX_THREADS has the same value as ThreadsPerChild, but its name suggests that this number is a maximum. Does this imply that this number may not be created as a child process starts? Help will be much appreciated, cmac www.animalhead.com From owner-freebsd-threads@FreeBSD.ORG Thu Jan 8 01:47:26 2009 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7B711065673 for ; Thu, 8 Jan 2009 01:47:26 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id C79EF8FC17 for ; Thu, 8 Jan 2009 01:47:26 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 104881A3C39; Wed, 7 Jan 2009 17:29:42 -0800 (PST) Date: Wed, 7 Jan 2009 17:29:41 -0800 From: Alfred Perlstein To: craig@animalhead.com Message-ID: <20090108012941.GX60686@elvis.mu.org> References: <9F36BDB2-36D4-4941-BD05-36D2CC5C77AB@animalhead.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9F36BDB2-36D4-4941-BD05-36D2CC5C77AB@animalhead.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-threads@freebsd.org Subject: Re: ThreadsPerChild in Apache2 vs THR in top using Event MPM X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 01:47:27 -0000 I think 6.3 uses "libkse" which is N:M threads library, so top(1) can't know how many user threads there are, just kernel threads. Do this: ldd /path/to/httpd If you see libpthread, you're using "kse" and won't see the exact number of threads. -Alfred * craig@animalhead.com [090107 17:10] wrote: > This is more of an Apache question than a FreeBSD question, but I've > received no response from enquiries to the users@httpd list. Perhaps > someone receiving from this list will be able to help? > > Our server is running Apache 2.2.11 with the Event MPM under FreeBSD > 6.3, on a site that's largely mod_perl2 driven. > > ThreadsPerChild is specified as 25 in an include file of httpd.conf. > > The documentation of the Worker MPM (which is said to have the same > configuration characteristics as Event) states that each child process > creates threads when it starts, and never changes the > number of threads. > > But the THR column of the 'top' utility shows 11 threads per process. > Is 'top' just wrong, or is something constraining how many threads are > being created? Might my Internet Hosting Provider have built FreeBSD > with some such constraint? How can I get more data? > > The only way I know to ask Apache about its threads configuration > is the Apache2::MPM->query facility. Using this facility for all of > the values noted in the Apache2::Const documentation yields: > > MPMQ_MAX_DAEMON_USED(1) = -1 > MPMQ_IS_THREADED(2) = 1 > MPMQ_IS_FORKED(3) = 2 > MPMQ_HARD_LIMIT_DAEMONS(4) = 16 > MPMQ_HARD_LIMIT_THREADS(5) = 64 > MPMQ_MAX_THREADS(6) = 25 > MPMQ_MIN_SPARE_DAEMONS(7) = 0 > MPMQ_MIN_SPARE_THREADS(8) = 25 > MPMQ_MAX_SPARE_DAEMONS(9) = 0 > MPMQ_MAX_SPARE_THREADS(10) = 150 > MPMQ_MAX_REQUESTS_DAEMON(11) = 0 > MPMQ_MAX_DAEMONS(12) = 10 > > MPMQ_MAX_THREADS has the same value as ThreadsPerChild, but > its name suggests that this number is a maximum. Does this imply > that this number may not be created as a child process starts? > > Help will be much appreciated, > cmac > www.animalhead.com > > _______________________________________________ > 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" -- - Alfred Perlstein From owner-freebsd-threads@FreeBSD.ORG Thu Jan 8 02:04:45 2009 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 213A11065678 for ; Thu, 8 Jan 2009 02:04:45 +0000 (UTC) (envelope-from prvs=julian=25242c0f6@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id E057C8FC21 for ; Thu, 8 Jan 2009 02:04:44 +0000 (UTC) (envelope-from prvs=julian=25242c0f6@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.46]) by smtp-outbound.ironport.com with ESMTP; 07 Jan 2009 17:36:19 -0800 Message-ID: <49655892.1010500@elischer.org> Date: Wed, 07 Jan 2009 17:36:18 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: craig@animalhead.com References: <9F36BDB2-36D4-4941-BD05-36D2CC5C77AB@animalhead.com> In-Reply-To: <9F36BDB2-36D4-4941-BD05-36D2CC5C77AB@animalhead.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-threads@freebsd.org Subject: Re: ThreadsPerChild in Apache2 vs THR in top using Event MPM X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 02:04:45 -0000 craig@animalhead.com wrote: > This is more of an Apache question than a FreeBSD question, but I've > received no response from enquiries to the users@httpd list. Perhaps > someone receiving from this list will be able to help? > > Our server is running Apache 2.2.11 with the Event MPM under FreeBSD > 6.3, on a site that's largely mod_perl2 driven. It depends on which threading library you are using if you see (in top -H) threads waiting in kserel tehn you are using the M:N library, where not every thread in the process makes a kernel thread until it's needed. if you link with libthr instead (see man libmap) you may see different results. (and performance) libthr is the default in 7.x. > > ThreadsPerChild is specified as 25 in an include file of httpd.conf. > > The documentation of the Worker MPM (which is said to have the same > configuration characteristics as Event) states that each child process > creates threads when it starts, and never changes the > number of threads. > > But the THR column of the 'top' utility shows 11 threads per process. > Is 'top' just wrong, or is something constraining how many threads are > being created? Might my Internet Hosting Provider have built FreeBSD > with some such constraint? How can I get more data? > > The only way I know to ask Apache about its threads configuration > is the Apache2::MPM->query facility. Using this facility for all of > the values noted in the Apache2::Const documentation yields: > > MPMQ_MAX_DAEMON_USED(1) = -1 > MPMQ_IS_THREADED(2) = 1 > MPMQ_IS_FORKED(3) = 2 > MPMQ_HARD_LIMIT_DAEMONS(4) = 16 > MPMQ_HARD_LIMIT_THREADS(5) = 64 > MPMQ_MAX_THREADS(6) = 25 > MPMQ_MIN_SPARE_DAEMONS(7) = 0 > MPMQ_MIN_SPARE_THREADS(8) = 25 > MPMQ_MAX_SPARE_DAEMONS(9) = 0 > MPMQ_MAX_SPARE_THREADS(10) = 150 > MPMQ_MAX_REQUESTS_DAEMON(11) = 0 > MPMQ_MAX_DAEMONS(12) = 10 > > MPMQ_MAX_THREADS has the same value as ThreadsPerChild, but > its name suggests that this number is a maximum. Does this imply > that this number may not be created as a child process starts? > > Help will be much appreciated, > cmac > www.animalhead.com > > _______________________________________________ > 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 Thu Jan 8 15:36:08 2009 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5171A106564A for ; Thu, 8 Jan 2009 15:36:08 +0000 (UTC) (envelope-from craig@animalhead.com) Received: from animalhead.com (animalhead.com [198.66.255.31]) by mx1.freebsd.org (Postfix) with ESMTP id 3811F8FC08 for ; Thu, 8 Jan 2009 15:36:08 +0000 (UTC) (envelope-from craig@animalhead.com) Received: from [192.168.0.4] (pool-71-116-115-15.snfcca.dsl-w.verizon.net [71.116.115.15]) (authenticated bits=0) by animalhead.com (8.13.6.20060614/8.13.6) with ESMTP id n08Fa6h7078909 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Thu, 8 Jan 2009 07:36:07 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v753.1) In-Reply-To: <20090108012941.GX60686@elvis.mu.org> References: <9F36BDB2-36D4-4941-BD05-36D2CC5C77AB@animalhead.com> <20090108012941.GX60686@elvis.mu.org> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <61799EAA-1065-443D-812B-5EAFE0643229@animalhead.com> Content-Transfer-Encoding: 7bit From: craig@animalhead.com Date: Thu, 8 Jan 2009 07:36:00 -0800 To: freebsd-threads@freebsd.org X-Mailer: Apple Mail (2.753.1) Subject: Re: ThreadsPerChild in Apache2 vs THR in top using Event MPM X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 15:36:08 -0000 Thank you both for replying. Yes they wait in kserel and yes libpthread is shown in the ldd output. Is there anything written anywhere on the M:N mechanism? Particularly something that would tell me 1) whether the number of kernel threads (11) is derived from the number of user threads (25), or if not, what controls it? 2) should I adjust the ThreadsPerChild number from 25 given this environment? Thanks again, cmac www.animalhead.com On Jan 7, 2009, at 5:36 PM, Julian Elischer wrote: > > It depends on which threading library you are using > if you see (in top -H) threads waiting in kserel > tehn you are using the M:N library, where not every thread in the > process makes a kernel thread until it's needed. > if you link with libthr instead (see man libmap) > you may see different results. (and performance) > libthr is the default in 7.x. > On Jan 7, 2009, at 5:29 PM, Alfred Perlstein wrote: > I think 6.3 uses "libkse" which is N:M threads library, so top(1) > can't know how many user threads there are, just kernel threads. > > Do this: > ldd /path/to/httpd > > If you see libpthread, you're using "kse" and won't see the exact > number of threads. > From owner-freebsd-threads@FreeBSD.ORG Thu Jan 8 18:40:21 2009 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AE3B10656C2 for ; Thu, 8 Jan 2009 18:40:21 +0000 (UTC) (envelope-from prvs=julian=25242c0f6@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id F1ED68FC1A for ; Thu, 8 Jan 2009 18:40:20 +0000 (UTC) (envelope-from prvs=julian=25242c0f6@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.63]) by smtp-outbound.ironport.com with ESMTP; 08 Jan 2009 10:40:20 -0800 Message-ID: <49664892.40602@elischer.org> Date: Thu, 08 Jan 2009 10:40:18 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: craig@animalhead.com References: <9F36BDB2-36D4-4941-BD05-36D2CC5C77AB@animalhead.com> <20090108012941.GX60686@elvis.mu.org> <61799EAA-1065-443D-812B-5EAFE0643229@animalhead.com> In-Reply-To: <61799EAA-1065-443D-812B-5EAFE0643229@animalhead.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-threads@freebsd.org Subject: Re: ThreadsPerChild in Apache2 vs THR in top using Event MPM X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 18:40:25 -0000 craig@animalhead.com wrote: > Thank you both for replying. Yes they wait in kserel > and yes libpthread is shown in the ldd output. > > Is there anything written anywhere on the M:N mechanism? > Particularly something that would tell me > > 1) whether the number of kernel threads (11) is derived > from the number of user threads (25), or if not, what > controls it? The 11 is made up of: the number of threads actually waiting in the kernel for input, plus the extra signal thread plus one that is waiting to be woken up as it has no work plus, depending on a number of factors one or two more. Threads that are waiting in userland for a condition variable will not show up at all as they have no kernel resources allocated. > > 2) should I adjust the ThreadsPerChild number from 25 > given this environment? no > > Thanks again, > cmac > www.animalhead.com > > On Jan 7, 2009, at 5:36 PM, Julian Elischer wrote: >> >> It depends on which threading library you are using >> if you see (in top -H) threads waiting in kserel >> tehn you are using the M:N library, where not every thread in the >> process makes a kernel thread until it's needed. >> if you link with libthr instead (see man libmap) >> you may see different results. (and performance) >> libthr is the default in 7.x. >> > > On Jan 7, 2009, at 5:29 PM, Alfred Perlstein wrote: > >> I think 6.3 uses "libkse" which is N:M threads library, so top(1) >> can't know how many user threads there are, just kernel threads. >> >> Do this: >> ldd /path/to/httpd >> >> If you see libpthread, you're using "kse" and won't see the exact >> number of threads. >> > _______________________________________________ > 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"