Admin message

Due to a large amount of spam we do not allow new users to create repositories, they are "external" users. If you are a new user and want to create a repository, for example for forking GHC, open a new issue on ghc/ghc using the "get-verified" issue template

Remove signal-based interval timer implementations
Historically the RTS interval timer (rts/Timer.c, rts/posix/Ticker.c) used signals, either SIGALRM or SIGVTALRM, set up by either the ancient `setitimer()` or the posix `create_timer()`. The interval timer is used for: * thread pre-emption (interrupting the running thread by setting its heap limit to 0 to get control to return to the scheduler) * profiling ticks * determining when we ought to run idle GC * flushing the event log Using signals has a number of disadvantages: 1. signals can interrupt other system calls (though there are some mitigations to this, SA_RESTART and related), see #10840 and #850. 2. there are _severe_ limits on what you can do in signal handlers. In particular no locks can be taken (or similarly, condition variables etc), no memory can be allocated. The list of signal safe functions is in `man 7 signal-safety`. In particular, flushing the eventlog uses `fflush()` which is _not_ signal safe. So this is already wrong. In fact it's even worse: the eventlog writer is a user-replaceable interface to write eventlog data elsewhere (e.g. to sockets). So this is not code that's tightly controlled by the RTS and is yet called from signal handler contex! And even `setitimer` used by `stopTimer` is not listed as signal safe. One of the things that it would be useful to be able to do, is to wake up tasks to animate idle capabilities. That would allow for a sane implementation of `wakeUpRts`. As it is, `wakeUpRts` has to use pipes (writing to pipes is signal safe) which goes via the in-library I/O managers, and this unnecessarily couples the I/O managers into the idle GC scheme. There are now four posix ticker implementations (in `rts/posix/ticker/*.c), based on: 1. `timerfd` 2. posix pthreads + `nanosleep` 3. `create_timer` 4. `setitimer` These are used on: 1. Recent Linux, FreeBSD & NetBSD 2. OSX, and older Linux,FreeBSD & NetBSD 3. Solaris 4. ??? So it _looks_ like we don't need ticker implementations 3 and 4 any more. Any non-ancient posix platform can use the pthreads + nanosleep ticker implementation. Solaris is [not a supported platform anymore](https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms), and if it were to be resurected then it could probably use impl 2. A quick experiment in the context of MR !15753 using `full-ci` shows no failures on any platform with CI.
issue