Subject: race condition in pthread write()?
To: Nathan J. Williams <email@example.com>
From: Karl Janmar <firstname.lastname@example.org>
Date: 02/11/2003 14:57:46
I think there is a race condition in write()-libc or pthread, I don't
exactly where to look, but here is my case:
I run xmms with pthread, it use one thread for writing to esd, and some
others for encode the mp3-stream. After a while (could be up to 1-2 hour)
it freeze. when I do ps axs it shows that all threads(10 or something) is
stuck in sastacks (kern_sa.c:sa_uppcall_userret() waiting for a stack to
run?) and ONE is in waiting (it says wait in the WCHAN col. in ps).
When I do a backtrace on the running xmms i found this:
#0 0x4856fffb in write () from /usr/lib/libc.so.12
#1 0x482e5f65 in write () from /usr/lib/libpthread.so.0
#2 0x4863b8ef in get_oplugin_info ()
#3 0x4863bbed in get_oplugin_info ()
#4 0x1c340 in ?? ()
Ok, maybe this doesn't say too much but if you could give me a hint where
to look maybe I could help you find the problem. (I am very new to the
NetBSD kernel, and especailly the SA).
Regards, Karl Janmar