From owner-freebsd-sparc64@FreeBSD.ORG Tue Jun 24 08:50:29 2003 Return-Path: Delivered-To: freebsd-sparc64@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A5F7F37B401 for ; Tue, 24 Jun 2003 08:50:29 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C1C243F3F for ; Tue, 24 Jun 2003 08:50:29 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h5OFoRUp093703 for ; Tue, 24 Jun 2003 08:50:27 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h5OFoR2d093702; Tue, 24 Jun 2003 08:50:27 -0700 (PDT) Date: Tue, 24 Jun 2003 08:50:27 -0700 (PDT) Message-Id: <200306241550.h5OFoR2d093702@freefall.freebsd.org> To: freebsd-sparc64@FreeBSD.org From: Thomas Moestl Subject: Re: sparc64/53670: pthreads implementation on 5.1-Release sparc64 not working X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Thomas Moestl List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jun 2003 15:50:30 -0000 The following reply was made to PR sparc64/53670; it has been noted by GNATS. From: Thomas Moestl To: Steven Haywood Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: sparc64/53670: pthreads implementation on 5.1-Release sparc64 not working Date: Tue, 24 Jun 2003 17:50:22 +0200 On Tue, 2003/06/24 at 10:34:17 +0100, Steven Haywood wrote: > >Description: > Code that uses pthreads hangs (mysql, python etc) > > >How-To-Repeat: > > -bash-2.05b$ cat conftest.c > ########################################## > #include > > void* routine(void* p){return NULL;} > > int main(){ > pthread_t p; > if(pthread_create(&p,NULL,routine,NULL)!=0) > return 1; > (void)pthread_detach(p); > return 0; > } > ########################################### > -bash-2.05b$ gcc -o test -lc_r conftest.c > -bash-2.05b$ truss ./test > mmap(0x0,7056,0x3,0x1000,-1,0x0) = 1075978240 (0x40222000) > munmap(0x40222000,0x1b90) = 0 (0x0) > __sysctl(0x7fdfffff4f0,0x2,0x40323110,0x7fdfffff4e8,0x0,0x0) = 0 (0x0) > [...] > setitimer(0x2,0x7fdfffff930,0x0) = 0 (0x0) > SIGNAL 27 > SIGNAL 27 > gettimeofday(0x40443390,0x0) = 0 (0x0) > sigprocmask(0x3,0x40443418,0x0) = 0 (0x0) > sigreturn(0x7fdfffff250) = 1076043776 (0x40232000) > poll(0x216000,0x0,0x0) = 0 (0x0) > > > Nothing else happens until I Ctrl-C it. Note that in this case I waited about 3 minutes. > ^CSIGNAL 2 > poll(0x216000,0x1,0xffffffffffffffff) ERR#4 'Interrupted system call' > SIGNAL 2 > SIGNAL 2 > process exit, rval = 2 I cannot reproduce this. When the process is hanging, does it loop (using all available CPU), or is it sleeping (and if it is, in which state)? Can you please also try pressing ^T? This should make the process generate a state dump in /tmp/uthread.dump.., which should be interesting. - Thomas -- Thomas Moestl http://www.tu-bs.de/~y0015675/ http://people.FreeBSD.org/~tmm/ PGP fingerprint: 1C97 A604 2BD0 E492 51D0 9C0F 1FE6 4F1D 419C 776C