9 Jun 2006 03:36
segfault with threads
Hello Shiro and all,
I have a kahua application, which segfaults iff I use threads.
The program uses custom C bindings, so I don't claim it's not a
bug in my code. But the fault occurs always at the same
point (in gauche code), so maybe some hint would help me.
The fault is this:
[Switching to Thread -1212094784 (LWP 1321)]
0xb7df43b0 in run_loop () at vm.c:1126
1126 CASE(SCM_VM_LREF20) { VAL0 = ENV_DATA(ENV->up->up, 0);NEXT1; }
(gdb) bt
#0 0xb7df43b0 in run_loop () at vm.c:1126
#1 0xb7dfc698 in user_eval_inner (program=0x8c24580, codevec=0x80ead48) at vm.c:2919
#2 0x0804a3d1 in main (argc=11, argv=0xbf960a64) at main.c:425
The program uses 2 helper threads only at one point.
To trace down the problem I tried to run those threads serially.
Here is how I make the threads run serially:
(let1 t1 (load-people-list pg "f")
(if (thread? t1)
(thread-join! t1)))
(let1 t2 (load-people-list pg "m")
(if (thread? t2)
(thread-join! t2)))
(Continue reading)
RSS Feed