tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
netbsd-5 _lwp_park() SIGSEGV
Hello,
I upgraded a system from netbsd-4 to netbsd-5 yesterday in order to
test netbsd-5 out.
Other than a few xorg related glintches (blank console after it's
started, no way to restore text without rebooting, I'll look into that
later on), it seemed to run well.
However, I experienced an interesting problem when trying some of my
own software (mmftpd) which reliably segfaulted (SIGSEGV in
_lwp_park()). Since initial test was running mmftpd built for
netbsd-4 under COMPAT_40, I rebuilt it, and the exact same problem
continued.
The GDB backtrace is as follows: (unfortunately, I didn't build
userland with debug symbols!)
#0 0xbbb10ef7 in _lwp_park () from /usr/lib/libc.so.12
#1 0xbbade381 in pthread_cond_wait () from /usr/lib/libpthread.so.0
#2 0x08061792 in pthread_ring_wait (ring=0xba3ffb1c, abstime=0x0)
at ../pthread_util/mm_pthread_msg.c:169
#3 0x08063e82 in thread_object_main (args=0xbb93e220)
at ../pthread_util/mm_pthread_pool.c:458
#4 0xbbae06d6 in pthread_create () from /usr/lib/libpthread.so.0
#5 0xbbb36820 in swapcontext () from /usr/lib/libc.so.12
(gdb) frame 2
#2 0x08061792 in pthread_ring_wait (ring=0xba3ffb1c, abstime=0x0)
at ../pthread_util/mm_pthread_msg.c:169
169 error =
pthread_cond_wait(&ring->cond, &ring->mutex);
(gdb) print *ring
$1 = {magic = 1347571271, cond = {ptc_magic = 1431633925, ptc_lock =
0 '\0',
ptc_waiters = {ptqh_first = 0xba200000, ptqh_last = 0xba2001a0},
ptc_mutex = 0xba3ffb38, ptc_private = 0x0}, mutex = {
ptm_magic = 858980355, ptm_errorcheck = 0 '\0', ptm_pad1 =
"\000\000",
ptm_interlock = 0 '\0', ptm_pad2 = "\000\000", ptm_owner = 0x0,
ptm_waiters = 0x0, ptm_recursed = 0, ptm_spare2 = 0x0}, mode =
0,
event = 0, mevent = 0}
Since this code worked great in production use on netbsd-3 and
netbsd-4 for a long time, I first looked at PRs and found possibly
related:
kern/40161
kern/36183
port-amd64/38612
And interestingly, the same code works fine on 5.99.1. I assume that
if this was fixed before 5.99.1, a pullup to netbsd-5 might be
necessary, but I didn't look further into it yet.
I'm posting this in case someone is more familiar with the problem at
hand; I might rebuild libc and libpthread with debugging symbols and
look into it further when I have the time.
Thanks,
--
Matthew Mondor
Home |
Main Index |
Thread Index |
Old Index