Skip to content

Segfault on RTS schedule function (GHC 9.6.1)

We consistently have segfault on a specific location of RTS schedule on macos M1 laptops. On my machine (macos 13.2.1), I was able to get a core dump of the crash (happened once):

* thread #28, stop reason = ESR_EC_PC_ALIGN (fault address: 0xf9400291910006d6)
  * frame #0: 0x00000011910006d6
    frame #1: 0x00000001035a4b04 libHSrts-1.0.2_thr-ghc9.6.1.dylib`schedule + 1188

On my colleague's machine, it was much more frequent (on macos 13.3.1) and from ~/Library/Logs/DiagnosticReports, we were able to get some OS reports:

Thread 31 Crashed:: ghc_worker
1   ???                           	       0x1057f0b04 schedule + 1188
Thread 53 Crashed:: ghc_worker
0   ???                           	      0x702a03daa1 ???
1   ???                           	       0x1033ecb04 schedule + 1188
2   libsystem_pthread.dylib       	       0x19ad16da0 thread_start + 8
Thread 33 Crashed:: ghc_worker
0   ???                           	           0x35c60 ???
1   ???                           	       0x105bfcb04 schedule + 1188
2   libsystem_pthread.dylib       	       0x19ad16da0 thread_start + 8

We use the same GHC binary from our nix setup, so the crash happened at the same location.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information