Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jun 2003 08:50:27 -0700 (PDT)
From:      Thomas Moestl <t.moestl@tu-bs.de>
To:        freebsd-sparc64@FreeBSD.org
Subject:   Re: sparc64/53670: pthreads implementation on 5.1-Release sparc64 not working
Message-ID:  <200306241550.h5OFoR2d093702@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR sparc64/53670; it has been noted by GNATS.

From: Thomas Moestl <t.moestl@tu-bs.de>
To: Steven Haywood <steven@natural.keybaud.org>
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 <pthread.h>
 > 
 > 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.<pid>.<serial>,
 which should be interesting. 
 
 	- Thomas
 
 -- 
 Thomas Moestl <t.moestl@tu-bs.de>	http://www.tu-bs.de/~y0015675/
               <tmm@FreeBSD.org>		http://people.FreeBSD.org/~tmm/
 PGP fingerprint: 1C97 A604 2BD0 E492 51D0  9C0F 1FE6 4F1D 419C 776C



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200306241550.h5OFoR2d093702>