Skip to content

occasional segmentation faults when using Control.Parallel

The attached program fails quite often with segmentation faults or internal errors (unpredictably, in consecutive runs, without changing the source):

% time ./parallel +RTS -N2                                   
zsh: segmentation fault (core dumped)  ./parallel +RTS -N2
./parallel +RTS -N2  2.79s user 0.42s system 107% cpu 2.988 total

% time ./parallel +RTS -N2
parallel: internal error: evacuate: strange closure type 65284
    (GHC version 6.8.2 for i386_unknown_linux)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
zsh: abort (core dumped)  ./parallel +RTS -N2
./parallel +RTS -N2  3.60s user 0.51s system 108% cpu 3.781 total

% time ./parallel +RTS -N2
zsh: segmentation fault (core dumped)  ./parallel +RTS -N2
./parallel +RTS -N2  5.09s user 0.46s system 111% cpu 4.982 total

% time ./parallel +RTS -N2
500000
./parallel +RTS -N2  8.34s user 0.14s system 108% cpu 7.796 total

The program can fail both when it is compiled with and without -O2. Changing the value of maxSparks makes a difference (with value 2 it is finishing successfully always (or probably more often)).

Trac metadata
Trac field Value
Version 6.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information