From owner-freebsd-threads@FreeBSD.ORG Sun Apr 29 06:49:14 2012 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ADCD91065672 for ; Sun, 29 Apr 2012 06:49:14 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 7D8188FC08 for ; Sun, 29 Apr 2012 06:49:14 +0000 (UTC) Received: from julian-mac.elischer.org (c-67-180-24-15.hsd1.ca.comcast.net [67.180.24.15]) (authenticated bits=0) by vps1.elischer.org (8.14.5/8.14.5) with ESMTP id q3T6nBhO031830 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 28 Apr 2012 23:49:13 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4F9CE463.5070501@freebsd.org> Date: Sat, 28 Apr 2012 23:49:07 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 MIME-Version: 1.0 To: "'Chris Hall'" References: <056201cd253c$b43a0860$1cae1920$@highwayman.com> In-Reply-To: <056201cd253c$b43a0860$1cae1920$@highwayman.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-threads@freebsd.org Subject: Re: Trying to set PTHREAD_SCOPE_SYSTEM 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: Sun, 29 Apr 2012 06:49:14 -0000 On 4/28/12 5:44 AM, 'Chris Hall' wrote: > For my application (a BGP daemon) I think I should be setting all its > pthreads to PTHREAD_SCOPE_SYSTEM. (This may be where I am going > wrong, of course, but bear with me.) > [...] > Third difficulty: if I set PTHREAD_SCOPE_SYSTEM and the default is > PTHREAD_SCOPE_PROCESS, do I also need to set policy/param ? If so, > where do I find suitable default policy/param ? > (I could copy the policy/param from the main thread... but will that > be suitable for PTHREAD_SCOPE_SYSTEM ?) AS far as I know the default is PTHREAD_SCOPE_SYSTEM now. we no longer support PTHREAD_SCOPE_PROCESS as far as I know. (I may be confused of course.. it wouldn't be the first time). We used to have the ability to switch but the complexity was not worth the added benefit. > Fourth difficulty: if I dick about with scope/policy/param, will I > need special privileges (root, say) ? > > Fifth difficulty: it is clearly easiest to leave this whole thing > alone and ignore pthread_attr_t altogether. Is there a way to set > PTHREAD_SCOPE_SYSTEM as the default for a given application from the > outside ? > > > _______________________________________________ > freebsd-threads@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > To unsubscribe, send any mail to "freebsd-threads-unsubscribe@freebsd.org" > From owner-freebsd-threads@FreeBSD.ORG Mon Apr 30 08:15:59 2012 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 90AD31065677; Mon, 30 Apr 2012 08:15:59 +0000 (UTC) (envelope-from chris.hall@highwayman.com) Received: from anchor-post-1.mail.demon.net (anchor-post-1.mail.demon.net [195.173.77.132]) by mx1.freebsd.org (Postfix) with ESMTP id 4ECE28FC1B; Mon, 30 Apr 2012 08:15:59 +0000 (UTC) Received: from [80.177.246.130] (helo=hestia.halldom.com) by anchor-post-1.mail.demon.net with esmtp (Exim 4.69) id 1SOllw-0002cv-gw; Mon, 30 Apr 2012 08:15:52 +0000 Received: from hyperion.halldom.com ([80.177.246.170] helo=HYPERION) by hestia.halldom.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1SOllv-0002Wa-Cg; Mon, 30 Apr 2012 08:15:51 +0000 From: "'Chris Hall'" Sender: "Chris Hall" To: References: <056201cd253c$b43a0860$1cae1920$@highwayman.com> <4F9CE463.5070501@freebsd.org> In-Reply-To: <4F9CE463.5070501@freebsd.org> Date: Mon, 30 Apr 2012 09:15:46 +0100 Organization: Highwayman Message-ID: <062501cd26a9$74b6adb0$5e240910$@highwayman.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQE7TYdqFNljrxftDPHrzsix4zy6ZwH7l5dtl8bXdxA= Content-Language: en-gb Cc: Subject: RE: Trying to set PTHREAD_SCOPE_SYSTEM 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, 30 Apr 2012 08:15:59 -0000 Julian Elischer wrote (on Sun 29-Apr-2012 at 07:49 +0100): ... > AS far as I know the default is PTHREAD_SCOPE_SYSTEM now. > we no longer support PTHREAD_SCOPE_PROCESS as far as I know. > (I may be confused of course.. it wouldn't be the first time). Ah. Well, that certainly finesses all the issues. > We used to have the ability to switch but the complexity was not > worth the added benefit. Not surprised. Particularly as it all seems so badly defined :-( For my application I would be happy to have a mechanism to give some higher priority to the I/O driven threads, and to lower the priority of the garbage collector and scanning threads. The higher priority stuff ought to be system scope, the lower could be process scope. The POSIX defined stuff almost but not quite provides that, but is so full of implementation-defined and not defined at all, that it seems quite useless to me. Thanks, Chris From owner-freebsd-threads@FreeBSD.ORG Mon Apr 30 11:07:45 2012 Return-Path: Delivered-To: freebsd-threads@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 34CCA106564A for ; Mon, 30 Apr 2012 11:07:45 +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 051268FC0C for ; Mon, 30 Apr 2012 11:07:45 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q3UB7iou054194 for ; Mon, 30 Apr 2012 11:07:44 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q3UB7ihh054152 for freebsd-threads@FreeBSD.org; Mon, 30 Apr 2012 11:07:44 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 30 Apr 2012 11:07:44 GMT Message-Id: <201204301107.q3UB7ihh054152@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, 30 Apr 2012 11:07:45 -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/166932 threads [libthr] sleepqueue-related memory leak in libthr o threa/165173 threads [build] clang buildworld breaks libthr o threa/163512 threads libc defaults to single threaded o threa/160708 threads possible security problem with RLIMIT_VMEM o threa/150959 threads [libc] Stub pthread_once in libc should call _libc_onc o threa/148515 threads Memory / syslog strangeness in FreeBSD 8.x ( possible o threa/141721 threads rtprio(1): (id|rt)prio priority resets when new thread o threa/135673 threads databases/mysql50-server - MySQL query lock-ups on 7.2 o threa/128922 threads threads hang with xorg running 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/116668 threads can no longer use jdk15 with libthr on -stable SMP 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/84483 threads problems with devel/nspr and -lc_r on 4.x o threa/80992 threads abort() sometimes not caught by gdb depending on threa 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/48856 threads Setting SIGCHLD to SIG_IGN still leaves zombies under s threa/34536 threads accept() blocks other threads s threa/30464 threads [patch] pthread mutex attributes -- pshared 24 problems total. From owner-freebsd-threads@FreeBSD.ORG Fri May 4 06:20:23 2012 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 733D3106564A; Fri, 4 May 2012 06:20:23 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 463878FC15; Fri, 4 May 2012 06:20:23 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q446KNGk072628; Fri, 4 May 2012 06:20:23 GMT (envelope-from davidxu@freefall.freebsd.org) Received: (from davidxu@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q446KNPM072623; Fri, 4 May 2012 06:20:23 GMT (envelope-from davidxu) Date: Fri, 4 May 2012 06:20:23 GMT Message-Id: <201205040620.q446KNPM072623@freefall.freebsd.org> To: amdmi3@FreeBSD.org, davidxu@FreeBSD.org, freebsd-threads@FreeBSD.org From: davidxu@FreeBSD.org Cc: Subject: Re: threads/166932: [libthr] sleepqueue-related memory leak in libthr 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, 04 May 2012 06:20:23 -0000 Synopsis: [libthr] sleepqueue-related memory leak in libthr State-Changed-From-To: open->closed State-Changed-By: davidxu State-Changed-When: Fri May 4 06:19:16 UTC 2012 State-Changed-Why: It is fixed in revision 231635. http://www.freebsd.org/cgi/query-pr.cgi?pr=166932