[Haskell-cafe] strange hangs with -threaded runtime

Joey Hess joey at kitenet.net
Fri Jul 13 20:26:03 CEST 2012


I have a rather large program that works fine with ghc's default
runtime, but now I'd like to build it with -threaded, and this
causes it to hang in a way I have not been able to pin down to anything
specific. It hangs at different points each time it's run; running
it in strace will consistently avoid the problem. If I look at
it once it's hung, I always see a pair of processes, both blocked
in futex:

joey at wren:~/src/git-annex>strace -p 21749
Process 21749 attached - interrupt to quit
futex(0x8b03930, FUTEX_WAIT_PRIVATE, 69, NULL^C <unfinished ...>
Process 21749 detached
joey at wren:~/src/git-annex>strace -p 21811
Process 21811 attached - interrupt to quit
futex(0x8b03df8, FUTEX_WAIT_PRIVATE, 2, NULL

Are there any common gotchas with converting to the threaded runtime
that might provide a hint to what's wrong? My code does not currently
use Control.Concurrent or threads, although it does use some libraries
like MissingH that use forkIO or forkOS.

GHC 7.4.1, 7.4.2 on Debian Linux

-- 
see shy jo



More information about the Haskell-Cafe mailing list