Skip to content

ghc panics at random places with -jX

Affected versions: pretty much all the things from early ghc8 until most recent.

Symptoms: Out of 106 clean builds 36 failed with random ghc panic. By random I mean no two are alike. There are 525 files in a project and compilation goes in parallel with -j8. Other than panic in 21 cases it generates type errors (types are perfectly fine and whatever is under "with actual type" is something that probably exists in the same file or at least in the project itself but totally unrelated to what type an expression actually is. And even in those cases where ghc fails at the same file it usually results in different panic messages.

What was checked:

Stale interface files: No, ghc is told to use a separate build directory build system removes it

bad memory/random file system corruption: No, ghc 7.10 builds the same codebase just fine and it also fails on other machines

strange packages in user package database: No, ghc is told to ignore those

ghc was reinstalled several times with system package db wiped.

Trac metadata
Trac field Value
Version 8.0.1
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