From owner-freebsd-threads@FreeBSD.ORG Mon Aug 15 11:02:02 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C13516A428 for ; Mon, 15 Aug 2005 11:02:02 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C172343D45 for ; Mon, 15 Aug 2005 11:02:01 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7FB21Qf007675 for ; Mon, 15 Aug 2005 11:02:01 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7FB201s007669 for freebsd-threads@freebsd.org; Mon, 15 Aug 2005 11:02:00 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 15 Aug 2005 11:02:00 GMT Message-Id: <200508151102.j7FB201s007669@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-threads@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Aug 2005 11:02:02 -0000 Current FreeBSD problem reports Critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2005/01/26] threads/76690threads fork hang in child for (-lc_r & -lthr) o [2005/05/11] threads/80887threads ULE with SMP broke libpthread/libthr on 5 2 problems total. Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/07/18] kern/20016 threads pthreads: Cannot set scheduling timer/Can o [2000/08/26] kern/20861 threads libc_r does not honor socket timeouts o [2001/01/20] threads/24472threads libc_r does not honor SO_SNDTIMEO/SO_RCVT o [2001/01/25] threads/24632threads libc_r delicate deviation from libc in ha o [2001/01/25] kern/24641 threads pthread_rwlock_rdlock can deadlock o [2001/11/26] bin/32295 threads pthread dont dequeue signals o [2002/02/01] threads/34536threads accept() blocks other threads o [2002/05/25] kern/38549 threads the procces compiled whith pthread stoppe o [2002/06/27] threads/39922threads [PATCH?] Threaded applications executed w o [2002/08/04] kern/41331 threads Pthread library open sets O_NONBLOCK flag o [2003/03/02] threads/48856threads Setting SIGCHLD to SIG_IGN still leaves z o [2003/03/10] threads/49087threads Signals lost in programs linked with libc s [2004/03/15] kern/64313 threads FreeBSD (OpenBSD) pthread implicit set/un o [2004/08/26] threads/70975threads unexpected and unreliable behaviour when o [2004/09/14] threads/71725threads Mysql Crashes frequently giving Sock Erro o [2004/10/05] threads/72353threads Assertion fails in /usr/src/lib/libpthrea o [2004/10/07] threads/72429threads threads blocked in stdio (fgets, etc) are o [2004/10/21] threads/72953threads fork() unblocks blocked signals w/o PTHRE o [2004/12/19] threads/75273threads FBSD 5.3 libpthread (KSE) bug o [2004/12/21] threads/75374threads pthread_kill() ignores SA_SIGINFO flag o [2005/01/26] threads/76694threads fork cause hang in dup()/close() function o [2005/03/10] threads/78660threads Java hangs unkillably in STOP state after o [2005/04/08] threads/79683threads svctcp_create() fails if multiple threads o [2005/04/28] threads/80435threads panic on high loads o [2005/05/19] threads/81258threads Thread specific data is sometimes assigne o [2005/08/02] threads/84483threads problems with devel/nspr and -lc_r on 4.x 26 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/05/26] kern/18824 threads gethostbyname is not thread safe o [2000/06/13] kern/19247 threads uthread_sigaction.c does not do anything o [2000/10/21] kern/22190 threads A threaded read(2) from a socketpair(2) f o [2001/09/09] threads/30464threads pthread mutex attributes -- pshared o [2002/05/02] threads/37676threads libc_r: msgsnd(), msgrcv(), pread(), pwri s [2002/07/16] threads/40671threads pthread_cancel doesn't remove thread from o [2004/07/13] threads/69020threads pthreads library leaks _gc_mutex o [2004/09/21] threads/71966threads Mlnet Core Dumped : Fatal error '_pq_inse o [2004/11/21] threads/74180threads KSE problem. Applications those riched ma o [2005/01/20] threads/76513threads libpthread is not working o [2005/04/13] threads/79887threads [patch] freopen() isn't thread-safe o [2005/05/13] threads/80992threads abort() sometimes not caught by gdb depen o [2005/05/26] threads/81534threads [PATCH] libc_r close() will fail on any f 13 problems total. From owner-freebsd-threads@FreeBSD.ORG Wed Aug 17 16:18:10 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 19E9D16A41F for ; Wed, 17 Aug 2005 16:18:10 +0000 (GMT) (envelope-from ghelmer@palisadesys.com) Received: from magellan.palisadesys.com (magellan.palisadesys.com [192.188.162.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC12B43D45 for ; Wed, 17 Aug 2005 16:18:09 +0000 (GMT) (envelope-from ghelmer@palisadesys.com) Received: from [172.16.1.108] (cetus.palisadesys.com [192.188.162.7]) (authenticated bits=0) by magellan.palisadesys.com (8.12.11/8.12.11) with ESMTP id j7HGHrFv080332; Wed, 17 Aug 2005 11:17:55 -0500 (CDT) (envelope-from ghelmer@palisadesys.com) Message-ID: <43036330.9000501@palisadesys.com> Date: Wed, 17 Aug 2005 11:17:52 -0500 From: Guy Helmer User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Julian Elischer References: <42D691F2.3030201@palisadesys.com> <42D6BA3E.1000306@elischer.org> <42D7BBB8.9050207@palisadesys.com> <42D8199E.1060702@elischer.org> In-Reply-To: <42D8199E.1060702@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Palisade-MailScanner-Information: Please contact the ISP for more information X-Palisade-MailScanner: Found to be clean X-MailScanner-From: ghelmer@palisadesys.com Cc: freebsd-threads@freebsd.org Subject: Re: system scope threads entering STOP state X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2005 16:18:10 -0000 Julian Elischer wrote: > Guy Helmer wrote: > >> Julian Elischer wrote: >> >>> Guy Helmer wrote: >>> >>>> I have a long-running multithreaded process on FreeBSD 5.4 (SMP, >>>> PREEMTPION, SCHED_4BSD) linked with libpthread and I'm creating the >>>> threads with attribute PTHREAD_SCOPE_SYSTEM. The threads need to >>>> be processing input in near-real-time or its input buffers overflow. >>>> >>>> I've modified the program so that a thread can fork/execl/waitpid >>>> (without WNOHANG) to use an external program for further processing >>>> on a batch of input (sometimes via a pipe, other times via writing >>>> to a file). However, even under a light input load, the program is >>>> now dropping input. While running top(1) in thread mode, I >>>> occasionally find all the program's threads are in the STOP state >>>> for several consecutive seconds. Is there anything related to the >>>> frequent use of fork, execve, or wait4 that would be likely to >>>> cause such a situation? I'm not seeing anything obvious in my >>>> reading of the kernel sources. >>> >>> duirng a fork the parent process is in a variant of the "STOPPED" >>> state, or, rather, if you >>> look at top -H you should see that all teh threads except for that >>> doing the fork, are in >>> the STOPPED state. >>> >>> This is because while a thread is forking the process needs to be >>> single threaded so that >>> there is a consistent image to be copied to teh child. >>> >>> the single threaded state is also enterred for exit() and execve(), >>> though that should not affect your program. >>> >>> I can't imagine why the state would persist for any length of time, >>> unless there is another thread >>> that is in an uninterruptible wait. In that case the other threads >>> have to wait for it to complete >>> what it is doing and come back. I have considerred whether such a >>> thread should not be considerred >>> "already suspended" and in fact some earlier versions of the code >>> did that, however it leads to some >>> inconsistancies and the danger that such a thread will be suspended >>> holding some resource >>> that it should not hold for any length of time. >> >> Thanks for the explanation. I was [aware] that the other threads >> would be stopped during a fork(2) but it looked to me like the STOP >> would be brief. >> Would an "uninterruptible wait" include system calls like a write(2) >> of a large buffer? That would explain it... > > it's hard to say.. Possibly yes, if it had to allocate buffer space. > However this is a question for > others.. > > Is it possible to duplicate this on request? [where did the past month go?] I think I found the culprit - I think the process in question was actually dumping core and it is a large process - between 50MB and 100MB - so that would explain the 10+ seconds all the threads were in the STOP state. It was difficult to notice while running top(1) since a watchdog process immediately restarts the multi-threaded process if it exits due to things like segfaults, and I was paying attention to the state column, not the PID column. Sorry for what was a bit of a wild-goose chase, Guy -- Guy Helmer, Ph.D. Principal System Architect Palisade Systems, Inc. From owner-freebsd-threads@FreeBSD.ORG Wed Aug 17 21:26:23 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F01C516A41F; Wed, 17 Aug 2005 21:26:23 +0000 (GMT) (envelope-from alfred@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC4F543D49; Wed, 17 Aug 2005 21:26:23 +0000 (GMT) (envelope-from alfred@FreeBSD.org) Received: from freefall.freebsd.org (alfred@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7HLQNf9084019; Wed, 17 Aug 2005 21:26:23 GMT (envelope-from alfred@freefall.freebsd.org) Received: (from alfred@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7HLQN26084015; Wed, 17 Aug 2005 21:26:23 GMT (envelope-from alfred) Date: Wed, 17 Aug 2005 21:26:23 GMT From: Alfred Perlstein Message-Id: <200508172126.j7HLQN26084015@freefall.freebsd.org> To: alfred@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-threads@freebsd.org Cc: Subject: Re: threads/84778: libpthread busy loop/hang with Java when handling signals and Runtime.exec X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2005 21:26:24 -0000 Synopsis: libpthread busy loop/hang with Java when handling signals and Runtime.exec Responsible-Changed-From-To: freebsd-bugs->freebsd-threads@freebsd.org Responsible-Changed-By: alfred Responsible-Changed-When: Wed Aug 17 21:25:24 GMT 2005 Responsible-Changed-Why: By request of PR author move responsible party to freebsd-threads@freebsd.org http://www.freebsd.org/cgi/query-pr.cgi?pr=84778 From owner-freebsd-threads@FreeBSD.ORG Wed Aug 17 22:22:38 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 036C216A41F; Wed, 17 Aug 2005 22:22:38 +0000 (GMT) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B281043D46; Wed, 17 Aug 2005 22:22:37 +0000 (GMT) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7HMMbZY091181; Wed, 17 Aug 2005 22:22:37 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7HMMbsS091177; Wed, 17 Aug 2005 22:22:37 GMT (envelope-from linimon) Date: Wed, 17 Aug 2005 22:22:37 GMT From: Mark Linimon Message-Id: <200508172222.j7HMMbsS091177@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-threads@freebsd.org, freebsd-thread@FreeBSD.org Cc: Subject: Re: threads/84778: libpthread busy loop/hang with Java when handling signals and Runtime.exec X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2005 22:22:38 -0000 Synopsis: libpthread busy loop/hang with Java when handling signals and Runtime.exec Responsible-Changed-From-To: freebsd-threads@freebsd.org->freebsd-thread Responsible-Changed-By: linimon Responsible-Changed-When: Wed Aug 17 22:22:24 GMT 2005 Responsible-Changed-Why: Canonicalize assignment. http://www.freebsd.org/cgi/query-pr.cgi?pr=84778 From owner-freebsd-threads@FreeBSD.ORG Wed Aug 17 22:25:26 2005 Return-Path: X-Original-To: freebsd-threads@hub.freebsd.org 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 42D6916A423; Wed, 17 Aug 2005 22:25:26 +0000 (GMT) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB12B43D48; Wed, 17 Aug 2005 22:25:25 +0000 (GMT) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7HMPPm5091246; Wed, 17 Aug 2005 22:25:25 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7HMPPL2091242; Wed, 17 Aug 2005 22:25:25 GMT (envelope-from linimon) Date: Wed, 17 Aug 2005 22:25:25 GMT From: Mark Linimon Message-Id: <200508172225.j7HMPPL2091242@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-thread@FreeBSD.org, freebsd-threads@FreeBSD.org Cc: Subject: Re: threads/84778: libpthread busy loop/hang with Java when handling signals and Runtime.exec X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2005 22:25:26 -0000 Synopsis: libpthread busy loop/hang with Java when handling signals and Runtime.exec Responsible-Changed-From-To: freebsd-thread->freebsd-threads Responsible-Changed-By: linimon Responsible-Changed-When: Wed Aug 17 22:25:13 GMT 2005 Responsible-Changed-Why: sigh. http://www.freebsd.org/cgi/query-pr.cgi?pr=84778 From owner-freebsd-threads@FreeBSD.ORG Thu Aug 18 16:29:45 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3316B16A41F for ; Thu, 18 Aug 2005 16:29:45 +0000 (GMT) (envelope-from gpt@tirloni.org) Received: from srv-03.bs2.com.br (srv-03.bs2.com.br [200.203.183.32]) by mx1.FreeBSD.org (Postfix) with ESMTP id C28E343D49 for ; Thu, 18 Aug 2005 16:29:44 +0000 (GMT) (envelope-from gpt@tirloni.org) Received: from localhost (localhost.bs2.com.br [127.0.0.1]) by srv-03.bs2.com.br (Postfix) with ESMTP id 8CB474AEDC for ; Thu, 18 Aug 2005 13:30:27 -0300 (BRT) Received: from [172.16.12.102] (unknown [201.14.55.139]) by srv-03.bs2.com.br (Postfix) with ESMTP id 244424AE99 for ; Thu, 18 Aug 2005 13:30:27 -0300 (BRT) Message-ID: <4304B76D.9030205@tirloni.org> Date: Thu, 18 Aug 2005 13:29:33 -0300 From: "Giovanni P. Tirloni" User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050808) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-threads@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: pthread_create: cannot allocate memory 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, 18 Aug 2005 16:29:45 -0000 Hi, I coded a small echo server that creates a thread for every connection it accepts. It works fine and then I decided to test how many threads it could handle so I coded a stress.c client program that'd just create as many connections as I asked without exchanging any data. First I discovered the kern.threads.max_thread_per_proc limit that was limiting it to 1500 threads. So I raised it and the max_group_per_proc to 10k. I also increased the NMBCLUSTERS limit to 65535 just in case. What I've seen is that the server stops at 2400-2410 threads when I ask strees.c to create 8k connections. top shows I still have 150MB of free memory. Where should I look to raise this limit ? This is a CeleronM 1.3GHz and 512MB of RAM. Another behavior was that it creates 130 threads at once, waits, then another 130 more. It varies 1-10 threads sometimes but usually this inverval is constant. I think it might have something to do with the TCP code doing some normal limitation but I've look at it. Thanks, -- Giovanni P. Tirloni / gpt@tirloni.org From owner-freebsd-threads@FreeBSD.ORG Fri Aug 19 05:10:12 2005 Return-Path: X-Original-To: freebsd-threads@hub.freebsd.org 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 0C85A16A41F for ; Fri, 19 Aug 2005 05:10:12 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C18443D48 for ; Fri, 19 Aug 2005 05:10:11 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7J5ABfK037179 for ; Fri, 19 Aug 2005 05:10:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7J5ABxb037178; Fri, 19 Aug 2005 05:10:11 GMT (envelope-from gnats) Resent-Date: Fri, 19 Aug 2005 05:10:11 GMT Resent-Message-Id: <200508190510.j7J5ABxb037178@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-threads@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Nick Johnson Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 60DB216A41F for ; Fri, 19 Aug 2005 05:07:08 +0000 (GMT) (envelope-from root@turing.morons.org) Received: from mail.morons.org (morons.org [64.147.161.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id D442043D91 for ; Fri, 19 Aug 2005 05:07:03 +0000 (GMT) (envelope-from root@turing.morons.org) Received: by turing.morons.org (Postfix, from userid 0) id E24F31701D; Wed, 17 Aug 2005 10:52:57 -0700 (PDT) Message-Id: <20050817175257.E24F31701D@turing.morons.org> Date: Wed, 17 Aug 2005 10:52:57 -0700 (PDT) From: Nick Johnson To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: threads/85112: Resource temporarily unavailable reading from sockets with Java/libpthread/jdbc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Nick Johnson List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2005 05:10:12 -0000 >Number: 85112 >Category: threads >Synopsis: Resource temporarily unavailable reading from sockets with Java/libpthread/jdbc >Confidential: no >Severity: critical >Priority: medium >Responsible: freebsd-threads >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Aug 19 05:10:08 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Nick Johnson >Release: FreeBSD 5.4-STABLE i386 >Organization: morons.org >Environment: System: FreeBSD turing.morons.org 5.4-STABLE FreeBSD 5.4-STABLE #4: Mon Aug 15 21:22:19 PDT 2005 root@turing.morons.org:/usr/src/sys/i386/compile/TURING i386 Java 1.4.2-p7 built from ports Postgresql 8.0.3 built from ports; however still using the Postgresql 7.4 JDBC driver >Description: When attempting to get a database connection with Java linked to libpthread, a socket exception is thrown: java.net.SocketException: Resource temporarily unavailable at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:183) at java.io.BufferedInputStream.read(BufferedInputStream.java:201) at org.postgresql.PG_Stream.ReceiveChar(PG_Stream.java:139) at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:190) at org.postgresql.Driver.connect(Driver.java:122) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:193) at net.spatula.news.Utils.getJDBCconnection(Utils.java:816) Here is the code from getJDBCconnection, verbatim, including ugliness just for fun... public static synchronized Connection getJDBCconnection() { try { Class.forName("org.postgresql.Driver"); } catch (Exception e) { e.printStackTrace(); } int retryCount = 5; while (retryCount >0) { try { //XXX database name and username should be properties String dbURL = "jdbc:postgresql://"+ getProperty("spatula.dbhost")+":"+ getProperty("spatula.dbport")+"/morons.org?user=www&password="+ getProperty("spatula.dbpass"); Connection c = DriverManager.getConnection(dbURL); // <--- this is line 816 return c; } catch (Exception e) { e.printStackTrace(); } retryCount--; try { Thread.sleep(200 + (int)(Math.random()*50.0)); } catch (Exception e) {} } return null; } This fails every time when java links against libpthread and works every time when it is linked against libc_r. I'm not entirely sure, but this may have started showing itself after I added this to /etc/make.conf: CPUTYPE?=i686 CFLAGS=-O2 -pipe or it may be totally unrelated. See also threads/84778 (http://www.freebsd.org/cgi/query-pr.cgi?pr=84778) which was previously preventing me from getting far enough to make a database connection. (Once the class files were compiled with a process linked against libc_r, they were in place for a process linked against libpthread to use.) >How-To-Repeat: Try to get a database connection. >Fix: Workaround is to configure the linker to use libc_r for all Java processes in /etc/libmap.conf: [/usr/local/jdk1.4.2/] libpthread.so.1 libc_r.so.5 libpthread.so libc_r.so >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-threads@FreeBSD.ORG Fri Aug 19 14:04:55 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9582F16A420; Fri, 19 Aug 2005 14:04:55 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6B2C43D5A; Fri, 19 Aug 2005 14:04:54 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.4/8.13.4/NETPLEX) with ESMTP id j7JE4o61007243; Fri, 19 Aug 2005 10:04:51 -0400 (EDT) Date: Fri, 19 Aug 2005 10:04:50 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Nick Johnson In-Reply-To: <20050817175257.E24F31701D@turing.morons.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: FreeBSD-gnats-submit@freebsd.org, freebsd-threads@freebsd.org Subject: Re: threads/85112: Resource temporarily unavailable reading from sockets with Java/libpthread/jdbc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2005 14:04:55 -0000 On Wed, 17 Aug 2005, Nick Johnson wrote: > > This fails every time when java links against libpthread and works every time > when it is linked against libc_r. > > I'm not entirely sure, but this may have started showing itself after I added > this to /etc/make.conf: > > CPUTYPE?=i686 > CFLAGS=-O2 -pipe > > or it may be totally unrelated. See also threads/84778 > (http://www.freebsd.org/cgi/query-pr.cgi?pr=84778) which was previously > preventing me from getting far enough to make a database connection. (Once > the class files were compiled with a process linked against libc_r, they were > in place for a process linked against libpthread to use.) Please either try removing CPUTYPE or sending this to -java. Ad far as I know, getting a connection to a database is just a connect(), which we know works fine. -- DE From owner-freebsd-threads@FreeBSD.ORG Fri Aug 19 14:10:21 2005 Return-Path: X-Original-To: freebsd-threads@hub.freebsd.org 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 A1C1D16A41F for ; Fri, 19 Aug 2005 14:10:21 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7028E43D48 for ; Fri, 19 Aug 2005 14:10:21 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7JEALNr006596 for ; Fri, 19 Aug 2005 14:10:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7JEAL39006595; Fri, 19 Aug 2005 14:10:21 GMT (envelope-from gnats) Date: Fri, 19 Aug 2005 14:10:21 GMT Message-Id: <200508191410.j7JEAL39006595@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Daniel Eischen Cc: Subject: Re: threads/85112: Resource temporarily unavailable reading from sockets with Java/libpthread/jdbc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2005 14:10:21 -0000 The following reply was made to PR threads/85112; it has been noted by GNATS. From: Daniel Eischen To: Nick Johnson Cc: FreeBSD-gnats-submit@freebsd.org, Subject: Re: threads/85112: Resource temporarily unavailable reading from sockets with Java/libpthread/jdbc Date: Fri, 19 Aug 2005 10:04:50 -0400 (EDT) On Wed, 17 Aug 2005, Nick Johnson wrote: > > This fails every time when java links against libpthread and works every time > when it is linked against libc_r. > > I'm not entirely sure, but this may have started showing itself after I added > this to /etc/make.conf: > > CPUTYPE?=i686 > CFLAGS=-O2 -pipe > > or it may be totally unrelated. See also threads/84778 > (http://www.freebsd.org/cgi/query-pr.cgi?pr=84778) which was previously > preventing me from getting far enough to make a database connection. (Once > the class files were compiled with a process linked against libc_r, they were > in place for a process linked against libpthread to use.) Please either try removing CPUTYPE or sending this to -java. Ad far as I know, getting a connection to a database is just a connect(), which we know works fine. -- DE From owner-freebsd-threads@FreeBSD.ORG Fri Aug 19 15:00:41 2005 Return-Path: X-Original-To: freebsd-threads@hub.freebsd.org 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 7556516A41F for ; Fri, 19 Aug 2005 15:00:41 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3053043D45 for ; Fri, 19 Aug 2005 15:00:41 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7JF0f3A008877 for ; Fri, 19 Aug 2005 15:00:41 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7JF0fV0008876; Fri, 19 Aug 2005 15:00:41 GMT (envelope-from gnats) Date: Fri, 19 Aug 2005 15:00:41 GMT Message-Id: <200508191500.j7JF0fV0008876@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Nick Johnson Cc: Subject: Re: threads/85112: Resource temporarily unavailable reading from sockets with Java/libpthread/jdbc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Nick Johnson List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2005 15:00:41 -0000 The following reply was made to PR threads/85112; it has been noted by GNATS. From: Nick Johnson To: bug-followup@FreeBSD.org Cc: Subject: Re: threads/85112: Resource temporarily unavailable reading from sockets with Java/libpthread/jdbc Date: Fri, 19 Aug 2005 07:52:40 -0700 (PDT) The problem is happening during a socket read, not during connect (see the stack trace). The connect is definitely working; it causes postgres to spawn processes to handle the requests... but a database connection is far more than just a connect. There are credentials to exchange, database names to give, etc. From owner-freebsd-threads@FreeBSD.ORG Fri Aug 19 18:05:53 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 393D716A41F for ; Fri, 19 Aug 2005 18:05:53 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0BAE43D49 for ; Fri, 19 Aug 2005 18:05:52 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.4/8.13.4/NETPLEX) with ESMTP id j7JI5nrH022193; Fri, 19 Aug 2005 14:05:49 -0400 (EDT) Date: Fri, 19 Aug 2005 14:05:49 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Nick Johnson In-Reply-To: <200508191500.j7JF0fV0008876@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: freebsd-threads@freebsd.org Subject: Re: threads/85112: Resource temporarily unavailable reading from sockets with Java/libpthread/jdbc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2005 18:05:53 -0000 On Fri, 19 Aug 2005, Nick Johnson wrote: > The following reply was made to PR threads/85112; it has been noted by GNATS. > > From: Nick Johnson > To: bug-followup@FreeBSD.org > Cc: > Subject: Re: threads/85112: Resource temporarily unavailable reading from > sockets with Java/libpthread/jdbc > Date: Fri, 19 Aug 2005 07:52:40 -0700 (PDT) > > The problem is happening during a socket read, not during connect (see the > stack trace). Whatever. Unless you can produce a C program to show the problem, you should report this to -java. There is no magic in connect(), read(), write(), open(), socket(), whatever in libpthread. > The connect is definitely working; it causes postgres to spawn processes > to handle the requests... but a database connection is far more than just > a connect. There are credentials to exchange, database names to give, > etc. -- DE From owner-freebsd-threads@FreeBSD.ORG Fri Aug 19 18:35:14 2005 Return-Path: X-Original-To: threads@FreeBSD.org Delivered-To: freebsd-threads@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 702D316A41F; Fri, 19 Aug 2005 18:35:14 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from viefep18-int.chello.at (viefep18-int.chello.at [213.46.255.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 554D543D45; Fri, 19 Aug 2005 18:35:13 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at ([213.47.85.26]) by viefep18-int.chello.at (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20050819183511.CWWY17761.viefep18-int.chello.at@wombat.fafoe.narf.at>; Fri, 19 Aug 2005 20:35:11 +0200 Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id 65811F6; Fri, 19 Aug 2005 20:35:10 +0200 (CEST) Date: Fri, 19 Aug 2005 20:35:10 +0200 From: Stefan Farfeleder To: Bruce Evans Message-ID: <20050819183507.GE77069@wombat.fafoe.narf.at> Mail-Followup-To: Bruce Evans , standards@FreeBSD.org, threads@FreeBSD.org References: <20050819093649.GU21905@wombat.fafoe.narf.at> <20050819231640.E2640@epsplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050819231640.E2640@epsplex.bde.org> User-Agent: Mutt/1.5.9i Cc: threads@FreeBSD.org, standards@FreeBSD.org Subject: Re: includes X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2005 18:35:14 -0000 [threads@ added] On Sat, Aug 20, 2005 at 12:04:56AM +1000, Bruce Evans wrote: > On Fri, 19 Aug 2005, Stefan Farfeleder wrote: > > >I think some of the headers included by violate the POSIX > >specification (I'm looking at SUSv3/POSIX 1003.1 2004) by making more > >symbols visible than allowed. > > > > Ok > > Ok > > Ok > > No? (POSIX allows which is a subset) ^^^^^^ Actually POSIX kind of requires the inclusion of (and ). At least all symbols must be visible. > > No? > > No? > > Ok > > > >Is this correct? Should it be fixed? > > All of these includes except and are > wrong IMO: > > needed, but can be obtained as a side effect > of including almost any other header in the list. > only used to declare size_t. We handle this better > in many other headers. The old draft of POSIX that > I'm looking at doesn't say that declares > size_t, so it might be conformant to use __size_t > in the prototypes. Removed, size_t is obtained via . > Ok > only used to declare sigset_t and struct timespec. > We have a whole header, , to help > declare sigset_t better (it only declares > __sigset_t), > and use it in many other headers. We have 2 headers, > and , just to > declare struct timespec, and use them in many other > headers. Here we only need a forward declaration of > struct timespec or maybe struct __timespec, modulo > POSIX bugs. It is a bug in POSIX that is > allowed. The old draft of POSIX doesn't say that > declares sigset_t or struct timespec > (just that it may declare the latter). This is > unlike what it says for other headers. E.g., we > use in to satisfy > the POSIX mistake that a complete struct timespec > must be declared there. I've include (for __uint32_t) and instead. timespec is declared through . > Just namespace pollution. We need MINSIGSTKSZ from though. The patch includes that header instead and protects its usage with __XSI_VISIBLE. I'm not happy with this, maybe MINSIGSTKSZ should be moved somewhere else? > Just namespace pollution. is included instead and __ULONG_MAX is used. > only used to declare struct sched_param and to > satisfy a POSIX mistake. A forward declaration > would suffice. Left because POSIX says so. The patch for is at http://people.freebsd.org/~stefanf/pthread.h.diff . There are a few files that need , , etc symbols and get them by inclusion, the patch at http://people.freebsd.org/~stefanf/pthread.h-2.diff fixes that. It should probably be committed anyway. Stefan From owner-freebsd-threads@FreeBSD.ORG Fri Aug 19 19:33:40 2005 Return-Path: X-Original-To: threads@FreeBSD.org Delivered-To: freebsd-threads@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB01616A46F; Fri, 19 Aug 2005 19:33:39 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from viefep13-int.chello.at (viefep13-int.chello.at [213.46.255.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id C872143D46; Fri, 19 Aug 2005 19:33:38 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at ([213.47.85.26]) by viefep13-int.chello.at (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20050819193336.JDT26435.viefep13-int.chello.at@wombat.fafoe.narf.at>; Fri, 19 Aug 2005 21:33:36 +0200 Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id 716CC2FF; Fri, 19 Aug 2005 21:33:35 +0200 (CEST) Date: Fri, 19 Aug 2005 21:33:35 +0200 From: Stefan Farfeleder To: standards@FreeBSD.org, threads@FreeBSD.org Message-ID: <20050819193333.GF77069@wombat.fafoe.narf.at> Mail-Followup-To: standards@FreeBSD.org, threads@FreeBSD.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="VS++wcV0S1rZb1Fb" Content-Disposition: inline User-Agent: Mutt/1.5.9i Cc: Subject: /2 X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2005 19:33:41 -0000 --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, any objections to this patch? It moves the identifiers starting with MUTEX_ into the BSD namespace. Stefan --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pthread.h-3.diff" Index: src/include/pthread.h =================================================================== RCS file: /b/ncvs/src/include/pthread.h,v retrieving revision 1.37 diff -u -r1.37 pthread.h --- src/include/pthread.h 19 Aug 2005 08:37:16 -0000 1.37 +++ src/include/pthread.h 19 Aug 2005 19:23:37 -0000 @@ -130,12 +133,15 @@ PTHREAD_MUTEX_ERRORCHECK = 1, /* Default POSIX mutex */ PTHREAD_MUTEX_RECURSIVE = 2, /* Recursive mutex */ PTHREAD_MUTEX_NORMAL = 3, /* No error checking */ - MUTEX_TYPE_MAX + PTHREAD_MUTEX_TYPE_MAX }; #define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_ERRORCHECK +#if __BSD_VISIBLE #define MUTEX_TYPE_FAST PTHREAD_MUTEX_NORMAL #define MUTEX_TYPE_COUNTING_FAST PTHREAD_MUTEX_RECURSIVE +#define MUTEX_TYPE_MAX PTHREAD_MUTEX_TYPE_MAX +#endif /* * Thread function prototype definitions: --VS++wcV0S1rZb1Fb-- From owner-freebsd-threads@FreeBSD.ORG Fri Aug 19 19:42:36 2005 Return-Path: X-Original-To: threads@freebsd.org Delivered-To: freebsd-threads@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 32EA616A41F; Fri, 19 Aug 2005 19:42:36 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id B45C243D48; Fri, 19 Aug 2005 19:42:35 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.4/8.13.4/NETPLEX) with ESMTP id j7JJgYti001772; Fri, 19 Aug 2005 15:42:34 -0400 (EDT) Date: Fri, 19 Aug 2005 15:42:34 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Stefan Farfeleder In-Reply-To: <20050819193333.GF77069@wombat.fafoe.narf.at> Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/Mixed; BOUNDARY=VS++wcV0S1rZb1Fb Content-ID: Content-Disposition: INLINE X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: threads@freebsd.org, standards@freebsd.org Subject: Re: /2 X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2005 19:42:36 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --VS++wcV0S1rZb1Fb Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: Content-Disposition: INLINE On Fri, 19 Aug 2005, Stefan Farfeleder wrote: > Hi, > > any objections to this patch? It moves the identifiers starting with > MUTEX_ into the BSD namespace. Looks fine to me. I don't even think we should have MUTEX_* around anyways. -- Dan --VS++wcV0S1rZb1Fb Content-Type: TEXT/PLAIN; CHARSET=us-ascii Content-ID: Content-Description: Content-Disposition: ATTACHMENT; FILENAME="pthread.h-3.diff" Index: src/include/pthread.h =================================================================== RCS file: /b/ncvs/src/include/pthread.h,v retrieving revision 1.37 diff -u -r1.37 pthread.h --- src/include/pthread.h 19 Aug 2005 08:37:16 -0000 1.37 +++ src/include/pthread.h 19 Aug 2005 19:23:37 -0000 @@ -130,12 +133,15 @@ PTHREAD_MUTEX_ERRORCHECK = 1, /* Default POSIX mutex */ PTHREAD_MUTEX_RECURSIVE = 2, /* Recursive mutex */ PTHREAD_MUTEX_NORMAL = 3, /* No error checking */ - MUTEX_TYPE_MAX + PTHREAD_MUTEX_TYPE_MAX }; #define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_ERRORCHECK +#if __BSD_VISIBLE #define MUTEX_TYPE_FAST PTHREAD_MUTEX_NORMAL #define MUTEX_TYPE_COUNTING_FAST PTHREAD_MUTEX_RECURSIVE +#define MUTEX_TYPE_MAX PTHREAD_MUTEX_TYPE_MAX +#endif /* * Thread function prototype definitions: --VS++wcV0S1rZb1Fb Content-Type: TEXT/PLAIN; CHARSET=us-ascii Content-ID: Content-Description: Content-Disposition: INLINE _______________________________________________ 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" --VS++wcV0S1rZb1Fb-- From owner-freebsd-threads@FreeBSD.ORG Fri Aug 19 20:38:19 2005 Return-Path: X-Original-To: threads@freebsd.org Delivered-To: freebsd-threads@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C0BC16A41F; Fri, 19 Aug 2005 20:38:19 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from viefep18-int.chello.at (viefep18-int.chello.at [213.46.255.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C4EBC43D49; Fri, 19 Aug 2005 20:38:17 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at ([213.47.85.26]) by viefep18-int.chello.at (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20050819203815.FSIM17761.viefep18-int.chello.at@wombat.fafoe.narf.at>; Fri, 19 Aug 2005 22:38:15 +0200 Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id 092432FF; Fri, 19 Aug 2005 22:38:14 +0200 (CEST) Date: Fri, 19 Aug 2005 22:38:14 +0200 From: Stefan Farfeleder To: Daniel Eischen Message-ID: <20050819203807.GG77069@wombat.fafoe.narf.at> Mail-Followup-To: Daniel Eischen , threads@freebsd.org, standards@freebsd.org References: <20050819193333.GF77069@wombat.fafoe.narf.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i Cc: threads@freebsd.org, standards@freebsd.org Subject: Re: /2 X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2005 20:38:19 -0000 On Fri, Aug 19, 2005 at 03:42:34PM -0400, Daniel Eischen wrote: > On Fri, 19 Aug 2005, Stefan Farfeleder wrote: > > > any objections to this patch? It moves the identifiers starting with > > MUTEX_ into the BSD namespace. > > Looks fine to me. I don't even think we should have MUTEX_* > around anyways. But we had those names for quite a while and maybe there are applications using them, that's why I provided the compatibility macros. Stefan From owner-freebsd-threads@FreeBSD.ORG Fri Aug 19 21:12:50 2005 Return-Path: X-Original-To: threads@freebsd.org Delivered-To: freebsd-threads@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CAA1416A420; Fri, 19 Aug 2005 21:12:50 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id B86CC43D46; Fri, 19 Aug 2005 21:12:49 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.4/8.13.4/NETPLEX) with ESMTP id j7JLCmuB025327; Fri, 19 Aug 2005 17:12:48 -0400 (EDT) Date: Fri, 19 Aug 2005 17:12:48 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Stefan Farfeleder In-Reply-To: <20050819203807.GG77069@wombat.fafoe.narf.at> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: threads@freebsd.org, standards@freebsd.org Subject: Re: /2 X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2005 21:12:51 -0000 On Fri, 19 Aug 2005, Stefan Farfeleder wrote: > On Fri, Aug 19, 2005 at 03:42:34PM -0400, Daniel Eischen wrote: > > On Fri, 19 Aug 2005, Stefan Farfeleder wrote: > > > > > any objections to this patch? It moves the identifiers starting with > > > MUTEX_ into the BSD namespace. > > > > Looks fine to me. I don't even think we should have MUTEX_* > > around anyways. > > But we had those names for quite a while and maybe there are > applications using them, that's why I provided the compatibility macros. Yes, but you wouldn't break ABI by removing them (I'd advocate doing this in -current). -- DE From owner-freebsd-threads@FreeBSD.ORG Fri Aug 19 21:32:51 2005 Return-Path: X-Original-To: threads@freebsd.org Delivered-To: freebsd-threads@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 338D516A41F; Fri, 19 Aug 2005 21:32:51 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from viefep17-int.chello.at (viefep17-int.chello.at [213.46.255.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id D98A543D46; Fri, 19 Aug 2005 21:32:49 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at ([213.47.85.26]) by viefep17-int.chello.at (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20050819213248.ENNH1234.viefep17-int.chello.at@wombat.fafoe.narf.at>; Fri, 19 Aug 2005 23:32:48 +0200 Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id A06732FF; Fri, 19 Aug 2005 23:32:46 +0200 (CEST) Date: Fri, 19 Aug 2005 23:32:46 +0200 From: Stefan Farfeleder To: Daniel Eischen Message-ID: <20050819213244.GH77069@wombat.fafoe.narf.at> Mail-Followup-To: Daniel Eischen , threads@freebsd.org, standards@freebsd.org References: <20050819203807.GG77069@wombat.fafoe.narf.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i Cc: threads@freebsd.org, standards@freebsd.org Subject: Re: /2 X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2005 21:32:51 -0000 On Fri, Aug 19, 2005 at 05:12:48PM -0400, Daniel Eischen wrote: > On Fri, 19 Aug 2005, Stefan Farfeleder wrote: > > > On Fri, Aug 19, 2005 at 03:42:34PM -0400, Daniel Eischen wrote: > > > On Fri, 19 Aug 2005, Stefan Farfeleder wrote: > > > > > > > any objections to this patch? It moves the identifiers starting with > > > > MUTEX_ into the BSD namespace. > > > > > > Looks fine to me. I don't even think we should have MUTEX_* > > > around anyways. > > > > But we had those names for quite a while and maybe there are > > applications using them, that's why I provided the compatibility macros. > > Yes, but you wouldn't break ABI by removing them (I'd advocate > doing this in -current). Okay, gone it is ;) From owner-freebsd-threads@FreeBSD.ORG Sat Aug 20 05:48:35 2005 Return-Path: X-Original-To: threads@FreeBSD.org Delivered-To: freebsd-threads@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A4C016A41F; Sat, 20 Aug 2005 05:48:35 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id D35A843D45; Sat, 20 Aug 2005 05:48:34 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86]) by mailout1.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id j7K5mXJT030470; Sat, 20 Aug 2005 15:48:33 +1000 Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id j7K5mV27011478; Sat, 20 Aug 2005 15:48:32 +1000 Date: Sat, 20 Aug 2005 15:48:31 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Stefan Farfeleder In-Reply-To: <20050819183507.GE77069@wombat.fafoe.narf.at> Message-ID: <20050820151252.L60332@delplex.bde.org> References: <20050819093649.GU21905@wombat.fafoe.narf.at> <20050819231640.E2640@epsplex.bde.org> <20050819183507.GE77069@wombat.fafoe.narf.at> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: threads@FreeBSD.org, standards@FreeBSD.org Subject: Re: includes X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2005 05:48:35 -0000 On Fri, 19 Aug 2005, Stefan Farfeleder wrote: > On Sat, Aug 20, 2005 at 12:04:56AM +1000, Bruce Evans wrote: >> On Fri, 19 Aug 2005, Stefan Farfeleder wrote: >> >>> I think some of the headers included by violate the POSIX >>> specification (I'm looking at SUSv3/POSIX 1003.1 2004) by making more >>> symbols visible than allowed. >>> >>> Ok >>> Ok >>> Ok >>> No? (POSIX allows which is a subset) > ^^^^^^ > Actually POSIX kind of requires the inclusion of (and > ). At least all symbols must be visible. Urk. This seems to be the place in POSIX where namespace pollution is explictly required. According to an old draft: %%% 10351 Inclusion of the header shall make symbols defined in the headers and 10352 visible. %%% Everywhere else, POSIX permits both broken and non-broken implementations by saying "may make visible". The history of this is interesting: %%% 10408 IEEE PASC Interpretation 1003.1 #86 is applied, allowing the symbols from and 10409 to be made visible when is included. Previously this was an XSI 10410 extension. %%% The weasels who wrote "may" were apparently not present when this was interpreted :-). %%% 10411 IEEE PASC Interpretation 1003.1c #42 is applied, removing the requirement for prototypes for 10412 the pthread_kill ( ) and pthread_sigmask( ) functions. These are required to be in the 10413 header. They are allowed here through the name space rules. %%% sigset_t apparently isn't required here either. >> needed, but can be obtained as a side effect >> of including almost any other header in the list. >> only used to declare size_t. We handle this better >> in many other headers. The old draft of POSIX that >> I'm looking at doesn't say that declares >> size_t, so it might be conformant to use __size_t >> in the prototypes. > > Removed, size_t is obtained via . OK. >> ... >> only used to declare sigset_t and struct timespec. >> We have a whole header, , to help >> declare sigset_t better (it only declares >> __sigset_t), > ... > I've include (for __uint32_t) and > instead. timespec is declared through . Too bad. >> Just namespace pollution. > > We need MINSIGSTKSZ from though. The patch includes > that header instead and protects its usage with __XSI_VISIBLE. I'm not > happy with this, maybe MINSIGSTKSZ should be moved somewhere else? MINSIGSTKSZ is used to define PTHREAD_STACK_MIN. I didn't notice this partly because the old version that I looked at correctly defiens PTHREAD_STACK_MIN as a constant. Everything is wrong here: - POSIX requires PTHREAD_STACK_MIN to be defined (if at all) in but not in . - PTHREAD_STACK_MIN must be defined as a number (if at all even if XSI is no visible. >> Just namespace pollution. > > is included instead and __ULONG_MAX is used. __ULONG_MAX is used to define PTHREAD_THREADS_MAX. POSIX actually requires the latter to be defined (if at all) in only too. I doubt that the limit is actually 2^64-1. Maybe it should be a runtime limit _SC_THREAD* are missing, so apparently no one ever asks for the runtime limits. >> only used to declare struct sched_param and to >> satisfy a POSIX mistake. A forward declaration >> would suffice. > > Left because POSIX says so. Not too bad. > The patch for is at > http://people.freebsd.org/~stefanf/pthread.h.diff . > > There are a few files that need , , etc symbols and > get them by inclusion, the patch at > http://people.freebsd.org/~stefanf/pthread.h-2.diff fixes that. It > should probably be committed anyway. An alarming number. We shouldn't need so many new includes of , Bruce From owner-freebsd-threads@FreeBSD.ORG Sat Aug 20 08:16:56 2005 Return-Path: X-Original-To: threads@FreeBSD.org Delivered-To: freebsd-threads@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A56C16A41F; Sat, 20 Aug 2005 08:16:56 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from viefep17-int.chello.at (viefep17-int.chello.at [213.46.255.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id DBEC843D45; Sat, 20 Aug 2005 08:16:54 +0000 (GMT) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at ([213.47.85.26]) by viefep17-int.chello.at (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20050820081652.NMUC1234.viefep17-int.chello.at@wombat.fafoe.narf.at>; Sat, 20 Aug 2005 10:16:52 +0200 Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id BAF5C2FF; Sat, 20 Aug 2005 10:16:52 +0200 (CEST) Date: Sat, 20 Aug 2005 10:16:52 +0200 From: Stefan Farfeleder To: Bruce Evans Message-ID: <20050820081649.GA85488@wombat.fafoe.narf.at> Mail-Followup-To: Bruce Evans , threads@FreeBSD.org, standards@FreeBSD.org References: <20050819093649.GU21905@wombat.fafoe.narf.at> <20050819231640.E2640@epsplex.bde.org> <20050819183507.GE77069@wombat.fafoe.narf.at> <20050820151252.L60332@delplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050820151252.L60332@delplex.bde.org> User-Agent: Mutt/1.5.9i Cc: threads@FreeBSD.org, standards@FreeBSD.org Subject: Re: includes X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2005 08:16:56 -0000 On Sat, Aug 20, 2005 at 03:48:31PM +1000, Bruce Evans wrote: > On Fri, 19 Aug 2005, Stefan Farfeleder wrote: > > >On Sat, Aug 20, 2005 at 12:04:56AM +1000, Bruce Evans wrote: > >>On Fri, 19 Aug 2005, Stefan Farfeleder wrote: > >> > >>>I think some of the headers included by violate the POSIX > >>>specification (I'm looking at SUSv3/POSIX 1003.1 2004) by making more > >>>symbols visible than allowed. > >>> > >>> Ok > >>> Ok > >>> Ok > >>> No? (POSIX allows which is a subset) > > ^^^^^^ > >Actually POSIX kind of requires the inclusion of (and > >). At least all symbols must be visible. > > Urk. This seems to be the place in POSIX where namespace pollution is > explictly required. According to an old draft: > > %%% > 10351 Inclusion of the header shall make symbols > defined in the headers and > 10352 visible. > %%% That's what I have here too. [...] > >>... > >> only used to declare sigset_t and struct timespec. > >> We have a whole header, , to help > >> declare sigset_t better (it only declares > >> __sigset_t), > >... > >I've include (for __uint32_t) and > >instead. timespec is declared through . > > Too bad. Do you have a better suggestion? > >> Just namespace pollution. > > > >We need MINSIGSTKSZ from though. The patch includes > >that header instead and protects its usage with __XSI_VISIBLE. I'm not > >happy with this, maybe MINSIGSTKSZ should be moved somewhere else? > > MINSIGSTKSZ is used to define PTHREAD_STACK_MIN. I didn't notice this > partly because the old version that I looked at correctly defiens > PTHREAD_STACK_MIN as a constant. Everything is wrong here: > - POSIX requires PTHREAD_STACK_MIN to be defined (if at all) in > but not in . > - PTHREAD_STACK_MIN must be defined as a number (if at all even if > XSI is no visible. I agree that is missing the PTHREAD_{DESTRUCTOR_ITERATIONS,KEYS_MAX,STACK_MIN,THREADS_MAX} macros. It's not an error for to define them because POSIX reserves pthread_* and PTHREAD_* for this header. I'm not sure why MINSIGSTKSZ (which expands to const * 4 on all architectures) is not a constant. What do you think about putting __MINSIGSTKSZ in ? > >> Just namespace pollution. > > > > is included instead and __ULONG_MAX is used. > > __ULONG_MAX is used to define PTHREAD_THREADS_MAX. POSIX actually requires > the latter to be defined (if at all) in only too. I doubt > that the limit is actually 2^64-1. Maybe it should be a runtime limit > _SC_THREAD* are missing, so apparently no one ever asks for the runtime > limits. Which _SC_THREAD* is missing? Calling sysconf() with _SC_THREAD_THREADS_MAX is buggy because sysconf converts ULONG_MAX to a long. Stefan From owner-freebsd-threads@FreeBSD.ORG Sat Aug 20 10:57:44 2005 Return-Path: X-Original-To: threads@FreeBSD.org Delivered-To: freebsd-threads@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 181B216A41F; Sat, 20 Aug 2005 10:57:44 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A7BF43D48; Sat, 20 Aug 2005 10:57:43 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86]) by mailout1.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id j7KAvfQU015609; Sat, 20 Aug 2005 20:57:41 +1000 Received: from epsplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id j7KAvd2k002091; Sat, 20 Aug 2005 20:57:40 +1000 Date: Sat, 20 Aug 2005 20:57:39 +1000 (EST) From: Bruce Evans X-X-Sender: bde@epsplex.bde.org To: Stefan Farfeleder In-Reply-To: <20050820081649.GA85488@wombat.fafoe.narf.at> Message-ID: <20050820204228.T2739@epsplex.bde.org> References: <20050819093649.GU21905@wombat.fafoe.narf.at> <20050819231640.E2640@epsplex.bde.org> <20050819183507.GE77069@wombat.fafoe.narf.at> <20050820151252.L60332@delplex.bde.org> <20050820081649.GA85488@wombat.fafoe.narf.at> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: threads@FreeBSD.org, standards@FreeBSD.org Subject: Re: includes X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2005 10:57:44 -0000 On Sat, 20 Aug 2005, Stefan Farfeleder wrote: > On Sat, Aug 20, 2005 at 03:48:31PM +1000, Bruce Evans wrote: >> On Fri, 19 Aug 2005, Stefan Farfeleder wrote: >> >>> On Sat, Aug 20, 2005 at 12:04:56AM +1000, Bruce Evans wrote: >>>> only used to declare sigset_t and struct timespec. >>>> We have a whole header, , to help >>>> declare sigset_t better (it only declares >>>> __sigset_t), >>> ... >>> I've include (for __uint32_t) and >>> instead. timespec is declared through . >> >> Too bad. > > Do you have a better suggestion? No. It's too late to change POSIX. >>>> Just namespace pollution. >>> >>> We need MINSIGSTKSZ from though. The patch includes >>> that header instead and protects its usage with __XSI_VISIBLE. I'm not >>> happy with this, maybe MINSIGSTKSZ should be moved somewhere else? >> >> MINSIGSTKSZ is used to define PTHREAD_STACK_MIN. I didn't notice this >> partly because the old version that I looked at correctly defiens >> PTHREAD_STACK_MIN as a constant. Everything is wrong here: >> - POSIX requires PTHREAD_STACK_MIN to be defined (if at all) in >> but not in . >> - PTHREAD_STACK_MIN must be defined as a number (if at all even if >> XSI is no visible. > > I agree that is missing the > PTHREAD_{DESTRUCTOR_ITERATIONS,KEYS_MAX,STACK_MIN,THREADS_MAX} macros. > It's not an error for to define them because POSIX > reserves pthread_* and PTHREAD_* for this header. I's not useful either, since non-broken applications still need to include (or use sysconf()). > I'm not sure why MINSIGSTKSZ (which expands to const * 4 on all > architectures) is not a constant. It's fairly machine-dependent. const * 8 would make more sense on the 64-bit arches but the const is not always the same even with that scaling. > > What do you think about putting __MINSIGSTKSZ in ? OK. >>>> Just namespace pollution. >>> >>> is included instead and __ULONG_MAX is used. >> >> __ULONG_MAX is used to define PTHREAD_THREADS_MAX. POSIX actually requires >> the latter to be defined (if at all) in only too. I doubt >> that the limit is actually 2^64-1. Maybe it should be a runtime limit >> _SC_THREAD* are missing, so apparently no one ever asks for the runtime >> limits. > > Which _SC_THREAD* is missing? Calling sysconf() with > _SC_THREAD_THREADS_MAX is buggy because sysconf converts ULONG_MAX to a > long. Er, none. I grepped the wrong headers (only , but _SC_THREAD* is in and sysconf(3) on _SC_THREAD* never reaches the kernel). Bruce From owner-freebsd-threads@FreeBSD.ORG Sat Aug 20 14:50:20 2005 Return-Path: X-Original-To: freebsd-threads@hub.freebsd.org 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 DE4CC16A420 for ; Sat, 20 Aug 2005 14:50:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 91B4343D49 for ; Sat, 20 Aug 2005 14:50:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7KEoKH2092727 for ; Sat, 20 Aug 2005 14:50:20 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7KEoK3O092726; Sat, 20 Aug 2005 14:50:20 GMT (envelope-from gnats) Date: Sat, 20 Aug 2005 14:50:20 GMT Message-Id: <200508201450.j7KEoK3O092726@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Nick Johnson Cc: Subject: Re: threads/85112: Resource temporarily unavailable reading from sockets with Java/libpthread/jdbc X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Nick Johnson List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2005 14:50:21 -0000 The following reply was made to PR threads/85112; it has been noted by GNATS. From: Nick Johnson To: bug-followup@FreeBSD.org Cc: Subject: Re: threads/85112: Resource temporarily unavailable reading from sockets with Java/libpthread/jdbc Date: Sat, 20 Aug 2005 07:48:31 -0700 (PDT) Wouldn't you know that as soon as I tried to duplicate the trouble again so I could truss or ktrace it, it stopped happening entirely. What -was- causing a problem nearly 100% of the time has now gone to not causing trouble at all. Unfortunately I can't keep running with libpthread because of threads/84778, so I can't wait to see if the trouble surfaces again. It may have been a fluke or just the way the box was configured that day. (I've been moving sites from another box to this one, and in the process there have been any number of hostname/DNS changes.) Nick -- "The aptly-named morons.org is an obscenity-laced screed..." -- Robert P. Lockwood, Catholic League director of research Nick Johnson, version 2.1 http://web.morons.org/ From owner-freebsd-threads@FreeBSD.ORG Sat Aug 20 15:50:44 2005 Return-Path: X-Original-To: threads@freebsd.org Delivered-To: freebsd-threads@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F2B216A420 for ; Sat, 20 Aug 2005 15:50:44 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: from nic.ach.sch.gr (nic.sch.gr [194.63.238.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3BA6C43D49 for ; Sat, 20 Aug 2005 15:50:42 +0000 (GMT) (envelope-from keramida@freebsd.org) Received: (qmail 22831 invoked by uid 207); 20 Aug 2005 15:50:41 -0000 Received: from keramida@freebsd.org by nic by uid 201 with qmail-scanner-1.21 (sophie: 3.04/2.19/3.81. Clear:RC:1(81.186.70.44):. Processed in 4.068902 secs); 20 Aug 2005 15:50:41 -0000 Received: from dialup44.ach.sch.gr (HELO gothmog.gr) ([81.186.70.44]) (envelope-sender ) by nic.sch.gr (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 20 Aug 2005 15:50:37 -0000 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.4/8.13.4) with ESMTP id j7KFoJoY001126; Sat, 20 Aug 2005 18:50:19 +0300 (EEST) (envelope-from keramida@freebsd.org) Received: (from giorgos@localhost) by gothmog.gr (8.13.4/8.13.4/Submit) id j7KFoJFk001125; Sat, 20 Aug 2005 18:50:19 +0300 (EEST) (envelope-from keramida@freebsd.org) Date: Sat, 20 Aug 2005 18:50:19 +0300 From: Giorgos Keramidas To: Bruce Evans , threads@freebsd.org, standards@freebsd.org Message-ID: <20050820155018.GD796@gothmog.gr> References: <20050819093649.GU21905@wombat.fafoe.narf.at> <20050819231640.E2640@epsplex.bde.org> <20050819183507.GE77069@wombat.fafoe.narf.at> <20050820151252.L60332@delplex.bde.org> <20050820081649.GA85488@wombat.fafoe.narf.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050820081649.GA85488@wombat.fafoe.narf.at> Cc: Subject: Re: includes X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2005 15:50:44 -0000 On 2005-08-20 10:16, Stefan Farfeleder wrote: > > >> only used to declare sigset_t and struct timespec. > > >> We have a whole header, , to help > > >> declare sigset_t better (it only declares > > >> __sigset_t), > > >... > > >I've include (for __uint32_t) and > > >instead. timespec is declared through . > > > > Too bad. > > Do you have a better suggestion? Stefan, we already have , unless I have misunderstood you and Bruce. From owner-freebsd-threads@FreeBSD.ORG Sat Aug 20 16:40:17 2005 Return-Path: X-Original-To: freebsd-threads@hub.freebsd.org 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 98E2916A41F for ; Sat, 20 Aug 2005 16:40:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E74B443D49 for ; Sat, 20 Aug 2005 16:40:16 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7KGeG8b006210 for ; Sat, 20 Aug 2005 16:40:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7KGeGd8006209; Sat, 20 Aug 2005 16:40:16 GMT (envelope-from gnats) Resent-Date: Sat, 20 Aug 2005 16:40:16 GMT Resent-Message-Id: <200508201640.j7KGeGd8006209@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-threads@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Pascal Hofstee Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A849916A41F for ; Sat, 20 Aug 2005 16:32:39 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 69E4643D46 for ; Sat, 20 Aug 2005 16:32:39 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j7KGWdfp026956 for ; Sat, 20 Aug 2005 16:32:39 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j7KGWd9B026955; Sat, 20 Aug 2005 16:32:39 GMT (envelope-from nobody) Message-Id: <200508201632.j7KGWd9B026955@www.freebsd.org> Date: Sat, 20 Aug 2005 16:32:39 GMT From: Pascal Hofstee To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: threads/85160: libobjc + libpthread/libthr crash problem X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2005 16:40:17 -0000 >Number: 85160 >Category: threads >Synopsis: libobjc + libpthread/libthr crash problem >Confidential: no >Severity: critical >Priority: low >Responsible: freebsd-threads >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Aug 20 16:40:16 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Pascal Hofstee >Release: FreeBSD 7.0-CURRENT amd64 >Organization: >Environment: System: FreeBSD 7.0-CURRENT #7: Wed Aug 17 22:27:49 PDT 2005 daeron@synergy.charterpipeline.net.lan:/usr/obj/usr/src/sys/SYNERGY >Description: Ever since the GNUstep project decided to make certain changes regarding how GNUstep applications should be linked to external libraries ... GNUstep builds on the FreeBSD platform appeared to be broken where they used to function properly before. (Problem being applications segfaulting in libobjc's thread initialization) A while ago now, David Ayers, one of the people with an active GNUstep interest and willingness to see this issue resolved was kind enough to allow me to provide him access to my FreeBSD/amd64 7.0-CURRENT machine in an attempt to get to the bottom of this issue. His final analysis boils down to the following: ----[ Analysis of GNUstep on FreeBSD pthread problem ]---- The real bug does indeed lie in the internal initialization process of the FreeBSD libpthread library. In this case when libobjc is not excplitly linked into the executable, (and is further at the bottom of the ldd depenency list) it get's initialized before libpthread does. i.e. it starts calling libpthread functions before the following constructor: void _thread_init_hack(void) __attribute__ ((constructor)); void _thread_init_hack(void) { _libpthread_init(NULL); } of the libpthread library is called. This constructor sets up the data structures for _get_curthread(). The function that libobjc calls early: pthread_key_create() calls _get_currthread which still returns NULL. This pointer is then dereferenced in the THR_LOCK_ACQUIRE macro resulting in the segfault. Many of the mutex functions have already been guarded for this case with the following code fragements: if (_thr_initial == NULL) _libpthread_init(NULL); See also the following comment in thr_create.c: .. * Some notes on new thread creation and first time initializion * to enable multi-threading. * * There are basically two things that need to be done. * * 1) The internal library variables must be initialized. * 2) Upcalls need to be enabled to allow multiple threads * to be run. * * The first may be done as a result of other pthread functions * being called. When _thr_initial is null, _libpthread_init is * called to initialize the internal variables; this also creates * or sets the initial thread. It'd be nice to automatically * have _libpthread_init called on program execution so we don't * have to have checks throughout the library. .. So they seem to be aware of the issue but haven't guarded all functions like pthread_key_create() which libobjc calls. I don't believe that we can find a reliable workaround within GNUstep. I also don't know if this bug is in a stable release version of FreeBSD. But I want to mention that a call to pthread_self() would workaround this. Yet this call would have to be done in libobjc's __objc_init_thread_system and not in GNUstep. The other hack is to fiddle with the link order so that the constructor above can cover up the issue. I'll leave it up to the -make maintainers to decide what to do. My current tendency is to close this bug as invalid at least until someone verifies that the issue exists with released versions of FreeBSD. And even then a workaround should probably be done in libobjc (which seems to be installed by FreeBSD but if libobjc needs updating you might as well update libpthread instead and fix the bug properly). ----[ End of Analysis]---- On a sidenote .. this same problem is duplicated when using libthr ... and does not occur when using libc_r. the proposed fixes seem to cause no ill-effects (i've been running with them locally for a full month by now ... if a similar fix could be applied inside _get_curthread() that would like be the most ideal situation .. but i would rather have somebody confirm such a solution would indeed be possible there. >How-To-Repeat: The problem manifests itself when an application linked against libpthread/libthr indirectly links in libobjc. During application startup .. libobjc apparently gets to run its initialization routines before libpthread gets a chance to execute its _thread_init_hack constructor .. causing NULL pointer dereferences in pthread_key_create() >Fix: --- libthr.diff begins here --- --- lib/libthr/thread/thr_spec.c.orig Sat Jul 16 19:29:04 2005 +++ lib/libthr/thread/thr_spec.c Sat Jul 16 19:29:14 2005 @@ -52,8 +52,13 @@ int _pthread_key_create(pthread_key_t *key, void (*destructor) (void *)) { - struct pthread *curthread = _get_curthread(); + struct pthread *curthread; int i; + + if (_thr_initial == NULL) + _libpthread_init(NULL); + + curthread = _get_curthread(); /* Lock the key table: */ THR_LOCK_ACQUIRE(curthread, &_keytable_lock); --- libthr.diff ends here --- --- libpthread.diff begins here --- --- lib/libpthread/thread/thr_spec.c.orig Sat Jul 16 19:28:31 2005 +++ lib/libpthread/thread/thr_spec.c Sat Jul 16 19:28:41 2005 @@ -50,8 +50,13 @@ int _pthread_key_create(pthread_key_t *key, void (*destructor) (void *)) { - struct pthread *curthread = _get_curthread(); + struct pthread *curthread; int i; + + if (_thr_initial == NULL) + _libpthread_init(NULL); + + curthread = _get_curthread(); /* Lock the key table: */ THR_LOCK_ACQUIRE(curthread, &_keytable_lock); --- libpthread.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-threads@FreeBSD.ORG Sat Aug 20 17:40:13 2005 Return-Path: X-Original-To: freebsd-threads@hub.freebsd.org 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 BF20A16A41F for ; Sat, 20 Aug 2005 17:40:13 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED48A43D55 for ; Sat, 20 Aug 2005 17:40:12 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7KHeCZI012944 for ; Sat, 20 Aug 2005 17:40:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7KHeCAl012943; Sat, 20 Aug 2005 17:40:12 GMT (envelope-from gnats) Resent-Date: Sat, 20 Aug 2005 17:40:12 GMT Resent-Message-Id: <200508201740.j7KHeCAl012943@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-threads@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andy Hilker Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C551416A41F for ; Sat, 20 Aug 2005 17:31:22 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90BA643D46 for ; Sat, 20 Aug 2005 17:31:22 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j7KHVMuC020085 for ; Sat, 20 Aug 2005 17:31:22 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j7KHVMCn020082; Sat, 20 Aug 2005 17:31:22 GMT (envelope-from nobody) Message-Id: <200508201731.j7KHVMCn020082@www.freebsd.org> Date: Sat, 20 Aug 2005 17:31:22 GMT From: Andy Hilker To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: threads/85161: rcng scripts for processes running as kernel threads not working cause of [procname] X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2005 17:40:14 -0000 >Number: 85161 >Category: threads >Synopsis: rcng scripts for processes running as kernel threads not working cause of [procname] >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-threads >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Aug 20 17:40:12 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Andy Hilker >Release: 5.4-RELEASE-p3 >Organization: >Environment: FreeBSD mypc 5.4-RELEASE-p3 FreeBSD 5.4-RELEASE-p3 #6: Tue Jul 5 16:48:52 CEST 2005 root@arkona:/usr/obj/usr/src/sys/MYPC i386 >Description: If you run a process which is using kernel threads (like mysqld from ports) the ps utility shows procnames like [procname]: mypc:/# ps -auxw | grep sql root 22885 0.0 0.0 1584 964 p0 S+ 7:14PM 0:00.00 grep sql mysql 7204 0.0 0.0 1776 224 p2- IJ 11Aug05 0:00.02 [sh] mysql 7240 0.0 0.9 67560 33304 p2- SJ 11Aug05 9:52.96 [mysqld] The problem is, that you can not use procname="[mysqld]" in your rcng script like /usr/local/etc/rc.d/mysqld-server.sh. Because of this, rcng script functions like status, stop, restart are not working. Process is not find, pidnumber is not enough. The behaviour is defined in /etc/rc.subr, line 267. >How-To-Repeat: see full description. >Fix: correct handling of procname variable in /etc/rc.subr with escaping? Below patch works, but maybe a shell scripting guru would make it better... # $FreeBSD: src/etc/rc.subr,v 1.31.2.1 2005/01/17 11:51:00 keramida Exp $ --- rc.subr Thu Aug 11 15:18:52 2005 +++ /etc/rc.subr Thu Aug 11 15:14:06 2005 @@ -267,7 +267,7 @@ _procnamebn=${_procname##*/} _fp_args='_arg0 _argv' _fp_match='case "$_arg0" in - $_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})")' + "$_procname"|$_procnamebn|${_procnamebn}:|"(${_procnamebn})")' fi _proccheck=' >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-threads@FreeBSD.ORG Sat Aug 20 18:00:27 2005 Return-Path: X-Original-To: freebsd-threads@hub.freebsd.org 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 E281A16A41F for ; Sat, 20 Aug 2005 18:00:27 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CBFD43D53 for ; Sat, 20 Aug 2005 18:00:27 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7KI0RH0013395 for ; Sat, 20 Aug 2005 18:00:27 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7KI0Rng013394; Sat, 20 Aug 2005 18:00:27 GMT (envelope-from gnats) Date: Sat, 20 Aug 2005 18:00:27 GMT Message-Id: <200508201800.j7KI0Rng013394@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Andy Hilker Cc: Subject: Re: threads/85161: rcng scripts for processes running as kernel threads not working cause of [procname] X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andy Hilker List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2005 18:00:28 -0000 The following reply was made to PR threads/85161; it has been noted by GNATS. From: Andy Hilker To: bug-followup@FreeBSD.org Cc: Subject: Re: threads/85161: rcng scripts for processes running as kernel threads not working cause of [procname] Date: Sat, 20 Aug 2005 19:44:23 +0200 Sorry, I have submitted an already reported bug (see below). The referenced patch seems to be clean. Please commit it. Problem Report conf/82430 : [patch] error with find "[procname]" in function check_process and check_pidfile of rc.subr From owner-freebsd-threads@FreeBSD.ORG Sat Aug 20 18:36:55 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D3E116A41F; Sat, 20 Aug 2005 18:36:55 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20EA043D5D; Sat, 20 Aug 2005 18:36:53 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.4/8.13.4/NETPLEX) with ESMTP id j7KIaopZ028956; Sat, 20 Aug 2005 14:36:51 -0400 (EDT) Date: Sat, 20 Aug 2005 14:36:50 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Andy Hilker In-Reply-To: <200508201731.j7KHVMCn020082@www.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: freebsd-gnats-submit@freebsd.org, freebsd-threads@freebsd.org Subject: Re: threads/85161: rcng scripts for processes running as kernel threads not working cause of [procname] X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2005 18:36:55 -0000 On Sat, 20 Aug 2005, Andy Hilker wrote: > > >Number: 85161 > >Category: threads > >Synopsis: rcng scripts for processes running as kernel threads not working cause of [procname] > >Confidential: no > >Severity: serious > >Priority: medium > >Responsible: freebsd-threads [ ... ] > >Description: > If you run a process which is using kernel threads (like mysqld from ports) > the ps utility shows procnames like [procname]: This doesn't belong in -threads. Probably conf or misc? -- DE From owner-freebsd-threads@FreeBSD.ORG Sat Aug 20 18:40:16 2005 Return-Path: X-Original-To: freebsd-threads@hub.freebsd.org 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 68FE016A41F for ; Sat, 20 Aug 2005 18:40:16 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37F6F43D53 for ; Sat, 20 Aug 2005 18:40:16 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7KIeGbV022151 for ; Sat, 20 Aug 2005 18:40:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7KIeFmc022150; Sat, 20 Aug 2005 18:40:15 GMT (envelope-from gnats) Date: Sat, 20 Aug 2005 18:40:15 GMT Message-Id: <200508201840.j7KIeFmc022150@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Daniel Eischen Cc: Subject: Re: threads/85161: rcng scripts for processes running as kernel threads not working cause of [procname] X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2005 18:40:16 -0000 The following reply was made to PR threads/85161; it has been noted by GNATS. From: Daniel Eischen To: Andy Hilker Cc: freebsd-gnats-submit@freebsd.org, Subject: Re: threads/85161: rcng scripts for processes running as kernel threads not working cause of [procname] Date: Sat, 20 Aug 2005 14:36:50 -0400 (EDT) On Sat, 20 Aug 2005, Andy Hilker wrote: > > >Number: 85161 > >Category: threads > >Synopsis: rcng scripts for processes running as kernel threads not working cause of [procname] > >Confidential: no > >Severity: serious > >Priority: medium > >Responsible: freebsd-threads [ ... ] > >Description: > If you run a process which is using kernel threads (like mysqld from ports) > the ps utility shows procnames like [procname]: This doesn't belong in -threads. Probably conf or misc? -- DE From owner-freebsd-threads@FreeBSD.ORG Sat Aug 20 20:59:11 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A589A16A41F; Sat, 20 Aug 2005 20:59:11 +0000 (GMT) (envelope-from ah@cryptobank.de) Received: from mail.crypta.net (mail.crypta.net [83.136.131.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4688643D45; Sat, 20 Aug 2005 20:59:11 +0000 (GMT) (envelope-from ah@cryptobank.de) Received: by mail.crypta.net (cryptobank/eProtect-smtpd, from userid 1001) id 55FD5ECD405; Sat, 20 Aug 2005 22:52:11 +0200 (CEST) Date: Sat, 20 Aug 2005 22:52:11 +0200 From: Andy Hilker To: Daniel Eischen Message-ID: <20050820205210.GA32573@mail.crypta.net> References: <200508201731.j7KHVMCn020082@www.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-PGP-Key: http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0xEC6E1071 X-PGP-Fingerprint: 9B2E 5892 AD93 D5C5 FB8E 3912 35D6 951B EC6E 1071 Organization: cryptobank - Andy Hilker Cc: freebsd-gnats-submit@freebsd.org, freebsd-threads@freebsd.org Subject: Re: threads/85161: rcng scripts for processes running as kernel threads not working cause of [procname] X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2005 20:59:11 -0000 You (Daniel Eischen) wrote: > On Sat, 20 Aug 2005, Andy Hilker wrote: > [ ... ] > > > >Description: > > If you run a process which is using kernel threads (like mysqld from ports) > > the ps utility shows procnames like [procname]: > > This doesn't belong in -threads. Probably conf or misc? Sorry, you are probably right. I thought kernel thread people can commit the fix ;-) There is another report and clean fix for this issue in conf. Sorry again for submitting a duplicate... Regards, Andy From owner-freebsd-threads@FreeBSD.ORG Sat Aug 20 21:00:36 2005 Return-Path: X-Original-To: freebsd-threads@hub.freebsd.org 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 BD96A16A41F for ; Sat, 20 Aug 2005 21:00:36 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8EFB743D46 for ; Sat, 20 Aug 2005 21:00:36 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7KL0aRn037876 for ; Sat, 20 Aug 2005 21:00:36 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7KL0a1F037875; Sat, 20 Aug 2005 21:00:36 GMT (envelope-from gnats) Date: Sat, 20 Aug 2005 21:00:36 GMT Message-Id: <200508202100.j7KL0a1F037875@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Andy Hilker Cc: Subject: Re: threads/85161: rcng scripts for processes running as kernel threads not working cause of [procname] X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andy Hilker List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2005 21:00:36 -0000 The following reply was made to PR threads/85161; it has been noted by GNATS. From: Andy Hilker To: Daniel Eischen Cc: freebsd-gnats-submit@freebsd.org, freebsd-threads@freebsd.org Subject: Re: threads/85161: rcng scripts for processes running as kernel threads not working cause of [procname] Date: Sat, 20 Aug 2005 22:52:11 +0200 You (Daniel Eischen) wrote: > On Sat, 20 Aug 2005, Andy Hilker wrote: > [ ... ] > > > >Description: > > If you run a process which is using kernel threads (like mysqld from ports) > > the ps utility shows procnames like [procname]: > > This doesn't belong in -threads. Probably conf or misc? Sorry, you are probably right. I thought kernel thread people can commit the fix ;-) There is another report and clean fix for this issue in conf. Sorry again for submitting a duplicate... Regards, Andy