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.