[Haskell-cafe] Spurious program crashes

Joel Reymont joelr1 at gmail.com
Wed Nov 16 12:37:34 EST 2005


I'm getting crashes like this and I cannot figure out what the  
problem is. I'm launching a bunch of threads that connect to a server  
via TCP and exchange packets.

I am running operations like connect and receive in a timeout  
function that launches two threads and uses an MVar to figure out  
who's done first. The timeout function then kills the two threads.

Any ideas what could be causing this? I feel like a Haskell guinea  
pig these days :-).

My Cabal build options look like this

ghc-options: -fglasgow-exts -Wall -O -debug

And the stack trace:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x3139322e
0x0027c174 in s8j1_info ()
(gdb) where
#0  0x0027c174 in s8j1_info ()
#1  0x0021c9f4 in StgRunIsImplementedInAssembler () at StgCRun.c:576
#2  0x0021cdc4 in schedule (mainThread=0x1100360,  
initialCapability=0x308548) at Schedule.c:932
#3  0x0021dd6c in waitThread_ (m=0x1100360, initialCapability=0x0) at  
Schedule.c:2156
#4  0x0021dc50 in scheduleWaitThread (tso=0x13c0000, ret=0x0,  
initialCapability=0x0) at Schedule.c:2050
#5  0x00219548 in rts_evalLazyIO (p=0x29b47c, ret=0x0) at RtsAPI.c:459
#6  0x001e4768 in main (argc=2262116, argv=0x308548) at Main.c:104

	Thanks, Joel

--
http://wagerlabs.com/







More information about the Haskell-Cafe mailing list