Skip to content

Segmentation fault with compacting GC, and multiple threads

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 <= __sched_fifo_max_prio)' failed.'

* 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, it is in attachment.

  1. Compile with: $ghc --make -threaded -O2 main.hs
  2. 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.

Trac metadata
Trac field Value
Version 6.10.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Runtime System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC manlio.perillo@gmail.com
Operating system
Architecture
Edited by dons
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information