From owner-freebsd-sparc64@FreeBSD.ORG Thu Apr 20 06:01:52 2006 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 832DA16A403; Thu, 20 Apr 2006 06:01:52 +0000 (UTC) (envelope-from Joerg.Pulz@frm2.tum.de) Received: from mailhost.frm2.tum.de (mailhost.frm2.tum.de [129.187.179.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id E69FA43D46; Thu, 20 Apr 2006 06:01:49 +0000 (GMT) (envelope-from Joerg.Pulz@frm2.tum.de) Received: from localhost (mailhost.frm2.tum.de [129.187.179.12]) by mailhost.frm2.tum.de (8.13.4/8.13.4) with ESMTP id k3K61ggH037878; Thu, 20 Apr 2006 08:01:42 +0200 (CEST) (envelope-from jpulz@frm2.tum.de) X-Virus-Scanned: at mailhost.frm2.tum.de Received: from hades.admin.frm2 (hades.admin.frm2 [172.25.1.10]) by mailhost.frm2.tum.de (8.13.4/8.13.4) with ESMTP id k3K61f4Q037874 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 20 Apr 2006 08:01:41 +0200 (CEST) (envelope-from jpulz@frm2.tum.de) Received: from hades.admin.frm2 (localhost [127.0.0.1]) by hades.admin.frm2 (8.13.4/8.13.4) with ESMTP id k3K61eJ1043472; Thu, 20 Apr 2006 08:01:40 +0200 (CEST) (envelope-from jpulz@frm2.tum.de) Received: (from jpulz@localhost) by hades.admin.frm2 (8.13.4/8.13.4/Submit) id k3K61dFv043471; Thu, 20 Apr 2006 08:01:39 +0200 (CEST) (envelope-from jpulz) Date: Thu, 20 Apr 2006 08:01:36 +0200 (CEST) From: Joerg Pulz To: Daniel Eischen In-Reply-To: Message-ID: <20060420074713.Y52948@hades.admin.frm2> References: <20060418204240.GA69833@xor.obsecurity.org> <001801c66372$a032e770$2522630a@t22> <20060419054116.GA39394@xor.obsecurity.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-threads@freebsd.org, freebsd-sparc64@freebsd.org, Kris Kennaway Subject: Re: pthread_mutex_timedlock on sparc64 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2006 06:01:52 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, 19 Apr 2006, Daniel Eischen wrote: > 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: >>>>>> >>>>>> libthr *is* the thread library on sparc64; as Daniel says, >>>>>> libpthread is not ported to sparc64. >>>>>> >>>>>> Kris >>>>> >>>>> Not yet in 6.x >>>>> >>>>> 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 >>>> >>>> Oops, I forgot about that..although so did David when he removed >>>> libc_r from 7.0 and broke sparc :-) >>>> >>>> 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. >>>> >>>> Kris >>> >>> 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. >> >> 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. First, thanks for all your responses. I found an Ultra 10 machine in a dark corner of my office an reactivated it. Installation went fine, the system is not very fast but runs without problems. Unfortunately, it is an IDE system, so disk access is a bit slow. It runs now a RELENG_6_1 and it is correct that the "pthread_mutex_timedlock" symbol is missing in libpthread, which is actually a link to libc_r. The "pthread_mutex_timedlock" is only in libthr and libkse, which is actually libpthread on sparc64 and alpha according to src/lib/libpthread/Makefile. I decided to give libkse a try and started building net/openmcu and all ports it depends on with 'make PTHREAD_LIBS="-lkse"' and so far, compiling and linking was fine. But as soon as i try to execute the resulting binary, it dumps core. Currently i did no further investigation on this. I will start another run today, to give libthr a try. Lets see how this works. Anyway, i will submit PR's for the relevant ports to please pointyhat. Kind regards Joerg - -- The beginning is the most important part of the work. -Plato -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFERyPDSPOsGF+KA+MRAhWVAJ90MXngOQ/4ZgxeGnwwtEHZ85ZbPgCgkvHA snZ93oL9FspaUYQLa0OuR7Q= =H+fl -----END PGP SIGNATURE-----