Subject: Re: Back to xmms and pthreads
To: current-users <current-users@netbsd.org>
From: Anthony Mallet <anthony.mallet@useless-ficus.net>
List: current-users
Date: 03/30/2003 17:08:36
Hi,

I recently decided to get rid of pth in my pkgsrc tree, considering that
native pthreads were stable enough to really start using it.
I ran into at least one problem so far, with xmms.
This has been reported in
http://mail-index.netbsd.org/current-users/2003/03/02/0010.html
too, but I can't find an open PR about that.

The problem is not always reproducible (sometimes xmms just freeze, but
it is blocked at the same place as when it tiggers the assert below).
Here is a backtrace from gdb (not sure if gdb is already reliable with
pthreads?), under a not so old i386-current (1.6Q from March 22).

(gdb) r
Starting program: /home/src/pkgsrc/audio/xmms/work/xmms-1.2.7/xmms/.libs/xmms 
assertion "0" failed: file "/home/src/netbsd-current/lib/libpthread/pthread.c", line 361, function "pthread__idle"

Program received signal SIGABRT, Aborted.
0x4855d737 in select () from /usr/lib/libc.so.12
(gdb) up
#1  0x482de216 in select () from /usr/lib/libpthread.so.0
(gdb) up
#2  0x806df85 in ctrlsocket_func (arg=0x0) at controlsocket.c:205
205                     if ((select(ctrl_fd + 1, &set, NULL, NULL, &tv) <= 0) |
(gdb) info thread
  4 Thread 0 ()  0x482d8e8e in pthread__locked_switch ()
   from /usr/lib/libpthread.so.0
* 3 Thread 21 ()  0x4855d737 in select () from /usr/lib/libc.so.12
  2 Thread 22 ()  0x482d8e8e in pthread__locked_switch ()
   from /usr/lib/libpthread.so.0
  1 Thread 35 ()  0x482d8e8e in pthread__locked_switch ()
   from /usr/lib/libpthread.so.0

Should I send-pr?
Need more info?