[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #24867] `define' should be thread-safe
From: |
Linas Vepstas |
Subject: |
[bug #24867] `define' should be thread-safe |
Date: |
Tue, 23 Dec 2008 03:06:42 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.0.5) Gecko/2008121621 Ubuntu/8.04 (hardy) Firefox/3.0.5 |
Follow-up Comment #3, bug #24867 (project guile):
Note that the attached test case shows 4 distinct behaviours:
1) runs fine, exiting normally, w/o any errors
2) Spewing messages such as:
ERROR: Unbound variable: x2-347
ERROR: Unbound variable: x2-347
ERROR: Unbound variable: x2-347
ERROR: Unbound variable: define
ERROR: Unbound variable: x1-2525
ERROR: Unbound variable: x1-2525
ERROR: Unbound variable: x1-2525
ERROR: Unbound variable: x1-2525
ERROR: Unbound variable: x1-2525
ERROR: Unbound variable: x1-2525
the numbers being different each time, of course, but then exiting
normally.
3) Deadlocking in garbage collection, with all four threads
stuck in
#5 0xf7f01f6b in scm_gc_for_newcell (freelist=0xf7f8c8ec,
free_cells=0x90c810c) at gc.c:484
(this may be preceeded by the prints above)
4) Segfault:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xf74c5b90 (LWP 30649)]
0xf7f426ad in scm_assert_smob_type (tag=639, val=0x0) at smob.c:63
63 if (!SCM_SMOB_PREDICATE (tag, val))
(gdb) bt
#0 0xf7f426ad in scm_assert_smob_type (tag=639, val=0x0) at smob.c:63
#1 0xf7f0b4c5 in scm_make_dynamic_state (parent=0x0) at fluids.c:508
#2 0xf7f62bdf in guilify_self_2 (parent=0x0) at threads.c:508
#3 0xf7f64992 in scm_i_init_thread_for_guile (base=0xf74c5388, parent=0x0)
at threads.c:611
#4 0xf7f649c5 in scm_i_with_guile_and_parent (
func=0x8048754 <guile_mode_definer>, data=0xffaf0cbc, parent=0x0)
at threads.c:743
#5 0xf7f64ace in scm_with_guile (func=0x8048754 <guile_mode_definer>,
data=0xffaf0cbc) at threads.c:732
#6 0x080488a8 in definer ()
#7 0xf7fa14fb in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#8 0xf7e45e5e in clone () from /lib/tls/i686/cmov/libc.so.6
I'm guessing that the use of immutable vlists, as proposed by Ludo, for use
in the module-obarray per mail discussion, would solve all of the above.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?24867>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/