Skip to content

Non-deterministic ghc-iserv terminated error

I noticed on a recent validate that I have been getting non-deterministic test failures due to external interpreter:

=====> T10891(ext-interp) 12 of 15 [0, 1, 0]                                                 [77/9256]
cd "./th/T10891.run" &&  "/home/hs01/ezyang/ghc-validate/inplace/test   spaces/ghc-stage2" -c T10891.h
s -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -fno-warn-missed-specialisatio
ns -fshow-warning-groups -XTemplateHaskell -package template-haskell -fexternal-interpreter -v0 > T108
91.comp.stderr 2>&1
Compile failed (exit code 1) errors were:

T10891.hs:30:3: error:
    • Exception when trying to run compile-time code:
        ghc-stage2: ghc-iserv terminated (-11)
      Code: let
              display :: Name -> Q ()
              display q = ...
            in
              do { display ''C;
                   display ''C';
                   .... }
    • In the untyped splice:
        $(let
            display :: Name -> Q ()
            display q = do { ... }
          in
            do { display ''C;
                 display ''C';
                 display ''C'';
                 .... })

More tests error the higher I crank up parallelism; on a recent full test run I got something like twenty failures of this kind when I have twelve threads.

There are at least two problems here. The first is the actual failure, but the second is that there isn't enough diagnostic information here to tell what the actual problem is. Combined with the nondeterministic nature of this bug I'm not sure how to debug it.

Trac metadata
Trac field Value
Version 8.1
Type Bug
TypeOfFailure OtherFailure
Priority highest
Resolution Unresolved
Component GHCi
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