[141] in Pthreads mailing list archive
pthreads with guile?
daemon@ATHENA.MIT.EDU (William S. Gribble)
Sat Oct 14 17:36:38 1995
From: "William S. Gribble" <grib@cs.utexas.edu>
Date: Sat, 14 Oct 1995 16:13:14 -0500
To: pthreads@MIT.EDU
Has anyone successfully used guile in conjunction with pthreads? I rebuilt
guile using CC=pgcc, but apparently guile wants to handle signals
in a way that pthreads doesn't like -- I reliably end up getting a
SIGSEGV in a *guile* handler for SIGALRM during a context switch,
with pthread_run == 0...
Here's a stack dump. Note that without Guile running, everything
frame #12 and deeper is known to work, and without pthreads,
everything frame #12 and shallower is known to work.
Thanks for any advice,
b.g.
------------------------------
Program received signal SIGSEGV, Segmentation fault.
0x45008 in __error () at /usr/src/pthreads/pthreads/errno.c:49
49 if (!pthread_run->error_p) {
Current language: auto; currently c
(gdb) print pthread_run
$1 = (struct pthread *) 0x0
(gdb) where
#0 0x45008 in __error () at /usr/src/pthreads/pthreads/errno.c:49
#1 0x23e38 in alrm_signal (sig=14) at ../../libguile/scmsigs.c:186
#2 0xbffff4e0 in end ()
#3 0x5a567 in context_switch () at /usr/src/pthreads/pthreads/signal.c:173
#4 0x5af2c in sigvtalrm () at /usr/src/pthreads/pthreads/signal.c:282
#5 0x5a7b5 in sig_handler (sig=26) at /usr/src/pthreads/pthreads/signal.c:321
#6 0x5ac08 in pthread_resched_resume (state=PS_SELECT_WAIT)
at /usr/src/pthreads/pthreads/signal.c:481
#7 0x4d9c3 in select (numfds=0, readfds=0xbffff7d8, writefds=0xbffff7b8,
exceptfds=0xbffff798, timeout=0xbffff7f8)
at /usr/src/pthreads/pthreads/select.c:165
#8 0x407ab in ms_pause (milliseconds=100) at ./basic/timer.c:88
#9 0x3e0bc in sync_client () at ./basic/comm-pac.c:121
#10 0x3effb in sfConnectToRobot (type=5, host=0xe7058 "/dev/ttyS0")
at ./basic/comm-srv.c:84
#11 0x1722 in Pioneer::Pioneer (this=0x90118, port=0xe7058 "/dev/ttyS0")
at ./Pioneer.h:35
#12 0x1137 in robot_connect (arg=738416) at wrappers.cc:19
#13 0x1c789 in scm_ceval (x=8564, env=8564) at ../../libguile/eval.c:1342
#14 0x1ebd5 in scm_eval_3 (obj=738408, copyp=0, env=8564)
at ../../libguile/eval.c:1994
#15 0x16e21 in scm_repl (prompt=601680, env=8564) at ../../libguile/repl.c:2245
#16 0x318f in _eval_port (answer=0xbffff91c, toplvl=1, port=738392, printp=1)
at ../../libguile/gscm.c:635
#17 0x3533 in eval_str (answer=0xbffffa3c, toplvl=1,
str=0xbffff974 "(robot-connect \"/dev/ttyS0\")")
at ../../libguile/gscm.c:781
#18 0x35b8 in gscm_eval_str (answer=0xbffffa3c, toplvl=1,
str=0xbffff974 "(robot-connect \"/dev/ttyS0\")")
at ../../libguile/gscm.c:809
#19 0x1881 in Guile::eval_str (this=0xbffffa40,
to_eval=0xbffff974 "(robot-connect \"/dev/ttyS0\")", result=0xbffffa3c)
at ./Guile.h:62
#20 0x144d in main (argc=1, argv=0xbffffa58) at pinball.cc:43
(gdb)