[Haskell-cafe] GHC RTS bug: segmentation fault
manlio_perillo at libero.it
Sun Apr 12 14:40:39 EDT 2009
In a program I have experienced a segmentation fault;
not only that but also:
* tpp.c:63: __pthread_tpp_change_priority: Assertion `new_prio == -1 ||
(new_prio >= __sched_fifo_min_prio && new_prio <=
* internal error: removeThreadFromQueue: not found
(GHC version 6.8.2 for i386_unknown_linux)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
I have managed to write a program that reproduces the problem:
Compile with: $ghc --make -threaded -O2 main.hs
Execute with: $./main +RTS -A128M -s -c -N4 -RTS 5000000 500
This should produce a segmentation fault (or one of the previous errors).
I strongly suspect that the cause is an uncaught stack overflow.
Executing the code with only 1 threads, there are no more problems.
Increasing the thread stack size (-k1M), there are no more problems.
If the problem is really an uncaught stack overflow, I'm rather sure
that a more simple test can be written, to reproduce the problem.
I'm on Linux Debian Etch i386; GHC 6.8.2.
Some notes about the program:
- when no segmentation fault occurs, the program requires about 1 GB of
- there is no real parallelization, only 1 CPU is used
- the mapReduce implementation is taken from Real World Haskell
- the code is adapted from the code I'm using in a project
Thanks Manlio Perillo
More information about the Haskell-Cafe