From owner-freebsd-threads@FreeBSD.ORG Sun Mar 13 19:33:55 2011 Return-Path: Delivered-To: threads@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A02F10656FE for ; Sun, 13 Mar 2011 19:33:55 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id EC2D38FC19 for ; Sun, 13 Mar 2011 19:33:54 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 323F646B17 for ; Sun, 13 Mar 2011 15:33:54 -0400 (EDT) Date: Sun, 13 Mar 2011 19:33:54 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: threads@FreeBSD.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Cc: Subject: pthread_key_create and !-lpthreads binaries 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, 13 Mar 2011 19:33:55 -0000 Dear threading folk: This afternoon I wrote some threaded code for Mac OS X, and then checked it out on FreeBSD and was a bit surprised when it compiled but didn't work. Turns out, of course, that on Mac OS X I'd omitted -lpthread and not noticed, as the thread primitives are in libSystem. It ran, and the reason I ran into trouble is that, although no-op locking calls are fine, getting back "success" from pthread_key_create() when it has actually failed is problematic. Would it be possible to make the thread stub for pthread_key_create() return an error, instead of succeeding (but not actually succeeding)? Or, perhaps better yet, I should get a link-time error for that function, even though I shouldn't get one for lock/unlock? Thanks, Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-threads@FreeBSD.ORG Sun Mar 13 20:16:14 2011 Return-Path: Delivered-To: threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E09B1065673; Sun, 13 Mar 2011 20:16:14 +0000 (UTC) (envelope-from eischen@vigrid.com) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id EA02C8FC0C; Sun, 13 Mar 2011 20:16:13 +0000 (UTC) Received: from [10.0.0.19] (ip-414b102e.ct.fixed.ntplx.com [65.75.16.46]) (authenticated bits=0) by mail.netplex.net (8.14.4/8.14.4/NETPLEX) with ESMTP id p2DK0H62016336 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Sun, 13 Mar 2011 16:00:18 -0400 X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (mail.netplex.net [204.213.176.10]); Sun, 13 Mar 2011 16:00:18 -0400 (EDT) References: In-Reply-To: Mime-Version: 1.0 (iPhone Mail 8F190) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: X-Mailer: iPhone Mail (8F190) From: Daniel Eischen Date: Sun, 13 Mar 2011 16:00:17 -0400 To: Robert Watson Cc: "threads@freebsd.org" Subject: Re: pthread_key_create and !-lpthreads binaries 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, 13 Mar 2011 20:16:14 -0000 Sent from my iPhone On Mar 13, 2011, at 3:33 PM, Robert Watson wrote: >=20 > Dear threading folk: >=20 > This afternoon I wrote some threaded code for Mac OS X, and then checked i= t out on FreeBSD and was a bit surprised when it compiled but didn't work. T= urns out, of course, that on Mac OS X I'd omitted -lpthread and not noticed,= as the thread primitives are in libSystem. It ran, and the reason I ran in= to trouble is that, although no-op locking calls are fine, getting back "suc= cess" from pthread_key_create() when it has actually failed is problematic. >=20 > Would it be possible to make the thread stub for pthread_key_create() retu= rn an error, instead of succeeding (but not actually succeeding)? Or, perha= ps better yet, I should get a link-time error for that function, even though= I shouldn't get one for lock/unlock? >=20 > Thanks, >=20 > Robert N M Watson > Computer Laboratory > University of Cambridge > _______________________________________________ > 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"= >=20 From owner-freebsd-threads@FreeBSD.ORG Mon Mar 14 04:16:15 2011 Return-Path: Delivered-To: threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F24831065670; Mon, 14 Mar 2011 04:16:14 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id AC75D8FC0A; Mon, 14 Mar 2011 04:16:14 +0000 (UTC) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.4/8.14.4/NETPLEX) with ESMTP id p2E3qQPd025068; Sun, 13 Mar 2011 23:52:26 -0400 X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.2.6 (mail.netplex.net [204.213.176.10]); Sun, 13 Mar 2011 23:52:26 -0400 (EDT) Date: Sun, 13 Mar 2011 23:52:26 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Robert Watson In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: threads@freebsd.org Subject: Re: pthread_key_create and !-lpthreads binaries 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: Mon, 14 Mar 2011 04:16:15 -0000 On Sun, 13 Mar 2011, Robert Watson wrote: > > Dear threading folk: > > This afternoon I wrote some threaded code for Mac OS X, and then checked it > out on FreeBSD and was a bit surprised when it compiled but didn't work. > Turns out, of course, that on Mac OS X I'd omitted -lpthread and not noticed, > as the thread primitives are in libSystem. It ran, and the reason I ran into > trouble is that, although no-op locking calls are fine, getting back > "success" from pthread_key_create() when it has actually failed is > problematic. > > Would it be possible to make the thread stub for pthread_key_create() return > an error, instead of succeeding (but not actually succeeding)? Or, perhaps > better yet, I should get a link-time error for that function, even though I > shouldn't get one for lock/unlock? I think returning an error in this case is probably correct. I can look into it if no one else gets to it before me. -- DE From owner-freebsd-threads@FreeBSD.ORG Mon Mar 14 11:07:11 2011 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 4CAA21065670 for ; Mon, 14 Mar 2011 11:07:11 +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 2147D8FC17 for ; Mon, 14 Mar 2011 11:07:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p2EB7BuQ002707 for ; Mon, 14 Mar 2011 11:07:11 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p2EB7A0j002705 for freebsd-threads@FreeBSD.org; Mon, 14 Mar 2011 11:07:10 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 14 Mar 2011 11:07:10 GMT Message-Id: <201103141107.p2EB7A0j002705@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, 14 Mar 2011 11:07:11 -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/154893 threads pthread_sigmask don't work if mask and oldmask are pas o threa/150959 threads [libc] Stub pthread_once in libc should call _libc_onc o threa/149366 threads pthread_cleanup_pop never runs the configured routine 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/136345 threads Recursive read rwlocks in thread A cause deadlock with 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/127225 threads bug in lib/libthr/thread/thr_init.c o threa/122923 threads 'nice' does not prevent background process from steali o threa/121336 threads lang/neko threading ok on UP, broken on SMP (FreeBSD 7 o threa/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/76690 threads fork hang in child for -lc_r s threa/69020 threads pthreads library leaks _gc_mutex s threa/48856 threads Setting SIGCHLD to SIG_IGN still leaves zombies under s threa/40671 threads pthread_cancel doesn't remove thread from condition qu s threa/34536 threads accept() blocks other threads s threa/30464 threads [patch] pthread mutex attributes -- pshared 27 problems total.