Skip to content

RTS : Race condition with usage of timer_delete

Using Qemu (CPU emulator) to build GHC for Arm, the build ocassionally dies with either a segfault just before exit or hangs just before exit (ie the output files are written and seem complete, but GHC does not terminate cleanly causing the build to halt).

While debugging POSIX timer support in Qemu I wrote a little test program for POSIX timers and found that under Qemu, about 1 time in 10, the signal related to the POSIX timer gets delivered *after* the timer is deleted and causes either a segfault or a hang. While I have only seen this happen for sure with Qemu/ARM emulation, the asynchronous nature of signals suggests that this is theoretically possible in real (ie non-emulated) systems.

Already have a tested patch to fix this.

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