guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

1.8.2 threads check fails on NetBSD 3.1-stable


From: Greg Troxel
Subject: 1.8.2 threads check fails on NetBSD 3.1-stable
Date: Thu, 27 Dec 2007 20:42:20 -0500
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (berkeley-unix)

On NetBSD/i386 3.1ish, guile 1.8.2 (with pkgsrc patches, but nothing
relevant), and also on 4-stable, make check fails on the thread test.

NetBSD's threading implementation is unforgiving; by default any
operation that the standard labels undefined results in an abort.  My
experience has been that essentially all such cases turn out to be bugs
in the program that normally go undetected.

"gmake check" works on NetBSD current, which has a different threading
model, so it seems this bug is sensitive to ordering of thread
execution, which could also explain the earlier failure of threading
bugs to show up on Linux even when thread assertions and debugging were
enabled.

output from test:

Running threads.test
guile: Error detected by libpthread: Unlocking unlocked mutex.
Detected by file "/n0/ANONCVS/src/lib/libpthread/pthread_mutex.c", line 363, 
function "pthread_mutex_unlock".
See pthread(3) for information.
[1]   Abort trap (core dumped) ${dir}${tst}
FAIL: check-guile


(gdb) bt
#0  0xbda170fb in kill () from /usr/lib/libc.so.12
#1  0xbdac93b5 in pthread__errorfunc () from /usr/lib/libpthread.so.0
#2  0xbdac63cb in pthread_mutex_unlock () from /usr/lib/libpthread.so.0
#3  0xbdbb8f74 in scm_leave_guile ()
   from 
/n0/ANONCVS/pkgsrc/lang/guile/work/guile-1.8.2/libguile/.libs/libguile.so.17
#4  0xbdbb926c in on_thread_exit ()
   from 
/n0/ANONCVS/pkgsrc/lang/guile/work/guile-1.8.2/libguile/.libs/libguile.so.17
#5  0xbdac192e in pthread__destroy_tsd () from /usr/lib/libpthread.so.0
#6  0xbdac853e in pthread_exit () from /usr/lib/libpthread.so.0
#7  0xbdac8185 in pthread_create () from /usr/lib/libpthread.so.0


This is pretty clearly about the management of heap_mutex, but I don't
follow that.

scm_std_select seems to have an unbalanced scm_enter_guile, but I don't
understand it.

Could scm_leave_guile be getting called twice for the same thread?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]