Assertion triggered by STM invariant.
The program attached depends on the async and stm packages. It will push some numbers through a pipeline, while keeping track of some state.
If invoked without arguments, the program will output the state and result of each iteration. If invoked via ./repro check
, an STM invariant will be installed when the state is initialized. This invariant will cause the program to
- hangup, presumably due to a livelock, if the program has been compiled without
-debug
, or - crash with the following error:
internal error: ASSERTION FAILED: file rts/RaiseAsync.c, line 1001",
if the "-debug" flag has been used for compilation.
The latter case also happens with GHC 8.0.2:
internal error: ASSERTION FAILED: file rts/RaiseAsync.c, line 997
Furthermore, this problem only occurs if the program is compiled using the additional flags -rtsopts -threaded -with-rtsopts=-N
.