Crash in messageBlackHole()
Summary
I have a program running on my server 24/7. It suddenly crashed after running dozens of days. There is no error messages on stdout and stderr. This has happened twice recently. Kernel log (PROGRAM_NAME redacted):
[1393442.359827] PROGRAM_NAME:w[242820]: segfault at 28 ip 0000000001cfd34a sp 00007f13edffab80 error 4 in PROGRAM_NAME[400000+19f0000]
[1393442.359838] Code: 21 c1 48 3d 40 91 d1 01 41 0f 95 c0 44 84 c1 74 08 48 3d b8 91 d1 01 75 43 49 8d 47 08 0f 1f 00 4c 8b 20 4c 89 e5 48 83 e5 f8 <48> 8b 5d 00 48 81 fb c8 8f d1 01 74 e9 48 81 fb f8 91 d1 01 49 89
The crashed program is not compiled with DWARF info. However, by comparing the code with DWARF-enabled compile result, I am able to find the line in source code. Both crashes are on the same line: https://gitlab.haskell.org/ghc/ghc/-/blob/ghc-8.10.7-release/rts/Messages.c#L198
Since the crash happens very rarely, I am unable to provide a minimal reproducible example. The program use threads and sparks heavily, I'm not sure whether this is somehow related.
Environment
- GHC version used: 8.10.7
- Stackage snapshot: LTS-18.28
- GHC options:
-threaded -rtsopts "-with-rtsopts=-N -qn1" -O2
, warning-related options and language extensions are omitted. - Operating System: Debian 11
- System Architecture: x86_64