
Joel Reymont wrote:
On Jul 11, 2006, at 11:00 AM, Simon Marlow wrote:
Which ones hang? Could you take one of the hanging tests, compile it with -debug, run with +RTS -Ds, and send us the output?
What ends up happening is this:
28683 p2 S 0:00.11 ../../timeout/timeout 300 cd ./typecheck/ should_compile && '/Users/joelr/work/Haskell/ghc/compiler/stage2/ghc- inplace' -no-recomp -dcore-lint -dcmm-lint -Di386_apple_darwin -c tc033.hs -fno-warn-incomplete-patterns >tc033.comp.stderr 2>&1
29125 p2 R 1:53.48 ../../timeout/timeout 300 cd ./typecheck/ should_fail && '/Users/joelr/work/Haskell/ghc/compiler/stage2/ghc- inplace' -no-recomp -dcore-lint -dcmm-lint -Di386_apple_darwin -c tcfail011.hs >tcfail011.comp.stderr 2>&1
Now, these things have been running there forever and I'm not even sure it's a Haskell problem. I suppose the test harness should have terminated the test after 300 seconds but didn't.
If I try to re-run the first process by hand it finishes instantly. If I try to re-run the whole thing as above, putting everything after 300 in double quotes it also finishes instantly.
The timeout program is a bit of a bugbear. It uses forkProcess in a non-trivial way, and has caused me many problems (forkProcess in the threaded RTS is a bit difficult to get right, as you might imagine). So I suspect some kind of bug around forkProcess on MacOS X. If you could capture the +RTS -Ds output from a timeout that hangs, that would help. You probably need to run something like 'timeout 1 true +RTS -Ds 2>&1
log' in a loop until it hangs.
Cheers, Simon