List Info

Thread: Re: threads/121343: pthread_cond_wait hanging in libthr




Re: threads/121343: pthread_cond_wait hanging in libthr
country flaguser name
United States
2008-03-04 21:20:03
The following reply was made to PR threads/121343; it has
been noted by GNATS.

From: David Xu <davidxuFreeBSD.org>
To: josh.carrollgmail.com
Cc: freebsd-gnats-submitFreeBSD.org
Subject: Re: threads/121343: pthread_cond_wait hanging in
libthr
Date: Wed, 05 Mar 2008 11:14:56 +0800

 Josh Carroll wrote:
 >>  This should not happen, I am not sure if there is
memory problem in the
 >>  program.
 >>
 >>  Regards,
 >>  David Xu
 >>
 > 
 > Here is what I see when gdb first starts, libthr/error
emphasized by
 > inserting blank lines around those parts of the gdb
output:
 > 
 > Attaching to program: /usr/local/bin/ushare, process
68900
 > Reading symbols from
/usr/local/lib/libupnp.so.3...done.
 > Loaded symbols for /usr/local/lib/libupnp.so.3
 > Reading symbols from
/usr/local/lib/libthreadutil.so.4...done.
 > Loaded symbols for /usr/local/lib/libthreadutil.so.4
 > Reading symbols from
/usr/local/lib/libixml.so.2...done.
 > Loaded symbols for /usr/local/lib/libixml.so.2
 > Reading symbols from /lib/libc.so.7...done.
 > Loaded symbols for /lib/libc.so.7
 > 
 > Reading symbols from /lib/libthr.so.3...done.
 > [New Thread 0x40e01290 (LWP 100363)]
 > Error while reading shared library symbols:
 > Cannot get thread info: invalid key
 > 
 > Reading symbols from /usr/lib/liblwres.so.30...done.
 > Loaded symbols for /usr/lib/liblwres.so.30
 > Reading symbols from /libexec/ld-elf.so.1...done.
 > Loaded symbols for /libexec/ld-elf.so.1
 > 0x00000000409d08da in _umtx_op () from /lib/libc.so.7
 > 
 > Perhaps I need to rebuild libthr?
 > 
 > Josh
 > 
 I don't know what really happened, but if your program is
using
 threads, it is better to link it with thread library
directly.
 Can you dump ldd result ?
 
 	ldd /usr/local/bin/ushare
 
 I have ushare up and running:
 apple# ps xaHl | grep ushare
 
   0  5235     1   0   8  0  5560  1768 nanslp Ss    ??   
0:00.01 
 /usr/local/bin/ushare --daemon
      0  5235     1   0  60  0  5560  1768 ucond  Ss    ??  
 0:00.00 
 /usr/local/bin/ushare --daemon
      0  5235     1   0  47  0  5560  1768 ucond  Ss    ??  
 0:00.00 
 /usr/local/bin/ushare --daemon
      0  5235     1   0  47  0  5560  1768 ucond  Ss    ??  
 0:00.00 
 /usr/local/bin/ushare --daemon
      0  5235     1   0  61  0  5560  1768 select Ss    ??  
 0:00.00 
 /usr/local/bin/ushare --daemon
      0  5235     1   0  48  0  5560  1768 ucond  Ss    ??  
 0:00.00 
 /usr/local/bin/ushare --daemon
      0  5235     1   0  55  0  5560  1768 ucond  Ss    ??  
 0:00.00 
 /usr/local/bin/ushare --daemon
 
 
 apple# sockstat -4l
 USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS        
FOREIGN 
 ADDRESS
 root     ushare     5235  4  tcp4   *:49152              
*
 root     ushare     5235  5  udp4   127.0.0.1:62809      
*
 root     ushare     5235  6  udp4   *            
      *
 root     ushare     5235  7  udp4   *:1900               
*
 ...
 
 Regards,
 David Xu
 
_______________________________________________
freebsd-threadsfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-threa
ds
To unsubscribe, send any mail to
"freebsd-threads-unsubscribefreebsd.org"

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )