From owner-freebsd-threads@FreeBSD.ORG Thu Apr 20 18:23:35 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B12C16A400; Thu, 20 Apr 2006 18:23:35 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC72543D46; Thu, 20 Apr 2006 18:23:34 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 7F1401A3C33; Thu, 20 Apr 2006 11:23:34 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 3653855057; Thu, 20 Apr 2006 14:23:32 -0400 (EDT) Date: Thu, 20 Apr 2006 14:23:31 -0400 From: Kris Kennaway To: Joerg Pulz Message-ID: <20060420182331.GA26174@xor.obsecurity.org> References: <20060418204240.GA69833@xor.obsecurity.org> <001801c66372$a032e770$2522630a@t22> <20060419054116.GA39394@xor.obsecurity.org> <20060420074713.Y52948@hades.admin.frm2> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="azLHFNyN32YCQGCU" Content-Disposition: inline In-Reply-To: <20060420074713.Y52948@hades.admin.frm2> User-Agent: Mutt/1.4.2.1i Cc: Daniel Eischen , Kris Kennaway , freebsd-sparc64@freebsd.org, freebsd-threads@freebsd.org Subject: Re: pthread_mutex_timedlock on sparc64 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, 20 Apr 2006 18:23:35 -0000 --azLHFNyN32YCQGCU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 20, 2006 at 08:01:36AM +0200, Joerg Pulz wrote: >=20 > On Wed, 19 Apr 2006, Daniel Eischen wrote: >=20 > > On Wed, 19 Apr 2006, Kris Kennaway wrote: > > > >> On Wed, Apr 19, 2006 at 03:32:18PM +1000, Sean Winn wrote: > >>> Kris Kennaway wrote: > >>>> On Tue, Apr 18, 2006 at 07:28:00PM +1000, Sean Winn wrote: > >>>>> owner-freebsd-sparc64@freebsd.org wrote: > >>>>>>=20 > >>>>>> libthr *is* the thread library on sparc64; as Daniel says, > >>>>>> libpthread is not ported to sparc64. > >>>>>>=20 > >>>>>> Kris > >>>>>=20 > >>>>> Not yet in 6.x > >>>>>=20 > >>>>> 19:25 Tue 18-Apr sean@bloody [~] uname -msr > >>>>> FreeBSD 6.1-RC1 sparc64 > >>>>> 19:25 Tue 18-Apr sean@bloody [~] ls -l /usr/lib/libpthread.so > >>>>> lrwxrwxrwx 1 root wheel 9 Apr 17 04:05 /usr/lib/libpthread.so -> > >>>>> libc_r.so > >>>>=20 > >>>> Oops, I forgot about that..although so did David when he removed > >>>> libc_r from 7.0 and broke sparc :-) > >>>>=20 > >>>> So I guess this is a libc_r missing feature. Probably the solution = is > >>>> to use libthr on 6.x too (I don't know if it works well enough on > >>>> 5.x). libthr causes witness panics under load on sparc64 though. > >>>>=20 > >>>> Kris > >>>=20 > >>> Would threading problems be related to sparc64/73413? I've noticed it > >>> sitting idle for a long while, and the test case still core dumps. The > >>> PR it references (sparc64/72998) also is open. > >>=20 > >> Huh, turns out libpthread does exist on sparc, it's just called > >> libkse. Anyway, since it's not in use the PR wasn't relevant. > > > > Yeah, I implemented as much as I could for it, but it doesn't > > work. So it's installed as libkse as a prod for someone to > > finish and test it. >=20 > First, thanks for all your responses. > I found an Ultra 10 machine in a dark corner of my office an reactivated= =20 > it. > Installation went fine, the system is not very fast but runs without=20 > problems. Unfortunately, it is an IDE system, so disk access is a bit=20 > slow. > It runs now a RELENG_6_1 and it is correct that the=20 > "pthread_mutex_timedlock" symbol is missing in libpthread, which is=20 > actually a link to libc_r. The "pthread_mutex_timedlock" is only in libth= r=20 > and libkse, which is actually libpthread on sparc64 and alpha according t= o=20 > src/lib/libpthread/Makefile. >=20 > I decided to give libkse a try and started building net/openmcu and all= =20 > ports it depends on with 'make PTHREAD_LIBS=3D"-lkse"' and so far, compil= ing=20 > and linking was fine. But as soon as i try to execute the resulting=20 > binary, it dumps core. Currently i did no further investigation on this. Yes, as discussed upthread libkse is known not to work. libthr should be fine though (since the port builds on 7.0). Hopefully David or someone will be able to look at the WITNESS panics from libthr on sparc soon. Then we can make libthr the default on FreeBSD 6.x as well. In the meantime, you might be able to force the port to use libthr on 5.x/6.x, but this may not work since you typically encounter problems if different thread libraries are mixed in the same binary. If not, the port should probably be marked BROKEN on sparc/5.x and 6.x until the change can be made. =20 Kris --azLHFNyN32YCQGCU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFER9GjWry0BWjoQKURAkCEAKDqZs0vPD8WLHx4uKaaUu4YnPD3AQCgqmrG vUzxdY8bvR6KAZe2fFoGSFo= =yG4k -----END PGP SIGNATURE----- --azLHFNyN32YCQGCU--