From owner-freebsd-threads@FreeBSD.ORG Sun Feb 3 15:33:58 2008 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 65EA516A41A for ; Sun, 3 Feb 2008 15:33:58 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 3085C13C45B for ; Sun, 3 Feb 2008 15:33:58 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 40D7C208C; Sun, 3 Feb 2008 16:16:27 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.2/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id B7C382085; Sun, 3 Feb 2008 16:16:26 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id 9612A844B3; Sun, 3 Feb 2008 16:16:26 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: current@freebsd.org, threads@freebsd.org Date: Sun, 03 Feb 2008 16:16:26 +0100 Message-ID: <861w7um5o5.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Subject: Symbol versioning errors 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: Sun, 03 Feb 2008 15:33:58 -0000 Here's an excerpt from the RELENG_7 vs HEAD diff of libthr's symbol map: --- pthread.map 13 May 2007 14:12:39 -0000 1.18 +++ pthread.map 20 Dec 2007 04:32:28 -0000 1.21 @@ -84,9 +84,13 @@ pthread_multi_np; pthread_mutex_destroy; pthread_mutex_getprioceiling; + pthread_mutex_getspinloops_np; + pthread_mutex_getyieldloops_np; pthread_mutex_init; pthread_mutex_lock; pthread_mutex_setprioceiling; + pthread_mutex_setspinloops_np; + pthread_mutex_setyieldloops_np; pthread_mutex_timedlock; pthread_mutex_trylock; pthread_mutex_unlock; These functions are all in FBSD_1.0, but they were introduced after the branch and never MFCed, so if I understand how we've implemented symbol versioning, they should be in FBSD_1.1. Unless someone argues credibly for keeping them in FBSD_1.0, I will move them to FBSD_1.1 in a few days. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-threads@FreeBSD.ORG Sun Feb 3 16:24:46 2008 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 C3BE116A46C for ; Sun, 3 Feb 2008 16:24:46 +0000 (UTC) (envelope-from peter@wemm.org) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by mx1.freebsd.org (Postfix) with ESMTP id 6742013C457 for ; Sun, 3 Feb 2008 16:24:46 +0000 (UTC) (envelope-from peter@wemm.org) Received: by fg-out-1718.google.com with SMTP id 16so1827494fgg.35 for ; Sun, 03 Feb 2008 08:24:45 -0800 (PST) Received: by 10.82.161.19 with SMTP id j19mr11062229bue.25.1202054385882; Sun, 03 Feb 2008 07:59:45 -0800 (PST) Received: by 10.82.182.2 with HTTP; Sun, 3 Feb 2008 07:59:45 -0800 (PST) Message-ID: Date: Sun, 3 Feb 2008 08:59:45 -0700 From: "Peter Wemm" To: "=?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?=" In-Reply-To: <861w7um5o5.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <861w7um5o5.fsf@ds4.des.no> Cc: threads@freebsd.org, current@freebsd.org Subject: Re: Symbol versioning errors 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: Sun, 03 Feb 2008 16:24:46 -0000 On Feb 3, 2008 8:16 AM, Dag-Erling Sm=F8rgrav wrote: > Here's an excerpt from the RELENG_7 vs HEAD diff of libthr's symbol map: > > --- pthread.map 13 May 2007 14:12:39 -0000 1.18 > +++ pthread.map 20 Dec 2007 04:32:28 -0000 1.21 > @@ -84,9 +84,13 @@ > pthread_multi_np; > pthread_mutex_destroy; > pthread_mutex_getprioceiling; > + pthread_mutex_getspinloops_np; > + pthread_mutex_getyieldloops_np; > pthread_mutex_init; > pthread_mutex_lock; > pthread_mutex_setprioceiling; > + pthread_mutex_setspinloops_np; > + pthread_mutex_setyieldloops_np; > pthread_mutex_timedlock; > pthread_mutex_trylock; > pthread_mutex_unlock; > > These functions are all in FBSD_1.0, but they were introduced after the > branch and never MFCed, so if I understand how we've implemented symbol > versioning, they should be in FBSD_1.1. > > Unless someone argues credibly for keeping them in FBSD_1.0, I will move > them to FBSD_1.1 in a few days. > > DES I'm not sure I see the point in that. Consider the not-moving-to-1.1 case. If somebody takes an 8.0 binary and runs it on 7.x, then they'll get a 'symbol not found' error. On the other hand, if they're moved and somebody tries the same thing, then they still get the same kind of 'symbol not found' error but with just one character different. The point of symbol versioning is to allow incompatible changes. eg: to have a FBSD_1.0 version of pthread_mutex_getspinloops_np() *AND* a FBSD_1.1 version of pthread_mutex_getspinloops_np() in the library at the same time. The 1.0 instance would presumably be an API/ABI conversion wrapper around the newer functions. -Peter --=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 From owner-freebsd-threads@FreeBSD.ORG Sun Feb 3 16:27:30 2008 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 C909016A417; Sun, 3 Feb 2008 16:27:29 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 8E74B13C44B; Sun, 3 Feb 2008 16:27:29 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id D702B2084; Sun, 3 Feb 2008 17:27:20 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.2/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id C76112082; Sun, 3 Feb 2008 17:27:20 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id B1B38844B7; Sun, 3 Feb 2008 17:27:20 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Peter Wemm" References: <861w7um5o5.fsf@ds4.des.no> Date: Sun, 03 Feb 2008 17:27:20 +0100 In-Reply-To: (Peter Wemm's message of "Sun\, 3 Feb 2008 08\:59\:45 -0700") Message-ID: <86wspm0zvb.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: threads@freebsd.org, current@freebsd.org Subject: Re: Symbol versioning errors 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: Sun, 03 Feb 2008 16:27:30 -0000 "Peter Wemm" writes: > I'm not sure I see the point in that. Consider the not-moving-to-1.1 > case. If somebody takes an 8.0 binary and runs it on 7.x, then > they'll get a 'symbol not found' error. On the other hand, if they're > moved and somebody tries the same thing, then they still get the same > kind of 'symbol not found' error but with just one character > different. As you point out, it doesn't make much practical difference, so why not do it right? Why leave a bad example around for people who are trying to understand symbol versioning by looking at how it's done in existing libraries? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-threads@FreeBSD.ORG Sun Feb 3 16:27:38 2008 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 3B1F516A418 for ; Sun, 3 Feb 2008 16:27:38 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.238]) by mx1.freebsd.org (Postfix) with ESMTP id EED6713C448 for ; Sun, 3 Feb 2008 16:27:37 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by wx-out-0506.google.com with SMTP id i29so1496265wxd.7 for ; Sun, 03 Feb 2008 08:27:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; bh=ebcE2DBA0ku1gX/8O/i5fZNWAKN2SL0QguPw6IqSYVE=; b=BHSvcPJyQ88opQjvMy13alvmr49XpvTWZSXgjjFiL+AbQNfTK4u6VOl3w+airhmGWvrZI5BiBn1zZv4LKqkHnsyOipzDSAZbs6Z1IwVUgs7fqv/YYMKlJe/6K4sYT4ORpnIAub2GQjrWFtYdhFGPWm/vqKsj+HDI1aqQq9SVxK4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; b=pV9mWCoEGywALQDJ0XccKHxSwBQqhTsoTH1AAVvuoVY+NsRSAy/0GvJ56os+mxd5kcmyI9TkdjGoy19gkRyr1tniZhp8vefgU/BJQZ6Um7DZhm90b1JX1p220xBt6EYolJ3pKKaGUfdwUQLQBZwObpOTDX7G3zcQQTOVwQmRdKo= Received: by 10.70.67.1 with SMTP id p1mr3905311wxa.24.1202054609261; Sun, 03 Feb 2008 08:03:29 -0800 (PST) Received: from kan.dnsalias.net ( [24.218.183.247]) by mx.google.com with ESMTPS id h36sm6555664wxd.29.2008.02.03.08.03.20 (version=SSLv3 cipher=OTHER); Sun, 03 Feb 2008 08:03:25 -0800 (PST) Date: Sun, 3 Feb 2008 11:03:15 -0500 From: Alexander Kabaev To: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Message-ID: <20080203110315.6416563e@kan.dnsalias.net> In-Reply-To: <861w7um5o5.fsf@ds4.des.no> References: <861w7um5o5.fsf@ds4.des.no> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.5; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/bbyuqcp1BdnxuGHk.=NnoIq"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: threads@freebsd.org, current@freebsd.org Subject: Re: Symbol versioning errors 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: Sun, 03 Feb 2008 16:27:38 -0000 --Sig_/bbyuqcp1BdnxuGHk.=NnoIq Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sun, 03 Feb 2008 16:16:26 +0100 Dag-Erling Sm=C3=B8rgrav wrote: > Here's an excerpt from the RELENG_7 vs HEAD diff of libthr's symbol > map: >=20 > --- pthread.map 13 May 2007 14:12:39 -0000 1.18 > +++ pthread.map 20 Dec 2007 04:32:28 -0000 1.21 > @@ -84,9 +84,13 @@ > pthread_multi_np; > pthread_mutex_destroy; > pthread_mutex_getprioceiling; > + pthread_mutex_getspinloops_np; > + pthread_mutex_getyieldloops_np; > pthread_mutex_init; > pthread_mutex_lock; > pthread_mutex_setprioceiling; > + pthread_mutex_setspinloops_np; > + pthread_mutex_setyieldloops_np; > pthread_mutex_timedlock; > pthread_mutex_trylock; > pthread_mutex_unlock; >=20 > These functions are all in FBSD_1.0, but they were introduced after > the branch and never MFCed, so if I understand how we've implemented > symbol versioning, they should be in FBSD_1.1. >=20 > Unless someone argues credibly for keeping them in FBSD_1.0, I will > move them to FBSD_1.1 in a few days. >=20 > DES There are other symbol versioning problems in libthr that need to be addressed too. Symbols that are specific to libthr and are not implemented in libpthread have no business being in FBSD_X.0 namespace, for instance.=20 --=20 Alexander Kabaev --Sig_/bbyuqcp1BdnxuGHk.=NnoIq Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iD8DBQFHpeXDQ6z1jMm+XZYRAgAfAKChdcuRsIIXHHYqS2OS+BbXXtDTRwCcDQkA RI/nVvryGdyCuzB9d9FaO4g= =e5GH -----END PGP SIGNATURE----- --Sig_/bbyuqcp1BdnxuGHk.=NnoIq-- From owner-freebsd-threads@FreeBSD.ORG Sun Feb 3 16:54:58 2008 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 ACC7F16A46D for ; Sun, 3 Feb 2008 16:54:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay02.kiev.sovam.com (relay02.kiev.sovam.com [62.64.120.197]) by mx1.freebsd.org (Postfix) with ESMTP id 4F84113C442 for ; Sun, 3 Feb 2008 16:54:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from [212.82.216.226] (helo=skuns.kiev.zoral.com.ua) by relay02.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1JLhia-000FU4-IC; Sun, 03 Feb 2008 18:29:25 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by skuns.kiev.zoral.com.ua (8.14.1/8.14.1) with ESMTP id m13GSx3U002029 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 3 Feb 2008 18:29:00 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m13GTI3Q064780; Sun, 3 Feb 2008 18:29:18 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m13GTIuX064779; Sun, 3 Feb 2008 18:29:18 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 3 Feb 2008 18:29:18 +0200 From: Kostik Belousov To: Peter Wemm Message-ID: <20080203162918.GK57756@deviant.kiev.zoral.com.ua> References: <861w7um5o5.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7zUmpB12F58PluDH" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Scanner-Signature: ca614d1e091d53a46adb2ef7a730c6a6 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 2155 [Feb 01 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {TO: local part of email appears in body} X-SpamTest-Method: none X-SpamTest-Rate: 9 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release Cc: Dag-Erling Sm?rgrav , current@freebsd.org, threads@freebsd.org Subject: Re: Symbol versioning errors 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: Sun, 03 Feb 2008 16:54:58 -0000 --7zUmpB12F58PluDH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 03, 2008 at 08:59:45AM -0700, Peter Wemm wrote: > On Feb 3, 2008 8:16 AM, Dag-Erling Sm?rgrav wrote: > > Here's an excerpt from the RELENG_7 vs HEAD diff of libthr's symbol map: > > > > --- pthread.map 13 May 2007 14:12:39 -0000 1.18 > > +++ pthread.map 20 Dec 2007 04:32:28 -0000 1.21 > > @@ -84,9 +84,13 @@ > > pthread_multi_np; > > pthread_mutex_destroy; > > pthread_mutex_getprioceiling; > > + pthread_mutex_getspinloops_np; > > + pthread_mutex_getyieldloops_np; > > pthread_mutex_init; > > pthread_mutex_lock; > > pthread_mutex_setprioceiling; > > + pthread_mutex_setspinloops_np; > > + pthread_mutex_setyieldloops_np; > > pthread_mutex_timedlock; > > pthread_mutex_trylock; > > pthread_mutex_unlock; > > > > These functions are all in FBSD_1.0, but they were introduced after the > > branch and never MFCed, so if I understand how we've implemented symbol > > versioning, they should be in FBSD_1.1. > > > > Unless someone argues credibly for keeping them in FBSD_1.0, I will move > > them to FBSD_1.1 in a few days. > > > > DES >=20 > I'm not sure I see the point in that. Consider the not-moving-to-1.1 > case. If somebody takes an 8.0 binary and runs it on 7.x, then > they'll get a 'symbol not found' error. On the other hand, if they're > moved and somebody tries the same thing, then they still get the same > kind of 'symbol not found' error but with just one character > different. Additional difference is that presence of the version itself is checked when the image is activated. This means that instead of abort in the middle of the execution since the rtld cannot find the symbol, the program gives error on the start.o AFAIR, this is original (Sun) usage of the versioning, before GNU extended it to allow individual version per symbol. I support DES to fix this in the proposed way. >=20 > The point of symbol versioning is to allow incompatible changes. eg: > to have a FBSD_1.0 version of pthread_mutex_getspinloops_np() *AND* a > FBSD_1.1 version of pthread_mutex_getspinloops_np() in the library > at the same time. The 1.0 instance would presumably be an API/ABI > conversion wrapper around the newer functions. >=20 > -Peter > --=20 > Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com > "All of this is for nothing if we don't go to the stars" - JMS/B5 > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" --7zUmpB12F58PluDH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAkel694ACgkQC3+MBN1Mb4ihzACgvnTMAc/0gjdjkhDhixTUDjeM VxMAn3qV/+cKJoKpEAjs34uWT6+ySkc6 =glaa -----END PGP SIGNATURE----- --7zUmpB12F58PluDH-- From owner-freebsd-threads@FreeBSD.ORG Sun Feb 3 17:11:24 2008 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 0CA3C16A421 for ; Sun, 3 Feb 2008 17:11:24 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.182]) by mx1.freebsd.org (Postfix) with ESMTP id CA77713C46A for ; Sun, 3 Feb 2008 17:11:23 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so1949801waf.3 for ; Sun, 03 Feb 2008 09:11:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; bh=vLunE2Gs8gItMHA8k7OI8afeXEqdJOY5+cFg9CVEHJU=; b=FYH5RgfO8wI9xqtTMdUqL5eYqOkMdDh25GVFHksUjpLQKtjeeU664drFSa+Vt4LpvVKxQD1DsClhSNBufA9o8P4Vx/sW/6qK8Zr10m7Bl0U27WhDbq135NaEWEh4cXBoGw/sAk1izQukCw20o4eXI/P4hKejZcnl5+mGYSievXg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer:mime-version:content-type; b=bhts7nzjcwd4eGloJzRh/5IxWfX3xmc1Ux9ernkf6UnXlAHRfWu/fROJ4EomQUXh4bIOvJZQ0UYuHnhf2r2eROQHg1G+SXjNdBvEW72xKWLxNcdjAUlmJFYh8UDIMLt4Lu+PnZALiP4Bhm0+3PKsRRib4Bk7U+7O7EWhDaemzTk= Received: by 10.114.121.1 with SMTP id t1mr548876wac.67.1202058682623; Sun, 03 Feb 2008 09:11:22 -0800 (PST) Received: from kan.dnsalias.net ( [24.218.183.247]) by mx.google.com with ESMTPS id h2sm12846048rnb.16.2008.02.03.09.11.17 (version=SSLv3 cipher=OTHER); Sun, 03 Feb 2008 09:11:20 -0800 (PST) Date: Sun, 3 Feb 2008 12:11:12 -0500 From: Alexander Kabaev To: Kostik Belousov Message-ID: <20080203121112.426a8c25@kan.dnsalias.net> In-Reply-To: <20080203162918.GK57756@deviant.kiev.zoral.com.ua> References: <861w7um5o5.fsf@ds4.des.no> <20080203162918.GK57756@deviant.kiev.zoral.com.ua> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.5; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/d0pqHUKmG9oGRdDuaK0YmMI"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: Dag-Erling Sm?rgrav , current@freebsd.org, Peter Wemm , threads@freebsd.org Subject: Re: Symbol versioning errors 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: Sun, 03 Feb 2008 17:11:24 -0000 --Sig_/d0pqHUKmG9oGRdDuaK0YmMI Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sun, 3 Feb 2008 18:29:18 +0200 Kostik Belousov wrote: > On Sun, Feb 03, 2008 at 08:59:45AM -0700, Peter Wemm wrote: > > On Feb 3, 2008 8:16 AM, Dag-Erling Sm?rgrav wrote: > > > Here's an excerpt from the RELENG_7 vs HEAD diff of libthr's > > > symbol map: > > > > > > --- pthread.map 13 May 2007 14:12:39 -0000 1.18 > > > +++ pthread.map 20 Dec 2007 04:32:28 -0000 1.21 > > > @@ -84,9 +84,13 @@ > > > pthread_multi_np; > > > pthread_mutex_destroy; > > > pthread_mutex_getprioceiling; > > > + pthread_mutex_getspinloops_np; > > > + pthread_mutex_getyieldloops_np; > > > pthread_mutex_init; > > > pthread_mutex_lock; > > > pthread_mutex_setprioceiling; > > > + pthread_mutex_setspinloops_np; > > > + pthread_mutex_setyieldloops_np; > > > pthread_mutex_timedlock; > > > pthread_mutex_trylock; > > > pthread_mutex_unlock; > > > > > > These functions are all in FBSD_1.0, but they were introduced > > > after the branch and never MFCed, so if I understand how we've > > > implemented symbol versioning, they should be in FBSD_1.1. > > > > > > Unless someone argues credibly for keeping them in FBSD_1.0, I > > > will move them to FBSD_1.1 in a few days. > > > > > > DES > >=20 > > I'm not sure I see the point in that. Consider the > > not-moving-to-1.1 case. If somebody takes an 8.0 binary and runs > > it on 7.x, then they'll get a 'symbol not found' error. On the > > other hand, if they're moved and somebody tries the same thing, > > then they still get the same kind of 'symbol not found' error but > > with just one character different. > Additional difference is that presence of the version itself is > checked when the image is activated. This means that instead of abort > in the middle of the execution since the > rtld cannot find the symbol, the program gives error on the start.o >=20 > AFAIR, this is original (Sun) usage of the versioning, before GNU > extended it to allow individual version per symbol. This is absolutely correct description of the desired use of version names, according to both GNU and Sun. =20 > I support DES to fix this in the proposed way. Same here. --=20 Alexander Kabaev --Sig_/d0pqHUKmG9oGRdDuaK0YmMI Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iD8DBQFHpfWwQ6z1jMm+XZYRAiT3AKCEaMYe426bLPKGK0+/g/mdLP+PIwCfdQwL mr5lolibP1OyjRscuNFvOls= =8uRz -----END PGP SIGNATURE----- --Sig_/d0pqHUKmG9oGRdDuaK0YmMI-- From owner-freebsd-threads@FreeBSD.ORG Sun Feb 3 17:14:29 2008 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 1797316A418 for ; Sun, 3 Feb 2008 17:14:29 +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 D607B13C46E for ; Sun, 3 Feb 2008 17:14:28 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m13H030d013466; Sun, 3 Feb 2008 12:00:04 -0500 (EST) 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.0 (mail.netplex.net [204.213.176.10]); Sun, 03 Feb 2008 12:00:04 -0500 (EST) Date: Sun, 3 Feb 2008 12:00:04 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-Reply-To: <861w7um5o5.fsf@ds4.des.no> Message-ID: References: <861w7um5o5.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-851401618-1202058004=:8686" Cc: threads@freebsd.org, current@freebsd.org Subject: Re: Symbol versioning errors in libthr 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: Sun, 03 Feb 2008 17:14:29 -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. ---559023410-851401618-1202058004=:8686 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sun, 3 Feb 2008, Dag-Erling Sm=C3=B8rgrav wrote: > Here's an excerpt from the RELENG_7 vs HEAD diff of libthr's symbol map: > > --- pthread.map=0913 May 2007 14:12:39 -0000=091.18 > +++ pthread.map=0920 Dec 2007 04:32:28 -0000=091.21 > @@ -84,9 +84,13 @@ > =09pthread_multi_np; > =09pthread_mutex_destroy; > =09pthread_mutex_getprioceiling; > +=09pthread_mutex_getspinloops_np; > +=09pthread_mutex_getyieldloops_np; > =09pthread_mutex_init; > =09pthread_mutex_lock; > =09pthread_mutex_setprioceiling; > +=09pthread_mutex_setspinloops_np; > +=09pthread_mutex_setyieldloops_np; > =09pthread_mutex_timedlock; > =09pthread_mutex_trylock; > =09pthread_mutex_unlock; > > These functions are all in FBSD_1.0, but they were introduced after the > branch and never MFCed, so if I understand how we've implemented symbol > versioning, they should be in FBSD_1.1. > > Unless someone argues credibly for keeping them in FBSD_1.0, I will move > them to FBSD_1.1 in a few days. Yes, I believe you are correct in how we've decided to implement the version namespace. After a branch from HEAD (e.g., after 7- was branched), we increment the namespace and new symbols and ABI changes get added to the new namespace. --=20 DE ---559023410-851401618-1202058004=:8686-- From owner-freebsd-threads@FreeBSD.ORG Sun Feb 3 17:14:29 2008 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 AE96C16A419 for ; Sun, 3 Feb 2008 17:14:29 +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 5EE1413C465 for ; Sun, 3 Feb 2008 17:14:29 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m13H6SgY016519; Sun, 3 Feb 2008 12:06:28 -0500 (EST) 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.0 (mail.netplex.net [204.213.176.10]); Sun, 03 Feb 2008 12:06:28 -0500 (EST) Date: Sun, 3 Feb 2008 12:06:28 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Peter Wemm In-Reply-To: Message-ID: References: <861w7um5o5.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-684387517-1202058388=:8686" Cc: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , current@freebsd.org, threads@freebsd.org Subject: Re: Symbol versioning errors in libthr 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: Sun, 03 Feb 2008 17:14:29 -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. ---559023410-684387517-1202058388=:8686 Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sun, 3 Feb 2008, Peter Wemm wrote: > On Feb 3, 2008 8:16 AM, Dag-Erling Sm=F8rgrav wrote: >> Here's an excerpt from the RELENG_7 vs HEAD diff of libthr's symbol map: >> >> --- pthread.map 13 May 2007 14:12:39 -0000 1.18 >> +++ pthread.map 20 Dec 2007 04:32:28 -0000 1.21 >> @@ -84,9 +84,13 @@ >> pthread_multi_np; >> pthread_mutex_destroy; >> pthread_mutex_getprioceiling; >> + pthread_mutex_getspinloops_np; >> + pthread_mutex_getyieldloops_np; >> pthread_mutex_init; >> pthread_mutex_lock; >> pthread_mutex_setprioceiling; >> + pthread_mutex_setspinloops_np; >> + pthread_mutex_setyieldloops_np; >> pthread_mutex_timedlock; >> pthread_mutex_trylock; >> pthread_mutex_unlock; >> >> These functions are all in FBSD_1.0, but they were introduced after the >> branch and never MFCed, so if I understand how we've implemented symbol >> versioning, they should be in FBSD_1.1. >> >> Unless someone argues credibly for keeping them in FBSD_1.0, I will move >> them to FBSD_1.1 in a few days. >> >> DES > > I'm not sure I see the point in that. Consider the not-moving-to-1.1 > case. If somebody takes an 8.0 binary and runs it on 7.x, then > they'll get a 'symbol not found' error. On the other hand, if they're > moved and somebody tries the same thing, then they still get the same > kind of 'symbol not found' error but with just one character > different. > > The point of symbol versioning is to allow incompatible changes. eg: > to have a FBSD_1.0 version of pthread_mutex_getspinloops_np() *AND* a > FBSD_1.1 version of pthread_mutex_getspinloops_np() in the library > at the same time. The 1.0 instance would presumably be an API/ABI > conversion wrapper around the newer functions. New ABIs can be added to an existing namespace without breaking anything. But I believe we decided to always bump the namespace after a branch from HEAD and all new and ABI-changed symbols get added to that new namespace. This will allow us to write tools to check if a binary compiled on one release can run on an earlier release. Also, this does not prevent us from MFC'ing those symbols back to previous releases, they just have to be added to the same namespace from which they came. --=20 DE ---559023410-684387517-1202058388=:8686-- From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 09:33:12 2008 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 7ED8B16A46C for ; Mon, 4 Feb 2008 09:33:12 +0000 (UTC) (envelope-from girish_hilage@persistent.co.in) Received: from bmapps.persistent.co.in (outgoing.persistent.co.in [202.54.11.87]) by mx1.freebsd.org (Postfix) with ESMTP id 6E83F13C46E for ; Mon, 4 Feb 2008 09:33:11 +0000 (UTC) (envelope-from girish_hilage@persistent.co.in) Received: from bmapps.persistent.co.in (unknown [127.0.0.1]) by bmapps.persistent.co.in (Symantec Mail Security) with ESMTP id 9977D464015 for ; Mon, 4 Feb 2008 14:38:55 +0530 (IST) X-AuditID: 0a4e0006-a6d75bb00000524c-95-47a6d6265f5a Received: from mail.persistent.co.in (unknown [10.78.0.1]) (using TLSv1 with cipher DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by bmapps.persistent.co.in (Symantec Mail Security) with ESMTP id AB7B7420002 for ; Mon, 4 Feb 2008 14:38:54 +0530 (IST) Received: from ps2408.persistent.co.in ([10.77.196.113]) by mail.persistent.co.in (MOS 3.8.5-GA) with ESMTP id BQN17236 (AUTH girish_hilage); Mon, 4 Feb 2008 14:38:54 +0530 (IST) From: Girish Hilage To: fbsdthreads Date: Mon, 04 Feb 2008 14:39:31 +0530 Message-Id: <1202116171.16222.87.camel@ps2408.persistent.co.in> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 (2.6.0-1) X-Junkmail-Whitelist: YES (by domain whitelist at mail6.persistent.co.in) X-Brightmail-Tracker: AAAAAA== Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: no getpwnam_r() function on BSD? 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, 04 Feb 2008 09:33:12 -0000 Hi, What is the thread safe version of getpwnam() in BSD? I could not find getpwnam_r() on BSD. Regards, Girish DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 10:13:10 2008 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 2D5E316A419 for ; Mon, 4 Feb 2008 10:13:10 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id C3EEC13C46E for ; Mon, 4 Feb 2008 10:13:09 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (unknown [202.108.54.204]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTP id BF7222844D for ; Mon, 4 Feb 2008 18:13:08 +0800 (CST) Received: from localhost (unknown [202.108.54.204]) by tarsier.geekcn.org (Postfix) with ESMTP id 7B5A1EC28A5; Mon, 4 Feb 2008 18:13:08 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([202.108.54.204]) by localhost (mail.geekcn.org [202.108.54.204]) (amavisd-new, port 10024) with ESMTP id I1ZLlSERrba7; Mon, 4 Feb 2008 18:13:03 +0800 (CST) Received: from charlie.delphij.net (c-67-161-39-180.hsd1.ca.comcast.net [67.161.39.180]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id 213C5EC2882; Mon, 4 Feb 2008 18:13:01 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=QO1+WY2f5Z2hsUrq/ccj/RWV2VM7mNXZkh6F+97+uKBO8y7G/Clqk1LN1bf1M0mqa XqlQpxJeSXuiscB6MmOuQ== Message-ID: <47A6E52B.4070206@delphij.net> Date: Mon, 04 Feb 2008 02:12:59 -0800 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20080122) MIME-Version: 1.0 To: Girish Hilage References: <1202116171.16222.87.camel@ps2408.persistent.co.in> In-Reply-To: <1202116171.16222.87.camel@ps2408.persistent.co.in> X-Enigmail-Version: 0.95.5 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: fbsdthreads Subject: Re: no getpwnam_r() function on BSD? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 10:13:10 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Girish Hilage wrote: > Hi, > > What is the thread safe version of getpwnam() in BSD? > I could not find getpwnam_r() on BSD. Are you sure? [delphij@charlie] /usr/include> grep getpwnam_r * pwd.h:int getpwnam_r(const char *, struct passwd *, char *, size_t, [delphij@charlie] /usr/src/lib/libc> grep -R ^getpwnam_r * gen/getpwent.c:getpwnam_r(const char *name, struct passwd *pwd, char *buffer, size_t bufsize, Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHpuUqi+vbBBjt66ARAnCjAJ9gKCgnDd90mL0j9E06lq5lihQiQwCdElmU wETT7pfYZj1ZTLoQa59aMMs= =BbKl -----END PGP SIGNATURE----- From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 11:07:10 2008 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 1F3CA16A510 for ; Mon, 4 Feb 2008 11:07:10 +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 09C8C13C468 for ; Mon, 4 Feb 2008 11:07:10 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m14B79DJ017425 for ; Mon, 4 Feb 2008 11:07:09 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m14B79W4017421 for freebsd-threads@FreeBSD.org; Mon, 4 Feb 2008 11:07:09 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 4 Feb 2008 11:07:09 GMT Message-Id: <200802041107.m14B79W4017421@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, 04 Feb 2008 11:07:10 -0000 Current FreeBSD problem reports Critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- s threa/76690 threads fork hang in child for -lc_r 1 problem total. Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- s threa/24472 threads libc_r does not honor SO_SNDTIMEO/SO_RCVTIMEO socket o s threa/24632 threads libc_r delicate deviation from libc in handling SIGCHL s bin/32295 threads pthread dont dequeue signals s threa/34536 threads accept() blocks other threads f kern/38549 threads the procces compiled whith pthread stopped in pthread_ s threa/39922 threads [threads] [patch] Threaded applications executed with s threa/48856 threads Setting SIGCHLD to SIG_IGN still leaves zombies under s threa/49087 threads Signals lost in programs linked with libc_r o threa/70975 threads unexpected and unreliable behaviour when using SYSV se o threa/72953 threads fork() unblocks blocked signals w/o PTHREAD_SCOPE_SYST o threa/75273 threads FBSD 5.3 libpthread (KSE) bug o threa/75374 threads pthread_kill() ignores SA_SIGINFO flag s threa/76694 threads fork cause hang in dup()/close() function in child (-l o threa/79683 threads svctcp_create() fails if multiple threads call at the o threa/80435 threads panic on high loads o threa/83914 threads [libc] popen() doesn't work in static threaded program s threa/84483 threads problems with devel/nspr and -lc_r on 4.x s threa/94467 threads send(), sendto() and sendmsg() are not correct in libc s threa/100815 threads FBSD 5.5 broke nanosleep in libc_r o threa/101323 threads fork(2) in threaded programs broken. o threa/103975 threads Implicit loading/unloading of libpthread.so may crash o threa/110636 threads [request] gdb(1): using gdb with multi thread applicat o threa/118715 threads kse problem o threa/119920 threads [patch] fork broken in libpthread 24 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- s threa/30464 threads pthread mutex attributes -- pshared s threa/37676 threads libc_r: msgsnd(), msgrcv(), pread(), pwrite() need wra s threa/40671 threads pthread_cancel doesn't remove thread from condition qu s threa/69020 threads pthreads library leaks _gc_mutex o threa/79887 threads [patch] freopen() isn't thread-safe o threa/80992 threads abort() sometimes not caught by gdb depending on threa o threa/110306 threads apache 2.0 segmentation violation when calling gethost o threa/115211 threads pthread_atfork misbehaves in initial thread o threa/116181 threads /dev/io-related io access permissions are not propagat o threa/116668 threads can no longer use jdk15 with libthr on -stable SMP 10 problems total. From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 11:11:59 2008 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 76DB216A418 for ; Mon, 4 Feb 2008 11:11:59 +0000 (UTC) (envelope-from girish_hilage@persistent.co.in) Received: from bmapps.persistent.co.in (outgoing.persistent.co.in [202.54.11.87]) by mx1.freebsd.org (Postfix) with ESMTP id 9683413C465 for ; Mon, 4 Feb 2008 11:11:58 +0000 (UTC) (envelope-from girish_hilage@persistent.co.in) Received: from bmapps.persistent.co.in (unknown [127.0.0.1]) by bmapps.persistent.co.in (Symantec Mail Security) with ESMTP id 06B6446405F; Mon, 4 Feb 2008 16:41:57 +0530 (IST) X-AuditID: 0a4e0006-a356ebb00000524c-56-47a6f2fcad3c Received: from mail.persistent.co.in (unknown [10.78.0.1]) (using TLSv1 with cipher DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by bmapps.persistent.co.in (Symantec Mail Security) with ESMTP id D5534420002; Mon, 4 Feb 2008 16:41:56 +0530 (IST) Received: from ps2408.persistent.co.in ([10.77.196.113]) by mail.persistent.co.in (MOS 3.8.5-GA) with ESMTP id BQN29801 (AUTH girish_hilage); Mon, 4 Feb 2008 16:41:56 +0530 (IST) From: Girish Hilage To: d@delphij.net In-Reply-To: <47A6E52B.4070206@delphij.net> References: <1202116171.16222.87.camel@ps2408.persistent.co.in> <47A6E52B.4070206@delphij.net> Date: Mon, 04 Feb 2008 16:42:33 +0530 Message-Id: <1202123554.16222.92.camel@ps2408.persistent.co.in> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 (2.6.0-1) X-Junkmail-Whitelist: YES (by domain whitelist at mail6.persistent.co.in) X-Brightmail-Tracker: AAAAAA== Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: fbsdthreads Subject: Re: no getpwnam_r() function on BSD? 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, 04 Feb 2008 11:11:59 -0000 I searched at both these locations but could only find getpwnam() but not _r(). "uname -sr" on my machine shows ---> FreeBSD 4.10-RELEASE So, is getpwnam_r() not available on this version? Regards, Girish On Mon, 2008-02-04 at 02:12 -0800, Xin LI wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Girish Hilage wrote: > > Hi, > > > > What is the thread safe version of getpwnam() in BSD? > > I could not find getpwnam_r() on BSD. > > Are you sure? > > [delphij@charlie] /usr/include> grep getpwnam_r * > pwd.h:int getpwnam_r(const char *, struct passwd *, char *, size_t, > > [delphij@charlie] /usr/src/lib/libc> grep -R ^getpwnam_r * > gen/getpwent.c:getpwnam_r(const char *name, struct passwd *pwd, char > *buffer, size_t bufsize, > > Cheers, > - -- > Xin LI http://www.delphij.net/ > FreeBSD - The Power to Serve! > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.4 (FreeBSD) > > iD8DBQFHpuUqi+vbBBjt66ARAnCjAJ9gKCgnDd90mL0j9E06lq5lihQiQwCdElmU > wETT7pfYZj1ZTLoQa59aMMs= > =BbKl > -----END PGP SIGNATURE----- DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 11:15:03 2008 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 E95BE16A421; Mon, 4 Feb 2008 11:15:03 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 9FB5613C4F4; Mon, 4 Feb 2008 11:15:03 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 20B10207F; Mon, 4 Feb 2008 12:14:55 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.2/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 9FB8F2049; Mon, 4 Feb 2008 12:14:54 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id 84F24844A0; Mon, 4 Feb 2008 12:14:54 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: src-committers@FreeBSD.org References: <200802032238.m13McAbf065324@repoman.freebsd.org> Date: Mon, 04 Feb 2008 12:14:54 +0100 In-Reply-To: <200802032238.m13McAbf065324@repoman.freebsd.org> (Dag-Erling Smorgrav's message of "Sun\, 3 Feb 2008 22\:38\:10 +0000 \(UTC\)") Message-ID: <86d4rdgehd.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: cvs-src@FreeBSD.org, cvs-all@FreeBSD.org, threads@freebsd.org Subject: Re: cvs commit: src/include pthread_np.h src/lib/libthr pthread.map src/lib/libthr/thread thr_mutex.c 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, 04 Feb 2008 11:15:04 -0000 Dag-Erling Smorgrav writes: > Log: > Add pthread_mutex_islocked_np(), a cheap way to verify that a mutex is > locked. This is intended primarily to support the userland equivalent > of the various *_ASSERT_LOCKED() macros we have in the kernel. I'm having second thoughts about this one. There is a significant risk of false positives if the mutex is currently locked by another thread. I'm wondering whether to a) change the implementation so it only returns true if the mutex is owned by the current thread, or b) change the interface so you can specify a specific thread, or NULL for "any". DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 11:29:20 2008 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 6BD6C16A418; Mon, 4 Feb 2008 11:29:20 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 1AA2413C467; Mon, 4 Feb 2008 11:29:19 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 407E1207E; Mon, 4 Feb 2008 12:29:09 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.2/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 2C7A02049; Mon, 4 Feb 2008 12:29:09 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id 166A0844A0; Mon, 4 Feb 2008 12:29:09 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Attilio Rao" References: <200802032238.m13McAbf065324@repoman.freebsd.org> <86d4rdgehd.fsf@ds4.des.no> <3bbf2fe10802040318q456556e4g8c63299ab67c71e8@mail.gmail.com> Date: Mon, 04 Feb 2008 12:29:09 +0100 In-Reply-To: <3bbf2fe10802040318q456556e4g8c63299ab67c71e8@mail.gmail.com> (Attilio Rao's message of "Mon\, 4 Feb 2008 12\:18\:37 +0100") Message-ID: <868x21gdtm.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, threads@freebsd.org Subject: Re: cvs commit: src/include pthread_np.h src/lib/libthr pthread.map src/lib/libthr/thread thr_mutex.c 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, 04 Feb 2008 11:29:20 -0000 "Attilio Rao" writes: > Dag-Erling Sm=C3=B8rgrav writes: > > I'm having second thoughts about this one. There is a significant > > risk of false positives if the mutex is currently locked by another > > thread. I'm wondering whether to a) change the implementation so it > > only returns true if the mutex is owned by the current thread, or b) > > change the interface so you can specify a specific thread, or NULL > > for "any". > Please don't do the latter. Semantically the right thing to do here > is to assert if the curthread owns the lock or not. Any lock should > not be interested on what is the state in regard of other locks. Thank you. That was my thought as well, but I didn't want to exclude the alternative without discussion. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 11:45:23 2008 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 CABA916A41B for ; Mon, 4 Feb 2008 11:45:23 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by mx1.freebsd.org (Postfix) with ESMTP id 4ED2213C461 for ; Mon, 4 Feb 2008 11:45:23 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so1550671uge.37 for ; Mon, 04 Feb 2008 03:45:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=uYyIiMMETAax0qSrkkeu7kxbNdvR7P1yL9nrqYyiqRU=; b=eZizuxy6jVT9OY5TFkdUUqaC9Dwyl/t3VwUgh/4YgOw5SMaUi4EFSZEfztLdJgvsfMxUzqsiVjU6EwTerEv+kI0ZKBUx30MNlYX2FhaAzk6udpQdcTRFiZfFUyY8nfMVP0fgGAeTnVnQOU9g53nqcNWWYvWSKlr6v/SZop4FgVc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=JTPZXN1pBwrwDzeNLusMuQbeFWZ0zzWjN4yCKC4WoID3SBGPicGjO+MaairHjNDNmvxoHzko6mwhmuGn7uxYK0E66Xs8PW3xHfH3IAp12uuHmqU9E4pI/Ebjhfa7+EwASRv5PQ0YKOZrbSRNVl2p/zbzQQXOKRTrJhkWFPlktig= Received: by 10.66.248.5 with SMTP id v5mr231197ugh.17.1202123917282; Mon, 04 Feb 2008 03:18:37 -0800 (PST) Received: by 10.86.28.19 with HTTP; Mon, 4 Feb 2008 03:18:37 -0800 (PST) Message-ID: <3bbf2fe10802040318q456556e4g8c63299ab67c71e8@mail.gmail.com> Date: Mon, 4 Feb 2008 12:18:37 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "=?UTF-8?Q?Dag-Erling_Sm=C3=B8rgrav?=" In-Reply-To: <86d4rdgehd.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 Content-Disposition: inline References: <200802032238.m13McAbf065324@repoman.freebsd.org> <86d4rdgehd.fsf@ds4.des.no> X-Google-Sender-Auth: 7838b6160d7168b7 Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, threads@freebsd.org Subject: Re: cvs commit: src/include pthread_np.h src/lib/libthr pthread.map src/lib/libthr/thread thr_mutex.c 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, 04 Feb 2008 11:45:23 -0000 MjAwOC8yLzQsIERhZy1FcmxpbmcgU23DuHJncmF2IDxkZXNAZGVzLm5vPjoKPiBEYWctRXJsaW5n IFNtb3JncmF2IDxkZXNARnJlZUJTRC5vcmc+IHdyaXRlczoKPiAgPiAgIExvZzoKPiAgPiAgIEFk ZCBwdGhyZWFkX211dGV4X2lzbG9ja2VkX25wKCksIGEgY2hlYXAgd2F5IHRvIHZlcmlmeSB0aGF0 IGEgbXV0ZXggaXMKPiAgPiAgIGxvY2tlZC4gIFRoaXMgaXMgaW50ZW5kZWQgcHJpbWFyaWx5IHRv IHN1cHBvcnQgdGhlIHVzZXJsYW5kIGVxdWl2YWxlbnQKPiAgPiAgIG9mIHRoZSB2YXJpb3VzICpf QVNTRVJUX0xPQ0tFRCgpIG1hY3JvcyB3ZSBoYXZlIGluIHRoZSBrZXJuZWwuCj4KPgo+IEknbSBo YXZpbmcgc2Vjb25kIHRob3VnaHRzIGFib3V0IHRoaXMgb25lLiAgVGhlcmUgaXMgYSBzaWduaWZp Y2FudCByaXNrCj4gIG9mIGZhbHNlIHBvc2l0aXZlcyBpZiB0aGUgbXV0ZXggaXMgY3VycmVudGx5 IGxvY2tlZCBieSBhbm90aGVyIHRocmVhZC4KPiAgSSdtIHdvbmRlcmluZyB3aGV0aGVyIHRvIGEp IGNoYW5nZSB0aGUgaW1wbGVtZW50YXRpb24gc28gaXQgb25seSByZXR1cm5zCj4gIHRydWUgaWYg dGhlIG11dGV4IGlzIG93bmVkIGJ5IHRoZSBjdXJyZW50IHRocmVhZCwgb3IgYikgY2hhbmdlIHRo ZQo+ICBpbnRlcmZhY2Ugc28geW91IGNhbiBzcGVjaWZ5IGEgc3BlY2lmaWMgdGhyZWFkLCBvciBO VUxMIGZvciAiYW55Ii4KClBsZWFzZSBkb24ndCBkbyB0aGUgbGF0dGVyLgpTZW1hbnRpY2FsbHkg dGhlIHJpZ2h0IHRoaW5nIHRvIGRvIGhlcmUgaXMgdG8gYXNzZXJ0IGlmIHRoZSBjdXJ0aHJlYWQK b3ducyB0aGUgbG9jayBvciBub3QuIEFueSBsb2NrIHNob3VsZCBub3QgYmUgaW50ZXJlc3RlZCBv biB3aGF0IGlzIHRoZQpzdGF0ZSBpbiByZWdhcmQgb2Ygb3RoZXIgbG9ja3MuCgpBdHRpbGlvCgoK LS0gClBlYWNlIGNhbiBvbmx5IGJlIGFjaGlldmVkIGJ5IHVuZGVyc3RhbmRpbmcgLSBBLiBFaW5z dGVpbgo= From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 11:50:32 2008 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 0896516A420 for ; Mon, 4 Feb 2008 11:50:32 +0000 (UTC) (envelope-from karl.h.beckers@gmx.net) Received: from grotesk.our-isp.org (www.our-isp.org [82.165.43.21]) by mx1.freebsd.org (Postfix) with ESMTP id BE64313C467 for ; Mon, 4 Feb 2008 11:50:31 +0000 (UTC) (envelope-from karl.h.beckers@gmx.net) Received: from www.our-isp.org (localhost [127.0.0.1]) by grotesk.our-isp.org (Postfix) with ESMTP id 2878725DFD for ; Mon, 4 Feb 2008 12:31:23 +0100 (CET) Received: from 192.9.112.196 (SquirrelMail authenticated user khb@jarre-de-the.net) by www.our-isp.org with HTTP; Mon, 4 Feb 2008 12:31:23 +0100 (CET) Message-ID: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> Date: Mon, 4 Feb 2008 12:31:23 +0100 (CET) From: "Karl H. Beckers" To: freebsd-threads@freebsd.org User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: threading in FreeBSD (acx_pthreads) 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, 04 Feb 2008 11:50:32 -0000 Hi all, could you please include me directly in your replies ... I haven't subscribed. I'm trying to move my configure.in from manual threading libs detection to acx_pthreads. That, however, prefers -kthread over -pthread where I previously did this: if ( test -x /sbin/sysctl ) ; then ac_my_freebsd_release=`/sbin/sysctl -n kern.osreldate` else ac_my_freebsd_release=`/usr/sbin/sysctl -n kern.osreldate` fi if ( expr ${ac_my_freebsd_release} \< 500016 ) ; then LIBS="${LIBS} -pthread" else LIBS="${LIBS} -lc_r" fi Could anybody make a recommendation of the propert thing to do on FreeBSD? Is the acx_pthread assumption OK, or should I patch that? TIA, Karl. From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 14:42:37 2008 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 C48FA16A417; Mon, 4 Feb 2008 14:42:37 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 7A96413C43E; Mon, 4 Feb 2008 14:42:37 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id E34302082; Mon, 4 Feb 2008 15:42:28 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.2/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 6015D207F; Mon, 4 Feb 2008 15:42:28 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id 4076C8448B; Mon, 4 Feb 2008 15:42:28 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alexander Kabaev References: <861w7um5o5.fsf@ds4.des.no> <20080203162918.GK57756@deviant.kiev.zoral.com.ua> <20080203121112.426a8c25@kan.dnsalias.net> Date: Mon, 04 Feb 2008 15:42:28 +0100 In-Reply-To: <20080203121112.426a8c25@kan.dnsalias.net> (Alexander Kabaev's message of "Sun\, 3 Feb 2008 12\:11\:12 -0500") Message-ID: <86zlugeqaz.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: threads@freebsd.org, current@freebsd.org, Peter Wemm Subject: Re: Symbol versioning errors 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: Mon, 04 Feb 2008 14:42:37 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I've attached my proposed patch. Please yell if there's anything wrong with it. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=pthread.map.diff Index: pthread.map =================================================================== RCS file: /home/ncvs/src/lib/libthr/pthread.map,v retrieving revision 1.22 diff -u -r1.22 pthread.map --- pthread.map 3 Feb 2008 22:38:10 -0000 1.22 +++ pthread.map 4 Feb 2008 14:41:23 -0000 @@ -84,13 +84,9 @@ pthread_multi_np; pthread_mutex_destroy; pthread_mutex_getprioceiling; - pthread_mutex_getspinloops_np; - pthread_mutex_getyieldloops_np; pthread_mutex_init; pthread_mutex_lock; pthread_mutex_setprioceiling; - pthread_mutex_setspinloops_np; - pthread_mutex_setyieldloops_np; pthread_mutex_timedlock; pthread_mutex_trylock; pthread_mutex_unlock; @@ -287,14 +283,9 @@ _pthread_multi_np; _pthread_mutex_destroy; _pthread_mutex_getprioceiling; - _pthread_mutex_getspinloops_np; - _pthread_mutex_getyieldloops_np; _pthread_mutex_init; - _pthread_mutex_init_calloc_cb; _pthread_mutex_lock; _pthread_mutex_setprioceiling; - _pthread_mutex_setspinloops_np; - _pthread_mutex_setyieldloops_np; _pthread_mutex_timedlock; _pthread_mutex_trylock; _pthread_mutex_unlock; @@ -398,14 +389,23 @@ FBSD_1.1 { global: + pthread_mutex_getspinloops_np; + pthread_mutex_getyieldloops_np; pthread_mutex_islocked_np; + pthread_mutex_setspinloops_np; + pthread_mutex_setyieldloops_np; local: *; } FBSD_1.0; FBSDprivate_1.1 { global: + _pthread_mutex_getspinloops_np; + _pthread_mutex_getyieldloops_np; + _pthread_mutex_init_calloc_cb; _pthread_mutex_islocked_np; + _pthread_mutex_setspinloops_np; + _pthread_mutex_setyieldloops_np; local: *; } FBSDprivate_1.0; --=-=-=-- From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 15:08:58 2008 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 6AF5D16A420 for ; Mon, 4 Feb 2008 15:08:58 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 2793F13C447 for ; Mon, 4 Feb 2008 15:08:58 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 2EF8A207E; Mon, 4 Feb 2008 15:51:54 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.2/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 202CD2049; Mon, 4 Feb 2008 15:51:54 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id 0A6178449D; Mon, 4 Feb 2008 15:51:54 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Girish Hilage References: <1202116171.16222.87.camel@ps2408.persistent.co.in> <47A6E52B.4070206@delphij.net> <1202123554.16222.92.camel@ps2408.persistent.co.in> Date: Mon, 04 Feb 2008 15:51:53 +0100 In-Reply-To: <1202123554.16222.92.camel@ps2408.persistent.co.in> (Girish Hilage's message of "Mon\, 04 Feb 2008 16\:42\:33 +0530") Message-ID: <86r6fsepva.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: d@delphij.net, fbsdthreads Subject: Re: no getpwnam_r() function on BSD? 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, 04 Feb 2008 15:08:58 -0000 Girish Hilage writes: > "uname -sr" on my machine shows ---> FreeBSD 4.10-RELEASE 4.10 reached its official end-of-life almost two years ago. You would do well to upgrade to something slightly less ancient. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 15:08:58 2008 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 7165616A421 for ; Mon, 4 Feb 2008 15:08:58 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 2E2C913C46B for ; Mon, 4 Feb 2008 15:08:58 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 189542087; Mon, 4 Feb 2008 15:49:42 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.2/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 9666F2083; Mon, 4 Feb 2008 15:49:41 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id 815CF8449D; Mon, 4 Feb 2008 15:49:41 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Karl H. Beckers" References: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> Date: Mon, 04 Feb 2008 15:49:41 +0100 In-Reply-To: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> (Karl H. Beckers's message of "Mon\, 4 Feb 2008 12\:31\:23 +0100 \(CET\)") Message-ID: <86ve54epyy.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-threads@freebsd.org Subject: Re: threading in FreeBSD (acx_pthreads) 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, 04 Feb 2008 15:08:58 -0000 "Karl H. Beckers" writes: > I'm trying to move my configure.in from manual threading libs detection > to acx_pthreads [...] I have no idea what acx_pthread is, but judging from your description, it doesn't seem to do a very good job. There's nothing wrong with manual detection - see how Varnish does it: http://varnish.projects.linpro.no/browser/trunk/varnish-cache/configure.ac Note that the correct idiom according to POSIX is -lpthread, so that should in theory work on all POSIX platforms. The reason why Varnish checks for -lthr explicitly is that there are FreeBSD versions where -lpthread defaults to -lkse instead of -lthr, and -lkse has proven to break rather badly under load. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 15:25:52 2008 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 3475716A419 for ; Mon, 4 Feb 2008 15:25:52 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 1D00613C4F0 for ; Mon, 4 Feb 2008 15:25:52 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id 169AC1A4D83; Mon, 4 Feb 2008 07:10:39 -0800 (PST) From: John Baldwin To: freebsd-threads@freebsd.org Date: Mon, 4 Feb 2008 09:42:26 -0500 User-Agent: KMail/1.9.7 References: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> In-Reply-To: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802040942.26708.jhb@freebsd.org> Cc: "Karl H. Beckers" Subject: Re: threading in FreeBSD (acx_pthreads) 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, 04 Feb 2008 15:25:52 -0000 On Monday 04 February 2008 06:31:23 am Karl H. Beckers wrote: > Hi all, > > could you please include me directly in your replies ... I haven't > subscribed. > > I'm trying to move my configure.in from manual threading libs detection > to acx_pthreads. That, however, prefers -kthread over -pthread where I > previously did this: > > if ( test -x /sbin/sysctl ) ; then > ac_my_freebsd_release=`/sbin/sysctl -n > kern.osreldate` > else > ac_my_freebsd_release=`/usr/sbin/sysctl -n > kern.osreldate` > fi > if ( expr ${ac_my_freebsd_release} \< 500016 ) ; then > LIBS="${LIBS} -pthread" > else > LIBS="${LIBS} -lc_r" > fi > > Could anybody make a recommendation of the propert thing to do on > FreeBSD? Is the acx_pthread assumption OK, or should I patch that? Just always use -pthread. -lc_r is wrong on 6.x+ anyway, but -pthread should always work. -- John Baldwin From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 15:48:06 2008 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 43CBF16A417; Mon, 4 Feb 2008 15:48:06 +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 EF2DF13C4D1; Mon, 4 Feb 2008 15:48:05 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m14Flv9R005742; Mon, 4 Feb 2008 10:47:57 -0500 (EST) 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.0 (mail.netplex.net [204.213.176.10]); Mon, 04 Feb 2008 10:47:57 -0500 (EST) Date: Mon, 4 Feb 2008 10:47:57 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-Reply-To: <86d4rdgehd.fsf@ds4.des.no> Message-ID: References: <200802032238.m13McAbf065324@repoman.freebsd.org> <86d4rdgehd.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-1804928587-1202140077=:13743" Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, threads@freebsd.org Subject: Re: cvs commit: src/include pthread_np.h src/lib/libthr pthread.map src/lib/libthr/thread thr_mutex.c 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, 04 Feb 2008 15:48:06 -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. ---559023410-1804928587-1202140077=:13743 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 4 Feb 2008, Dag-Erling Sm=C3=B8rgrav wrote: > Dag-Erling Smorgrav writes: >> Log: >> Add pthread_mutex_islocked_np(), a cheap way to verify that a mutex is >> locked. This is intended primarily to support the userland equivalent >> of the various *_ASSERT_LOCKED() macros we have in the kernel. > > I'm having second thoughts about this one. There is a significant risk > of false positives if the mutex is currently locked by another thread. > I'm wondering whether to a) change the implementation so it only returns > true if the mutex is owned by the current thread, or b) change the > interface so you can specify a specific thread, or NULL for "any". I thought you wanted to know if it was locked regardless of who locked it. If you want to know if the current thread has it locked, it should be called pthread_mutex_isowned_np(). I don't really see the utility in any other behavior, and almost question the need for _isowned. I wonder if all the _np() functions should be in the FBSDprivate namespace... --=20 DE ---559023410-1804928587-1202140077=:13743-- From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 15:49:18 2008 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 E5ED816A46B; Mon, 4 Feb 2008 15:49:18 +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 984FE13C4D9; Mon, 4 Feb 2008 15:49:18 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m14FnFlY006631; Mon, 4 Feb 2008 10:49:15 -0500 (EST) 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.0 (mail.netplex.net [204.213.176.10]); Mon, 04 Feb 2008 10:49:15 -0500 (EST) Date: Mon, 4 Feb 2008 10:49:15 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-Reply-To: <868x21gdtm.fsf@ds4.des.no> Message-ID: References: <200802032238.m13McAbf065324@repoman.freebsd.org> <86d4rdgehd.fsf@ds4.des.no> <3bbf2fe10802040318q456556e4g8c63299ab67c71e8@mail.gmail.com> <868x21gdtm.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-758783491-1202140155=:13743" Cc: Attilio Rao , cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, threads@freebsd.org Subject: Re: cvs commit: src/include pthread_np.h src/lib/libthr pthread.map src/lib/libthr/thread thr_mutex.c 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, 04 Feb 2008 15:49:19 -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. ---559023410-758783491-1202140155=:13743 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 4 Feb 2008, Dag-Erling Sm=C3=B8rgrav wrote: > "Attilio Rao" writes: >> Dag-Erling Sm=C3=B8rgrav writes: >>> I'm having second thoughts about this one. There is a significant >>> risk of false positives if the mutex is currently locked by another >>> thread. I'm wondering whether to a) change the implementation so it >>> only returns true if the mutex is owned by the current thread, or b) >>> change the interface so you can specify a specific thread, or NULL >>> for "any". >> Please don't do the latter. Semantically the right thing to do here >> is to assert if the curthread owns the lock or not. Any lock should >> not be interested on what is the state in regard of other locks. > > Thank you. That was my thought as well, but I didn't want to exclude > the alternative without discussion. Then please change the API so that it is pthread_mutex_isowned_np(). --=20 DE ---559023410-758783491-1202140155=:13743-- From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 16:05:33 2008 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 2614316A417 for ; Mon, 4 Feb 2008 16:05:33 +0000 (UTC) (envelope-from karl.h.beckers@gmx.net) Received: from grotesk.our-isp.org (www.our-isp.org [82.165.43.21]) by mx1.freebsd.org (Postfix) with ESMTP id 94E0E13C4CC for ; Mon, 4 Feb 2008 16:05:27 +0000 (UTC) (envelope-from karl.h.beckers@gmx.net) Received: from www.our-isp.org (localhost [127.0.0.1]) by grotesk.our-isp.org (Postfix) with ESMTP id 0E46026758; Mon, 4 Feb 2008 17:05:18 +0100 (CET) Received: from 192.9.112.196 (SquirrelMail authenticated user khb@jarre-de-the.net) by www.our-isp.org with HTTP; Mon, 4 Feb 2008 17:05:18 +0100 (CET) Message-ID: <43451.192.9.112.196.1202141118.squirrel@www.our-isp.org> In-Reply-To: <86ve54epyy.fsf@ds4.des.no> References: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> <86ve54epyy.fsf@ds4.des.no> Date: Mon, 4 Feb 2008 17:05:18 +0100 (CET) From: "Karl H. Beckers" To: Dag-Erling =?iso-8859-1?Q?Sm=C3=B8rgrav?= User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: "Karl H. Beckers" , freebsd-threads@freebsd.org Subject: Re: threading in FreeBSD (acx_pthreads) 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, 04 Feb 2008 16:05:33 -0000 Thanks so far, acx_pthread is this autoconf m4 macro: http://ac-archive.sourceforge.net/ac-archive/acx_pthread.html It looks rather promising. And while I might copy it over and fix it locally, I would like to escalate this upstream, if the algorithm there is wrong. Either way, I'd need to know what the correct way is. What I understood now is: On current versions -lpthread should work. On some older versions I should be using -lthr (so not -lc_r, then?). Is there a safe way to check whether we're running a version that needs -lthr? In the varnish example you provided, I cannot find a check for it?!? Thanks, Karl. On Mon, February 4, 2008 3:49 pm, Dag-Erling SmÞrgrav said: > "Karl H. Beckers" writes: >> I'm trying to move my configure.in from manual threading libs detection >> to acx_pthreads [...] > > I have no idea what acx_pthread is, but judging from your description, > it doesn't seem to do a very good job. There's nothing wrong with > manual detection - see how Varnish does it: > > http://varnish.projects.linpro.no/browser/trunk/varnish-cache/configure.ac > > Note that the correct idiom according to POSIX is -lpthread, so that > should in theory work on all POSIX platforms. The reason why Varnish > checks for -lthr explicitly is that there are FreeBSD versions where > -lpthread defaults to -lkse instead of -lthr, and -lkse has proven to > break rather badly under load. > > DES > -- > Dag-Erling SmÞrgrav - des@des.no > > From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 16:16:19 2008 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 7B1B016A419 for ; Mon, 4 Feb 2008 16:16:19 +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 7F18413C455 for ; Mon, 4 Feb 2008 16:16:14 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m14GG9Ps024622; Mon, 4 Feb 2008 11:16:09 -0500 (EST) 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.0 (mail.netplex.net [204.213.176.10]); Mon, 04 Feb 2008 11:16:10 -0500 (EST) Date: Mon, 4 Feb 2008 11:16:09 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: "Karl H. Beckers" In-Reply-To: <43451.192.9.112.196.1202141118.squirrel@www.our-isp.org> Message-ID: References: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> <86ve54epyy.fsf@ds4.des.no> <43451.192.9.112.196.1202141118.squirrel@www.our-isp.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Dag-Erling =?iso-8859-1?Q?Sm=C3=B8rgrav?= , freebsd-threads@freebsd.org Subject: Re: threading in FreeBSD (acx_pthreads) 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, 04 Feb 2008 16:16:19 -0000 On Mon, 4 Feb 2008, Karl H. Beckers wrote: > Thanks so far, > > acx_pthread is this autoconf m4 macro: > http://ac-archive.sourceforge.net/ac-archive/acx_pthread.html I don't see anything wrong with that macro. If I understand it correctly, it should work on FreeBSD and pick up "-pthread". > It looks rather promising. And while I might copy it over and fix it > locally, I would like to escalate this upstream, if the algorithm there is > wrong. > Either way, I'd need to know what the correct way is. > What I understood now is: > On current versions -lpthread should work. On some older versions I should > be using -lthr (so not -lc_r, then?). No, do not use -lpthread. Refer to John Baldwin's response, -pthread is what you should be using. Also, our ports system allows one to override -pthread (the default) with PTHREAD_LIBS and PTHREAD_CFLAGS. I suspect that part of the macro came from us (FreeBSD). Please do not escalate anything upstream without checking with our ports team, as it looks like the m4 macro has already been adjusted for FreeBSD. > Is there a safe way to check whether we're running a version that needs > -lthr? In the varnish example you provided, I cannot find a check for > it?!? -- DE From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 16:17:59 2008 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 9742416A417; Mon, 4 Feb 2008 16:17:59 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 4C92C13C45A; Mon, 4 Feb 2008 16:17:59 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 912DF207F; Mon, 4 Feb 2008 17:17:51 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.2/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 7DABD207E; Mon, 4 Feb 2008 17:17:51 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id 6149584493; Mon, 4 Feb 2008 17:17:51 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Daniel Eischen References: <200802032238.m13McAbf065324@repoman.freebsd.org> <86d4rdgehd.fsf@ds4.des.no> Date: Mon, 04 Feb 2008 17:17:51 +0100 In-Reply-To: (Daniel Eischen's message of "Mon\, 4 Feb 2008 10\:47\:57 -0500 \(EST\)") Message-ID: <868x20elw0.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, threads@freebsd.org Subject: Re: cvs commit: src/include pthread_np.h src/lib/libthr pthread.map src/lib/libthr/thread thr_mutex.c 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, 04 Feb 2008 16:17:59 -0000 Daniel Eischen writes: > I thought you wanted to know if it was locked regardless of who locked > it. Uh, no, that was not the intention. > If you want to know if the current thread has it locked, it should be > called pthread_mutex_isowned_np(). I don't see why one would be more correct than the other... > I don't really see the utility in any other behavior, and almost > question the need for _isowned. It is extremely useful when debugging threaded code, as evidenced by the numerous *_LOCKED macros that are used throughout the kernel. Those macros saved me a lot of time and aggravation when I made procfs and linprocfs MPSAFE, for instance, and I am working on userland code at the moment which would benefit greatly from the ability to assert that the appropriate mutex is locked at the entry of a function that accesses or modifies the corresponding data structure. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 16:22:36 2008 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 B676516A41A for ; Mon, 4 Feb 2008 16:22:36 +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 74E0313C4DD for ; Mon, 4 Feb 2008 16:22:36 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m14GMVrI029189; Mon, 4 Feb 2008 11:22:31 -0500 (EST) 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.0 (mail.netplex.net [204.213.176.10]); Mon, 04 Feb 2008 11:22:32 -0500 (EST) Date: Mon, 4 Feb 2008 11:22:31 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: "Karl H. Beckers" In-Reply-To: Message-ID: References: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> <86ve54epyy.fsf@ds4.des.no> <43451.192.9.112.196.1202141118.squirrel@www.our-isp.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Dag-Erling =?iso-8859-1?Q?Sm=C3=B8rgrav?= , freebsd-threads@freebsd.org Subject: Re: threading in FreeBSD (acx_pthreads) 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, 04 Feb 2008 16:22:36 -0000 On Mon, 4 Feb 2008, Daniel Eischen wrote: > On Mon, 4 Feb 2008, Karl H. Beckers wrote: > >> Thanks so far, >> >> acx_pthread is this autoconf m4 macro: >> http://ac-archive.sourceforge.net/ac-archive/acx_pthread.html > > I don't see anything wrong with that macro. If I understand it > correctly, it should work on FreeBSD and pick up "-pthread". One other thing, there is no -kthread any longer (not sure this should even be listed) and I'm unsure about the ordering of lthread vs -pthread. I would think that -pthread would be preferred and should be listed before lthread, but that may depend on what the default library search path is. -- DE From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 16:31:13 2008 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 45C2516A417; Mon, 4 Feb 2008 16:31:13 +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 F20B613C4D5; Mon, 4 Feb 2008 16:31:12 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m14GV9X1005093; Mon, 4 Feb 2008 11:31:09 -0500 (EST) 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.0 (mail.netplex.net [204.213.176.10]); Mon, 04 Feb 2008 11:31:09 -0500 (EST) Date: Mon, 4 Feb 2008 11:31:09 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-Reply-To: <868x20elw0.fsf@ds4.des.no> Message-ID: References: <200802032238.m13McAbf065324@repoman.freebsd.org> <86d4rdgehd.fsf@ds4.des.no> <868x20elw0.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-684387517-1202142669=:13899" Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, threads@freebsd.org Subject: Re: cvs commit: src/include pthread_np.h src/lib/libthr pthread.map src/lib/libthr/thread thr_mutex.c 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, 04 Feb 2008 16:31:13 -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. ---559023410-684387517-1202142669=:13899 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 4 Feb 2008, Dag-Erling Sm=C3=B8rgrav wrote: > Daniel Eischen writes: >> I thought you wanted to know if it was locked regardless of who locked >> it. > > Uh, no, that was not the intention. > >> If you want to know if the current thread has it locked, it should be >> called pthread_mutex_isowned_np(). > > I don't see why one would be more correct than the other... Because it is more obvious that _isowned() is for the current thread than _islocked(). As you can tell by my previous (incorrect)=20 assumption. There is prior art for this outside of FreeBSD. Solaris has mutex_owned() as part of their kernel mutex API. I would suggest using pthread_mutex_owned_np(). Hmm, even FreeBSD has mtx_owned() :-) --=20 DE ---559023410-684387517-1202142669=:13899-- From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 16:50:10 2008 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 9F3A016A420; Mon, 4 Feb 2008 16:50:10 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 59F3A13C459; Mon, 4 Feb 2008 16:50:10 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id B24E62084; Mon, 4 Feb 2008 17:50:00 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.2/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 2742F207F; Mon, 4 Feb 2008 17:50:00 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id 0D51F8449D; Mon, 4 Feb 2008 17:50:00 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Daniel Eischen References: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> <86ve54epyy.fsf@ds4.des.no> <43451.192.9.112.196.1202141118.squirrel@www.our-isp.org> Date: Mon, 04 Feb 2008 17:49:59 +0100 In-Reply-To: (Daniel Eischen's message of "Mon\, 4 Feb 2008 11\:16\:09 -0500 \(EST\)") Message-ID: <86zlugd5u0.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: "Karl H. Beckers" , freebsd-threads@freebsd.org Subject: Re: threading in FreeBSD (acx_pthreads) 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, 04 Feb 2008 16:50:10 -0000 Daniel Eischen writes: > No, do not use -lpthread. Refer to John Baldwin's response, -pthread is > what you should be using. That is not what POSIX says. That is not what our own man pages say, either. In my recollection, it's not even what the people who started our transition away from libc_r said (though it waffled back and forth for a bit, so I may misremember). More importantly, it makes *absolutely no difference* to the finished code. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 16:55:59 2008 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 B46AE16A418; Mon, 4 Feb 2008 16:55:59 +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 6E7CF13C46A; Mon, 4 Feb 2008 16:55:59 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m14GtqUc023021; Mon, 4 Feb 2008 11:55:52 -0500 (EST) 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.0 (mail.netplex.net [204.213.176.10]); Mon, 04 Feb 2008 11:55:53 -0500 (EST) Date: Mon, 4 Feb 2008 11:55:52 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-Reply-To: <86zlugeqaz.fsf@ds4.des.no> Message-ID: References: <861w7um5o5.fsf@ds4.des.no> <20080203162918.GK57756@deviant.kiev.zoral.com.ua> <20080203121112.426a8c25@kan.dnsalias.net> <86zlugeqaz.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/Mixed; BOUNDARY="=-=-=" Content-ID: Cc: threads@freebsd.org, Peter Wemm , current@freebsd.org Subject: Re: Symbol versioning errors in libthr 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, 04 Feb 2008 16:55:59 -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. --=-=-= Content-Type: TEXT/PLAIN; CHARSET=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Content-ID: On Mon, 4 Feb 2008, Dag-Erling Sm=C3=B8rgrav wrote: > I've attached my proposed patch. Please yell if there's anything wrong > with it. I question the bumping of FBSDprivate to 1.1. FBSDprivate is special, it is only for use in our base system, and our supported method of updating our system is buildworkd/buildkernel - so any changes to FBSDprivate should be unnoticed. Initially, I did not add a version number to FBSDprivate, but did at the end after seeing that Solaris had versioned private as well. But, at least with Solaris 8, they only have SUNWprivate 1.1 and 1.2, whereas they have many public versions (SUNW_0.7 - SUNW_1.20.4). They must have old applications that were part of their base, but are no longer supported on more recent releases, so had to bump the private namespace. Also, if you look at libc/Versions.def, you will see that there is no FBSDprivate_1.1. I think your patch is fine as long as you use only FBSDprivate_1.0. --=20 DE --=-=-=-- From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 17:01:14 2008 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 6C73D16A419; Mon, 4 Feb 2008 17:01:14 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 26B9813C461; Mon, 4 Feb 2008 17:01:14 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 6D8DD207E; Mon, 4 Feb 2008 18:00:58 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.2/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id E976F2049; Mon, 4 Feb 2008 18:00:57 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id D26B8844A6; Mon, 4 Feb 2008 18:00:57 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Karl H. Beckers" References: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> <86ve54epyy.fsf@ds4.des.no> <43451.192.9.112.196.1202141118.squirrel@www.our-isp.org> Date: Mon, 04 Feb 2008 18:00:57 +0100 In-Reply-To: <43451.192.9.112.196.1202141118.squirrel@www.our-isp.org> (Karl H. Beckers's message of "Mon\, 4 Feb 2008 17\:05\:18 +0100 \(CET\)") Message-ID: <86ve54d5bq.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-threads@freebsd.org Subject: Re: threading in FreeBSD (acx_pthreads) 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, 04 Feb 2008 17:01:14 -0000 "Karl H. Beckers" writes: > What I understood now is: > On current versions -lpthread should work. On some older versions I should > be using -lthr (so not -lc_r, then?). > Is there a safe way to check whether we're running a version that needs > -lthr? In the varnish example you provided, I cannot find a check for > it?!? Sure you can. It explicitly tries -lthr *before* -lpthread, and -lc_r as a final resort. The AC macro used will try each in sequence until one works, and stick with that. If your configure.ac only covers a single multi-threaded program, you can make do with just the AC_SEARCH_LIBS invocation: AC_SEARCH_LIBS(pthread_create, [thr pthread c_r]) If your configure.ac covers several programs, some of which are multi- threaded and some of which aren't, you should use the full block, and explicitly add ${PTHREAD_LIBS} to foo_LDADD in Makefile.am for the multi-threaded programs only. This has been tested on FreeBSD [678], various Linux distributions (mostly 2.6-based), Mac OS X (10.3 and up) and Solaris 10. On FreeBSD 7 and 8 and everything else I mentioned, -lpthread is fine, but on FreeBSD 6, -lpthread will give you libkse which doesn't work, hence -lthr to force libthr over libkse. IIRC, -lc_r is required for certain FreeBSD platforms which don't have kernel-assisted threads, but I'm pretty sure Varnish wouldn't be able to handle any kind of load if built with libc_r. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 17:02:14 2008 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 F35DE16A41B for ; Mon, 4 Feb 2008 17:02:13 +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 AFE4513C442 for ; Mon, 4 Feb 2008 17:02:13 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m14H25Hx027819; Mon, 4 Feb 2008 12:02:05 -0500 (EST) 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.0 (mail.netplex.net [204.213.176.10]); Mon, 04 Feb 2008 12:02:05 -0500 (EST) Date: Mon, 4 Feb 2008 12:02:05 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-Reply-To: <86zlugd5u0.fsf@ds4.des.no> Message-ID: References: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> <86ve54epyy.fsf@ds4.des.no> <43451.192.9.112.196.1202141118.squirrel@www.our-isp.org> <86zlugd5u0.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-342241519-1202144525=:13899" Cc: "Karl H. Beckers" , freebsd-threads@freebsd.org Subject: Re: threading in FreeBSD (acx_pthreads) 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, 04 Feb 2008 17:02:14 -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. ---559023410-342241519-1202144525=:13899 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 4 Feb 2008, Dag-Erling Sm=C3=B8rgrav wrote: > Daniel Eischen writes: >> No, do not use -lpthread. Refer to John Baldwin's response, -pthread is >> what you should be using. > > That is not what POSIX says. As far as I know, POSIX doesn't say how you link to a threads library. > That is not what our own man pages say, either. Our ports system uses -pthread as the default, and we've been pushed this way because GNU has set it as some form of standard. All the macros out there seem to expect this as well. > In my recollection, it's not even what the people who started our > transition away from libc_r said (though it waffled back and forth for a > bit, so I may misremember). Yes, I was one of them and was against -pthread, but have been assimilated. > More importantly, it makes *absolutely no difference* to the finished > code. It does if you are on 4.x and don't have -lpthread, but regardless, -pthread is what our ports system uses as the default and we are talking about 3rd party software. It really should play nice with our ports system and the m4 macro does seem to obey PTHREAD_LIBS and PTHREAD_CFLAGS. --=20 DE ---559023410-342241519-1202144525=:13899-- From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 17:04:40 2008 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 6280E16A420; Mon, 4 Feb 2008 17:04:40 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 1A02313C459; Mon, 4 Feb 2008 17:04:40 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id DAA21207E; Mon, 4 Feb 2008 18:04:31 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.2/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id CB0432049; Mon, 4 Feb 2008 18:04:31 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id B0BA6844A0; Mon, 4 Feb 2008 18:04:31 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Daniel Eischen References: <861w7um5o5.fsf@ds4.des.no> <20080203162918.GK57756@deviant.kiev.zoral.com.ua> <20080203121112.426a8c25@kan.dnsalias.net> <86zlugeqaz.fsf@ds4.des.no> Date: Mon, 04 Feb 2008 18:04:31 +0100 In-Reply-To: (Daniel Eischen's message of "Mon\, 4 Feb 2008 11\:55\:52 -0500 \(EST\)") Message-ID: <86r6fsd55s.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: threads@freebsd.org, Peter Wemm , current@freebsd.org Subject: Re: Symbol versioning errors 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: Mon, 04 Feb 2008 17:04:40 -0000 Daniel Eischen writes: > I question the bumping of FBSDprivate to 1.1. FBSDprivate is special, > it is only for use in our base system, and our supported method of > updating our system is buildworkd/buildkernel - so any changes to > FBSDprivate should be unnoticed. A whole lot of assumptions there. Bumping FBSDprivate costs nothing and might save our a***s down the road if one of those assumptions turn out to be false. (unless you can show that it's actually harmful in some way?) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 17:09:40 2008 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 BF75016A41B; Mon, 4 Feb 2008 17:09:40 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 795FC13C455; Mon, 4 Feb 2008 17:09:40 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id B9AD72083; Mon, 4 Feb 2008 18:09:31 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.2/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 3F6EF207E; Mon, 4 Feb 2008 18:09:31 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id 285A7844A0; Mon, 4 Feb 2008 18:09:31 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Daniel Eischen References: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> <86ve54epyy.fsf@ds4.des.no> <43451.192.9.112.196.1202141118.squirrel@www.our-isp.org> <86zlugd5u0.fsf@ds4.des.no> Date: Mon, 04 Feb 2008 18:09:31 +0100 In-Reply-To: (Daniel Eischen's message of "Mon\, 4 Feb 2008 12\:02\:05 -0500 \(EST\)") Message-ID: <86ir14d4xg.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: "Karl H. Beckers" , freebsd-threads@freebsd.org Subject: Re: threading in FreeBSD (acx_pthreads) 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, 04 Feb 2008 17:09:40 -0000 Daniel Eischen writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Daniel Eischen writes: > > > No, do not use -lpthread. Refer to John Baldwin's response, -pthread= is > > > what you should be using. > > That is not what POSIX says. > As far as I know, POSIX doesn't say how you link to a threads library. Sure it does, in the specification for the C compiler command. > > That is not what our own man pages say, either. > Our ports system uses -pthread as the default, and we've been pushed > this way because GNU has set it as some form of standard. All the > macros out there seem to expect this as well. Which completely dodges my point about the man pages. And no matter how grand acx_pthreads is, it won't DTRT on FreeBSD versions that have libkse as the default thread library. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 17:10:36 2008 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 E50BC16A46B; Mon, 4 Feb 2008 17:10:34 +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 9E90213C455; Mon, 4 Feb 2008 17:10:34 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m14HASWc003786; Mon, 4 Feb 2008 12:10:28 -0500 (EST) 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.0 (mail.netplex.net [204.213.176.10]); Mon, 04 Feb 2008 12:10:29 -0500 (EST) Date: Mon, 4 Feb 2008 12:10:29 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-Reply-To: <86r6fsd55s.fsf@ds4.des.no> Message-ID: References: <861w7um5o5.fsf@ds4.des.no> <20080203162918.GK57756@deviant.kiev.zoral.com.ua> <20080203121112.426a8c25@kan.dnsalias.net> <86zlugeqaz.fsf@ds4.des.no> <86r6fsd55s.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-824023566-1202145029=:13899" Cc: threads@freebsd.org, Peter Wemm , current@freebsd.org Subject: Re: Symbol versioning errors in libthr 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, 04 Feb 2008 17:10:37 -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. ---559023410-824023566-1202145029=:13899 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 4 Feb 2008, Dag-Erling Sm=C3=B8rgrav wrote: > Daniel Eischen writes: >> I question the bumping of FBSDprivate to 1.1. FBSDprivate is special, >> it is only for use in our base system, and our supported method of >> updating our system is buildworkd/buildkernel - so any changes to >> FBSDprivate should be unnoticed. > > A whole lot of assumptions there. Bumping FBSDprivate costs nothing and > might save our a***s down the road if one of those assumptions turn out > to be false. If there is a need for it, it can be bumped. There is no need as yet. The only need for bumping private is for an ABI change, and if that ABI change cannot be picked up in a buildworld. This is what FBSDprivate was designed for. > (unless you can show that it's actually harmful in some way?) Please do not bump private, it was never meant to be bumped like this. --=20 DE ---559023410-824023566-1202145029=:13899-- From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 17:11:49 2008 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 39F8116A417; Mon, 4 Feb 2008 17:11:49 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id E0FB513C45A; Mon, 4 Feb 2008 17:11:48 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 0709A208F; Mon, 4 Feb 2008 18:11:40 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.2/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id EBEA3208C; Mon, 4 Feb 2008 18:11:39 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id D3FD0844A6; Mon, 4 Feb 2008 18:11:39 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Daniel Eischen References: <200802032238.m13McAbf065324@repoman.freebsd.org> <86d4rdgehd.fsf@ds4.des.no> <868x20elw0.fsf@ds4.des.no> Date: Mon, 04 Feb 2008 18:11:39 +0100 In-Reply-To: (Daniel Eischen's message of "Mon\, 4 Feb 2008 11\:31\:09 -0500 \(EST\)") Message-ID: <86ejbsd4tw.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, threads@freebsd.org Subject: Re: cvs commit: src/include pthread_np.h src/lib/libthr pthread.map src/lib/libthr/thread thr_mutex.c 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, 04 Feb 2008 17:11:49 -0000 Daniel Eischen writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Daniel Eischen writes: > > > If you want to know if the current thread has it locked, it should be > > > called pthread_mutex_isowned_np(). > > I don't see why one would be more correct than the other... > Because it is more obvious that _isowned() is for the current thread > than _islocked(). As you can tell by my previous (incorrect) > assumption. > > There is prior art for this outside of FreeBSD. Solaris has > mutex_owned() as part of their kernel mutex API. I would suggest > using pthread_mutex_owned_np(). Hmm, even FreeBSD has mtx_owned() :-) OK, so the next question is whether this reqires a repo-copy (or a repo-move), or if I can just cvs rm + cvs add (both the implementation and the regression test) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 17:13:57 2008 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 3871316A469 for ; Mon, 4 Feb 2008 17:13:57 +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 E7FDB13C478 for ; Mon, 4 Feb 2008 17:13:56 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m14HDpgR006028; Mon, 4 Feb 2008 12:13:51 -0500 (EST) 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.0 (mail.netplex.net [204.213.176.10]); Mon, 04 Feb 2008 12:13:51 -0500 (EST) Date: Mon, 4 Feb 2008 12:13:51 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-Reply-To: <86ir14d4xg.fsf@ds4.des.no> Message-ID: References: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> <86ve54epyy.fsf@ds4.des.no> <43451.192.9.112.196.1202141118.squirrel@www.our-isp.org> <86zlugd5u0.fsf@ds4.des.no> <86ir14d4xg.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-1483920592-1202145231=:13899" Cc: "Karl H. Beckers" , freebsd-threads@freebsd.org Subject: Re: threading in FreeBSD (acx_pthreads) 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, 04 Feb 2008 17:13:57 -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. ---559023410-1483920592-1202145231=:13899 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 4 Feb 2008, Dag-Erling Sm=C3=B8rgrav wrote: > Daniel Eischen writes: >> Dag-Erling Sm=C3=B8rgrav writes: >>> Daniel Eischen writes: >>>> No, do not use -lpthread. Refer to John Baldwin's response, -pthread = is >>>> what you should be using. >>> That is not what POSIX says. >> As far as I know, POSIX doesn't say how you link to a threads library. > > Sure it does, in the specification for the C compiler command. > >>> That is not what our own man pages say, either. >> Our ports system uses -pthread as the default, and we've been pushed >> this way because GNU has set it as some form of standard. All the >> macros out there seem to expect this as well. > > Which completely dodges my point about the man pages. Our man pages need to be updated. > And no matter how grand acx_pthreads is, it won't DTRT on FreeBSD > versions that have libkse as the default thread library. It depends on your point of view, but regardless it can be overridden with PTHREAD_LIBS to whatever thread library you want. If it were ever imported into our ports system, it would have to be patched to obey PTHREAD_LIBS, so why not make it play nice? --=20 DE ---559023410-1483920592-1202145231=:13899-- From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 17:17:40 2008 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 9A89816A419; Mon, 4 Feb 2008 17:17:40 +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 5100013C4D1; Mon, 4 Feb 2008 17:17:40 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m14HHZ6B008740; Mon, 4 Feb 2008 12:17:35 -0500 (EST) 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.0 (mail.netplex.net [204.213.176.10]); Mon, 04 Feb 2008 12:17:35 -0500 (EST) Date: Mon, 4 Feb 2008 12:17:35 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-Reply-To: <86ejbsd4tw.fsf@ds4.des.no> Message-ID: References: <200802032238.m13McAbf065324@repoman.freebsd.org> <86d4rdgehd.fsf@ds4.des.no> <868x20elw0.fsf@ds4.des.no> <86ejbsd4tw.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-851401618-1202145455=:14306" Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, threads@freebsd.org Subject: Re: cvs commit: src/include pthread_np.h src/lib/libthr pthread.map src/lib/libthr/thread thr_mutex.c 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, 04 Feb 2008 17:17:40 -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. ---559023410-851401618-1202145455=:14306 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 4 Feb 2008, Dag-Erling Sm=C3=B8rgrav wrote: > Daniel Eischen writes: >> Dag-Erling Sm=C3=B8rgrav writes: >>> Daniel Eischen writes: >>>> If you want to know if the current thread has it locked, it should be >>>> called pthread_mutex_isowned_np(). >>> I don't see why one would be more correct than the other... >> Because it is more obvious that _isowned() is for the current thread >> than _islocked(). As you can tell by my previous (incorrect) >> assumption. >> >> There is prior art for this outside of FreeBSD. Solaris has >> mutex_owned() as part of their kernel mutex API. I would suggest >> using pthread_mutex_owned_np(). Hmm, even FreeBSD has mtx_owned() :-) > > OK, so the next question is whether this reqires a repo-copy (or a > repo-move), or if I can just cvs rm + cvs add (both the implementation > and the regression test) I would just remove it and readd it, since there is not history to keep... --=20 DE ---559023410-851401618-1202145455=:14306-- From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 17:19:46 2008 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 BA79416A418; Mon, 4 Feb 2008 17:19:46 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 7141613C474; Mon, 4 Feb 2008 17:19:46 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 9C4E82082; Mon, 4 Feb 2008 18:19:38 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.2/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 8C5C0207F; Mon, 4 Feb 2008 18:19:38 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id 75FD6844A4; Mon, 4 Feb 2008 18:19:38 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Daniel Eischen References: <861w7um5o5.fsf@ds4.des.no> <20080203162918.GK57756@deviant.kiev.zoral.com.ua> <20080203121112.426a8c25@kan.dnsalias.net> <86zlugeqaz.fsf@ds4.des.no> <86r6fsd55s.fsf@ds4.des.no> Date: Mon, 04 Feb 2008 18:19:38 +0100 In-Reply-To: (Daniel Eischen's message of "Mon\, 4 Feb 2008 12\:10\:29 -0500 \(EST\)") Message-ID: <86abmgd4gl.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: threads@freebsd.org, Peter Wemm , current@freebsd.org Subject: Re: Symbol versioning errors 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: Mon, 04 Feb 2008 17:19:46 -0000 Daniel Eischen writes: > Dag-Erling Sm=C3=B8rgrav writes: > > (unless you can show that it's actually harmful in some way?) > Please do not bump private, it was never meant to be bumped like this. This is not substantiation, this is the old monkey telling the young monkey "this is the way it's always been done". With all due respect to the old monkey, the young monkey simply can't understand why FBSD and FBSDprivate should be assymetric. The young monkey would also like the old monkey to explain to him what harm will come of this (the young monkey has asked this already, but the old monkey has declined to respond). Finally, the young monkey would like to point out that this is all very poorly documented. While aware of the freebsd_versioning.txt document written by the old monkey, the young monkey can't find anything in it about private symbol spaces. If the old monkey is in any way offended by this, he is free to s/old/mature and experienced/ :) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 17:23:11 2008 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 B08A416A46C for ; Mon, 4 Feb 2008 17:23:11 +0000 (UTC) (envelope-from karl.h.beckers@gmx.net) Received: from grotesk.our-isp.org (www.our-isp.org [82.165.43.21]) by mx1.freebsd.org (Postfix) with ESMTP id DE83C13C455 for ; Mon, 4 Feb 2008 17:23:10 +0000 (UTC) (envelope-from karl.h.beckers@gmx.net) Received: from www.our-isp.org (localhost [127.0.0.1]) by grotesk.our-isp.org (Postfix) with ESMTP id 747FD26800; Mon, 4 Feb 2008 18:23:06 +0100 (CET) Received: from 192.9.112.196 (SquirrelMail authenticated user khb@jarre-de-the.net) by www.our-isp.org with HTTP; Mon, 4 Feb 2008 18:23:06 +0100 (CET) Message-ID: <58004.192.9.112.196.1202145786.squirrel@www.our-isp.org> In-Reply-To: References: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> <86ve54epyy.fsf@ds4.des.no> <43451.192.9.112.196.1202141118.squirrel@www.our-isp.org> <86zlugd5u0.fsf@ds4.des.no> Date: Mon, 4 Feb 2008 18:23:06 +0100 (CET) From: "Karl H. Beckers" To: "Daniel Eischen" User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: "Karl H. Beckers" , Dag-Erling =?iso-8859-1?Q?Sm=C3=B8rgrav?= , freebsd-threads@freebsd.org Subject: Re: threading in FreeBSD (acx_pthreads) 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, 04 Feb 2008 17:23:11 -0000 whoa, slowly please, you're loosing me. So, there is: -lthr -pthread -lpthread -lc_r lthread -kthread I've read one opinion (a) saying I should use: -lthr -lpthread -lc_r (because -pthread might not be safe on all versions) the autoconf module (b) does: -kthread lthread -pthread (now what's -kthread and lthread and how do they relate to -lthr or -lc_r) And the other opinion (c) I heard was: -pthread -lc_r (and leave anything else to the user and PTHREAD_LIBS) And I take it that (c) is what your ports system is doing and the discussion is around whether that's the right thing to do? Karl. From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 17:47:13 2008 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 58FA616A468; Mon, 4 Feb 2008 17:47:13 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 1046613C4E1; Mon, 4 Feb 2008 17:47:13 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id DE1692087; Mon, 4 Feb 2008 18:47:04 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.3/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id C44B42083; Mon, 4 Feb 2008 18:47:04 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id A9F0A844A4; Mon, 4 Feb 2008 18:47:04 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Karl H. Beckers" References: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> <86ve54epyy.fsf@ds4.des.no> <43451.192.9.112.196.1202141118.squirrel@www.our-isp.org> <86zlugd5u0.fsf@ds4.des.no> <58004.192.9.112.196.1202145786.squirrel@www.our-isp.org> Date: Mon, 04 Feb 2008 18:47:04 +0100 In-Reply-To: <58004.192.9.112.196.1202145786.squirrel@www.our-isp.org> (Karl H. Beckers's message of "Mon\, 4 Feb 2008 18\:23\:06 +0100 \(CET\)") Message-ID: <86wspkbomf.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Daniel Eischen , freebsd-threads@freebsd.org Subject: Re: threading in FreeBSD (acx_pthreads) 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, 04 Feb 2008 17:47:13 -0000 "Karl H. Beckers" writes: > slowly please, you're loosing me. [...] I think the conclusion is that in most cases, a recent version of acx_pthreads should DTRT for you, though it doesn't for me. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 18:16:26 2008 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 C454016A418 for ; Mon, 4 Feb 2008 18:16:26 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outY.internet-mail-service.net (outY.internet-mail-service.net [216.240.47.248]) by mx1.freebsd.org (Postfix) with ESMTP id AA12213C448 for ; Mon, 4 Feb 2008 18:16:26 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Mon, 04 Feb 2008 10:16:26 -0800 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 951DD1270BA; Mon, 4 Feb 2008 10:16:25 -0800 (PST) Message-ID: <47A7567A.4030800@elischer.org> Date: Mon, 04 Feb 2008 10:16:26 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: "Karl H. Beckers" References: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> In-Reply-To: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-threads@freebsd.org Subject: Re: threading in FreeBSD (acx_pthreads) 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, 04 Feb 2008 18:16:26 -0000 Karl H. Beckers wrote: > Hi all, > > could you please include me directly in your replies ... I haven't > subscribed. > > I'm trying to move my configure.in from manual threading libs detection > to acx_pthreads. That, however, prefers -kthread over -pthread where I > previously did this: what are acx_pthreads? > > if ( test -x /sbin/sysctl ) ; then > ac_my_freebsd_release=`/sbin/sysctl -n > kern.osreldate` > else > ac_my_freebsd_release=`/usr/sbin/sysctl -n > kern.osreldate` > fi > if ( expr ${ac_my_freebsd_release} \< 500016 ) ; then > LIBS="${LIBS} -pthread" > else > LIBS="${LIBS} -lc_r" > fi > > Could anybody make a recommendation of the propert thing to do on > FreeBSD? Is the acx_pthread assumption OK, or should I patch that? > > TIA, > > Karl. > > > _______________________________________________ > 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 Feb 4 18:47:08 2008 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 7B9B216A41B; Mon, 4 Feb 2008 18:47:08 +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 40F7913C4D3; Mon, 4 Feb 2008 18:47:08 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m14Il4m1009185; Mon, 4 Feb 2008 13:47:04 -0500 (EST) 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.0 (mail.netplex.net [204.213.176.10]); Mon, 04 Feb 2008 13:47:05 -0500 (EST) Date: Mon, 4 Feb 2008 13:47:04 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-Reply-To: <86abmgd4gl.fsf@ds4.des.no> Message-ID: References: <861w7um5o5.fsf@ds4.des.no> <20080203162918.GK57756@deviant.kiev.zoral.com.ua> <20080203121112.426a8c25@kan.dnsalias.net> <86zlugeqaz.fsf@ds4.des.no> <86r6fsd55s.fsf@ds4.des.no> <86abmgd4gl.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-758783491-1202150824=:14537" Cc: threads@freebsd.org, Peter Wemm , current@freebsd.org Subject: Re: Symbol versioning errors in libthr 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, 04 Feb 2008 18:47:08 -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. ---559023410-758783491-1202150824=:14537 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Hey, just because I'm ugly, hairy, and my knuckles scrape on the ground is no reason to call me a monkey ;-) On Mon, 4 Feb 2008, Dag-Erling Sm=C3=B8rgrav wrote: > Daniel Eischen writes: >> Dag-Erling Sm=C3=B8rgrav writes: >>> (unless you can show that it's actually harmful in some way?) >> Please do not bump private, it was never meant to be bumped like this. > > This is not substantiation, this is the old monkey telling the young > monkey "this is the way it's always been done". > > With all due respect to the old monkey, the young monkey simply can't > understand why FBSD and FBSDprivate should be assymetric. Linux doesn't even have a version for GLIBC_PRIVATE. If we take the same approach to FBSDprivate as we do FBSD, then there is no need at all for FBSDprivate. We don't want to add compatibility hacks for anything in FBSDprivate (that is the purpose of having private in the first place), so if you start bumping private then you should also start adding compat hacks - otherwise you have to edit old private versions to remove (duplicate) symbols. FBSDprivate is to allow us to change our internal ABIs without really managing them - at least on the same level as the public namespace. If somehow something sneaks into private that needs to be publicized, we are free to bump private, but the goal is to not allow that to happen. We've come from -current and previous releases where there was no versioning at all, and have always managed. Yes, with some pain. But I cannot forsee how using FBSDprivate in the way we've designed it for (yes, it was reviewed) is somehow going to make the sky fall one day. And if there is a problem, that is why we have -current. We can iron it out there, and bump private if it ever becomes necessary. But we don't want to create more of a headache by maintaining different versions of private symbols - the private namespace allows us to add, remove, and change ABIs almost "willy nilly" without burdoning ourselves. This seems to be how it is done on both Solaris and Linux, if you want an example of prior art. > The young monkey would also like the old monkey to explain to him what > harm will come of this (the young monkey has asked this already, but the > old monkey has declined to respond). > > Finally, the young monkey would like to point out that this is all very > poorly documented. While aware of the freebsd_versioning.txt document > written by the old monkey, the young monkey can't find anything in it > about private symbol spaces. > > If the old monkey is in any way offended by this, he is free to > s/old/mature and experienced/ :) No, of course not. I hope I don't come across as too controntational either :-) --=20 DE ---559023410-758783491-1202150824=:14537-- From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 19:37:14 2008 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 E48C616A417; Mon, 4 Feb 2008 19:37:14 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.freebsd.org (Postfix) with ESMTP id 8BF6713C442; Mon, 4 Feb 2008 19:37:14 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.14.2/8.14.1) with ESMTP id m14J80WS041773; Mon, 4 Feb 2008 14:08:00 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.14.2/8.14.1/Submit) id m14J80oW041772; Mon, 4 Feb 2008 14:08:00 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Mon, 4 Feb 2008 14:08:00 -0500 From: David Schultz To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20080204190800.GA41339@VARK.MIT.EDU> Mail-Followup-To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , Daniel Eischen , Kostik Belousov , threads@FreeBSD.ORG, Peter Wemm , current@FreeBSD.ORG References: <861w7um5o5.fsf@ds4.des.no> <20080203162918.GK57756@deviant.kiev.zoral.com.ua> <20080203121112.426a8c25@kan.dnsalias.net> <86zlugeqaz.fsf@ds4.des.no> <86r6fsd55s.fsf@ds4.des.no> <86abmgd4gl.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86abmgd4gl.fsf@ds4.des.no> Cc: Daniel Eischen , current@FreeBSD.ORG, Peter Wemm , threads@FreeBSD.ORG Subject: Re: Symbol versioning errors 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: Mon, 04 Feb 2008 19:37:15 -0000 On Mon, Feb 04, 2008, Dag-Erling Smørgrav wrote: > Daniel Eischen writes: > > Dag-Erling Smørgrav writes: > > > (unless you can show that it's actually harmful in some way?) > > Please do not bump private, it was never meant to be bumped like this. > > This is not substantiation, this is the old monkey telling the young > monkey "this is the way it's always been done". > > With all due respect to the old monkey, the young monkey simply can't > understand why FBSD and FBSDprivate should be assymetric. The private namespace is a repository for symbols that we don't intend to support across releases; these symbols may change or go away, and applications shouldn't use them directly. Making multiple private namespaces implies that the private namespaces *are* stable according to some definition, hence why we need more than one of them. Having stronger requirements for private namespaces would seem to defeat the purpose and create more work for people, principally Dan, who is still working with re@ to get the FBSD_1.0 symbols right for 7.0-RELEASE. Perhaps you could explain what stability requirements you have in mind for FBSDPrivate_X.Y here. > The young monkey would also like the old monkey to explain to him what > harm will come of this (the young monkey has asked this already, but the > old monkey has declined to respond). > > Finally, the young monkey would like to point out that this is all very > poorly documented. While aware of the freebsd_versioning.txt document > written by the old monkey, the young monkey can't find anything in it > about private symbol spaces. > > If the old monkey is in any way offended by this, he is free to > s/old/mature and experienced/ :) This is a little bit more sarcastic and pretentious than needed. Have a banana. `-=-' --the small monkey in the corner From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 20:13:24 2008 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 1FB9E16A503 for ; Mon, 4 Feb 2008 20:13:24 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outE.internet-mail-service.net (outE.internet-mail-service.net [216.240.47.228]) by mx1.freebsd.org (Postfix) with ESMTP id 02EE313C46B for ; Mon, 4 Feb 2008 20:13:23 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Mon, 04 Feb 2008 12:13:23 -0800 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 9B9501270C8; Mon, 4 Feb 2008 12:13:22 -0800 (PST) Message-ID: <47A771E3.5080403@elischer.org> Date: Mon, 04 Feb 2008 12:13:23 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Robert Watson References: <200801240850.m0O8o2JQ023500@freefall.freebsd.org> <4798564B.7070500@elischer.org> <20080128185830.B56811@fledge.watson.org> In-Reply-To: <20080128185830.B56811@fledge.watson.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Daniel Eischen , Gary Stanley , re@freebsd.org, freebsd-threads@freebsd.org Subject: Re: threads/119920: fork broken in libpthread 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, 04 Feb 2008 20:13:24 -0000 Robert Watson wrote: > > On Thu, 24 Jan 2008, Daniel Eischen wrote: > >>> dan what IS the fix for this? I assume you must have fixed it in >>> -current/7 >> >> You want cvs diff -u -r1.126 -r1.128 src/lib/libkse/thread/thr_kern.c. >> The WARNS'ify diffs are not necessary, so it should look something >> like shown below. Probably an MFC of all of libkse (minus jasone's >> malloc changes) should be done to -7 and -6. > > Should the patch be considered for an errata notice for 6.x? Should we > be trying to MFC this to 7.x for inclusion with 7.0 or does it need more > time to shake out and should potentially be a 7.0 errata notice or just > appear in 7.1? I have MFC'd this to RELENG_6 RELENG_7 and RELENG_7_0 with blessing from kensmith. We will add an errata for 6.3 and maybe even put it in the 6.3 branch. I have seen -current machines actually crash (the whole machine) without this patch but haven't figured out the mechanism yet. (I have one in the lab in this state now.. will go look at it soon)( > > Robert N M Watson > Computer Laboratory > University of Cambridge From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 23:05:59 2008 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 C147316A420; Mon, 4 Feb 2008 23:05:59 +0000 (UTC) (envelope-from karl.h.beckers@gmx.net) Received: from grotesk.our-isp.org (www.our-isp.org [82.165.43.21]) by mx1.freebsd.org (Postfix) with ESMTP id 8458213C45A; Mon, 4 Feb 2008 23:05:59 +0000 (UTC) (envelope-from karl.h.beckers@gmx.net) Received: from [192.168.1.5] (pD95FE861.dip.t-dialin.net [217.95.232.97]) by grotesk.our-isp.org (Postfix) with ESMTP id EC3FD25E22; Tue, 5 Feb 2008 00:05:53 +0100 (CET) From: "Karl H. Beckers" To: John Baldwin In-Reply-To: <200802041456.30785.jhb@freebsd.org> References: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> <58004.192.9.112.196.1202145786.squirrel@www.our-isp.org> <200802041456.30785.jhb@freebsd.org> Content-Type: text/plain Date: Tue, 05 Feb 2008 00:05:51 +0100 Message-Id: <1202166351.6212.10.camel@hosaka> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit Cc: Daniel Eischen , Dag-Erling =?ISO-8859-1?Q?Sm=C3=B8rgrav?= , freebsd-threads@freebsd.org Subject: Re: threading in FreeBSD (acx_pthreads) 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, 04 Feb 2008 23:05:59 -0000 Am Montag, den 04.02.2008, 14:56 -0500 schrieb John Baldwin: [...] > > And I take it that (c) is what your ports system is doing and the > > discussion is around whether that's the right thing to do? > > Just -pthread, no -lc_r. On 4.x -pthread expands to -D_REENTRANT -lc_r (or > something like that). On 5.x+ -pthread expands to -lpthread. IOW, -pthread > always expands to the appropriate system default. If you want to use libthr > on 6.x then you can either explicitly say -lthr instead of -pthread or rename > libpthread to libkse and symlink libpthread to libthr. (Or use libmap.conf > to map libpthread to libthr, etc.). > > Also, FWIW DES, at work when folks did benchmarks for Java stuff on 6.x, > libkse had better performance than libthr. Granted, Java is a bit more of an > odd benchmark b/c it is thread happy and thus more suited to a M:N model than > most other threading workloads. > OK, that clears some of that up. Any idea what the original author of acx_pthreads has meant by -lkthread and lthread? (Am trying to ask him himself, but his spamassassin doesn't like me ;) ) Thanks, Karl. From owner-freebsd-threads@FreeBSD.ORG Mon Feb 4 23:16:48 2008 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 AA62316A417; Mon, 4 Feb 2008 23:16:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id 0EA2913C442; Mon, 4 Feb 2008 23:16:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8s) with ESMTP id 230850007-1834499 for multiple; Mon, 04 Feb 2008 18:00:41 -0500 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m14N0STa072283; Mon, 4 Feb 2008 18:00:35 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-threads@freebsd.org Date: Mon, 4 Feb 2008 14:56:30 -0500 User-Agent: KMail/1.9.7 References: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> <58004.192.9.112.196.1202145786.squirrel@www.our-isp.org> In-Reply-To: <58004.192.9.112.196.1202145786.squirrel@www.our-isp.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802041456.30785.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 04 Feb 2008 18:00:36 -0500 (EST) X-Virus-Scanned: ClamAV 0.91.2/5686/Mon Feb 4 16:13:58 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.1 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00, DATE_IN_PAST_03_06 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: "Karl H. Beckers" , Daniel Eischen , Dag-Erling =?iso-8859-1?q?Sm=C3=B8rgrav?= Subject: Re: threading in FreeBSD (acx_pthreads) 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, 04 Feb 2008 23:16:48 -0000 On Monday 04 February 2008 12:23:06 pm Karl H. Beckers wrote: > whoa, > > slowly please, you're loosing me. So, there is: > > -lthr > -pthread > -lpthread > -lc_r > lthread > -kthread > > I've read one opinion (a) saying I should use: > -lthr -lpthread -lc_r (because -pthread might not be safe on all versions) > > the autoconf module (b) does: > -kthread lthread -pthread (now what's -kthread and lthread and how do they > relate to -lthr or -lc_r) > > And the other opinion (c) I heard was: > -pthread -lc_r (and leave anything else to the user and PTHREAD_LIBS) > > And I take it that (c) is what your ports system is doing and the > discussion is around whether that's the right thing to do? Just -pthread, no -lc_r. On 4.x -pthread expands to -D_REENTRANT -lc_r (or something like that). On 5.x+ -pthread expands to -lpthread. IOW, -pthread always expands to the appropriate system default. If you want to use libthr on 6.x then you can either explicitly say -lthr instead of -pthread or rename libpthread to libkse and symlink libpthread to libthr. (Or use libmap.conf to map libpthread to libthr, etc.). Also, FWIW DES, at work when folks did benchmarks for Java stuff on 6.x, libkse had better performance than libthr. Granted, Java is a bit more of an odd benchmark b/c it is thread happy and thus more suited to a M:N model than most other threading workloads. -- John Baldwin From owner-freebsd-threads@FreeBSD.ORG Tue Feb 5 08:25:38 2008 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 7590C16A474; Tue, 5 Feb 2008 08:25:38 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 310B113C4EF; Tue, 5 Feb 2008 08:25:37 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 0B420208C; Tue, 5 Feb 2008 09:25:29 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.3/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 72E132087; Tue, 5 Feb 2008 09:25:28 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id 4A964844A6; Tue, 5 Feb 2008 09:25:28 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: John Baldwin References: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> <58004.192.9.112.196.1202145786.squirrel@www.our-isp.org> <200802041456.30785.jhb@freebsd.org> Date: Tue, 05 Feb 2008 09:25:28 +0100 In-Reply-To: <200802041456.30785.jhb@freebsd.org> (John Baldwin's message of "Mon\, 4 Feb 2008 14\:56\:30 -0500") Message-ID: <86prvb24jr.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: "Karl H. Beckers" , Daniel Eischen , freebsd-threads@freebsd.org Subject: Re: threading in FreeBSD (acx_pthreads) 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: Tue, 05 Feb 2008 08:25:38 -0000 John Baldwin writes: > Also, FWIW DES, at work when folks did benchmarks for Java stuff on > 6.x, libkse had better performance than libthr. Granted, Java is a > bit more of an odd benchmark b/c it is thread happy and thus more > suited to a M:N model than most other threading workloads. It was never a matter of performance. Varnish simply did not work with libkse. We had constant crashes under load which went away when we switched to libthr. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-threads@FreeBSD.ORG Tue Feb 5 08:39:20 2008 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 E35EC16A421; Tue, 5 Feb 2008 08:39:20 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id A020A13C44B; Tue, 5 Feb 2008 08:39:20 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 8D2342083; Tue, 5 Feb 2008 09:39:12 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.3/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 7CC4E207F; Tue, 5 Feb 2008 09:39:12 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id 5F25B844A6; Tue, 5 Feb 2008 09:39:12 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Karl H. Beckers" References: <5913.192.9.112.196.1202124683.squirrel@www.our-isp.org> <58004.192.9.112.196.1202145786.squirrel@www.our-isp.org> <200802041456.30785.jhb@freebsd.org> <1202166351.6212.10.camel@hosaka> Date: Tue, 05 Feb 2008 09:39:12 +0100 In-Reply-To: <1202166351.6212.10.camel@hosaka> (Karl H. Beckers's message of "Tue\, 05 Feb 2008 00\:05\:51 +0100") Message-ID: <86lk5z23wv.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Daniel Eischen , freebsd-threads@freebsd.org Subject: Re: threading in FreeBSD (acx_pthreads) 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: Tue, 05 Feb 2008 08:39:21 -0000 "Karl H. Beckers" writes: > Any idea what the original author of acx_pthreads has meant by > -lkthread and lthread? (Am trying to ask him himself, but his > spamassassin doesn't like me ;) ) liblthread is devel/linuxthreads - a FreeBSD port of the old linux thread library, which simulated threads using processes. See rfork(2) for an idea of how this was done. On Linux, it was named libkthread; I don't think FreeBSD ever had a libkthread, so this may actually be an error in acx_pthreads. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-threads@FreeBSD.ORG Tue Feb 5 08:41:41 2008 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 7510716A417; Tue, 5 Feb 2008 08:41:41 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 2F3D713C458; Tue, 5 Feb 2008 08:41:40 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id A84F42083; Tue, 5 Feb 2008 09:41:32 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.3/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id E37B52082; Tue, 5 Feb 2008 09:41:31 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id C2DA6844B3; Tue, 5 Feb 2008 09:41:31 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Daniel Eischen References: <861w7um5o5.fsf@ds4.des.no> <20080203162918.GK57756@deviant.kiev.zoral.com.ua> <20080203121112.426a8c25@kan.dnsalias.net> <86zlugeqaz.fsf@ds4.des.no> <86r6fsd55s.fsf@ds4.des.no> <86abmgd4gl.fsf@ds4.des.no> Date: Tue, 05 Feb 2008 09:41:31 +0100 In-Reply-To: (Daniel Eischen's message of "Mon\, 4 Feb 2008 13\:47\:04 -0500 \(EST\)") Message-ID: <86hcgn23t0.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: threads@freebsd.org, Peter Wemm , current@freebsd.org Subject: Re: Symbol versioning errors 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: Tue, 05 Feb 2008 08:41:41 -0000 Daniel Eischen writes: > Dag-Erling Sm=C3=B8rgrav writes: > > With all due respect to the old monkey, the young monkey simply > > can't understand why FBSD and FBSDprivate should be assymetric. > [snip detailed explanation] The young monkey understand now, and thanks the old monkey for sharing his wisdom. The young monkey will revert the inappropriate changes he made to pthread.map. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-threads@FreeBSD.ORG Thu Feb 7 20:19:09 2008 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 446A916A420 for ; Thu, 7 Feb 2008 20:19:09 +0000 (UTC) (envelope-from ad@hairylemon.org) Received: from ns0.hairylemon.org (ns0.hairylemon.org [82.138.249.57]) by mx1.freebsd.org (Postfix) with ESMTP id 0FC0813C478 for ; Thu, 7 Feb 2008 20:19:08 +0000 (UTC) (envelope-from ad@hairylemon.org) Received: from ad by ns0.hairylemon.org with local (Exim 4.54) id 1JNClb-0003Om-FG for freebsd-threads@freebsd.org; Thu, 07 Feb 2008 19:50:39 +0000 Date: Thu, 7 Feb 2008 19:50:39 +0000 From: Andrew Doran To: freebsd-threads@freebsd.org Message-ID: <20080207195039.GF21558@hairylemon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Sender: Andrew Doran Subject: Re: cvs commit: src/include pthread_np.h src/lib/libthr pthread.map src/lib/libthr/thread thr_mutex.c 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, 07 Feb 2008 20:19:09 -0000 > Log: > Add pthread_mutex_islocked_np(), a cheap way to verify that a mutex is > locked. This is intended primarily to support the userland equivalent > of the various *_ASSERT_LOCKED() macros we have in the kernel. For what it's worth, NetBSD has the below. I found the names in FreeBSD perforce using Google and used them in the hope of being compatible. :-) I didn't find equivalents in other systems when I looked. int pthread_mutex_held_np(pthread_mutex_t *); int pthread_rwlock_held_np(pthread_rwlock_t *); int pthread_rwlock_wrheld_np(pthread_rwlock_t *); int pthread_rwlock_rdheld_np(pthread_rwlock_t *); Andrew