Authored by AndreasVoellmy.

Description

Fix Trac #10017

Summary:
In the threaded RTS, a signal is delivered from the RTS to Haskell
user code by writing to file that one of the IO managers watches (via
an instance of GHC.Event.Control.Control). When the IO manager
receives the signal, it calls GHC.Conc.Signal.runHandlers to invoke
Haskell signal handler. In the move from a single IO manager to one IO
manager per capability, the behavior was (wrongly) extended so that a
signal is delivered to every event manager (see Trac #9423), each of which
invoke Haskell signal handlers, leading to multiple invocations of
Haskell signal handlers for a single signal. This change fixes this
problem by having the RTS (in generic_handler()) notify only the
Control instance used by the TimerManager, rather than all the
per-capability IO managers.

Reviewers: austin, hvr, simonmar, Mikolaj

Reviewed By: simonmar, Mikolaj

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D641

Details

Committed
AndreasVoellmyFeb 2 2015, 9:50 AM
Reviewer
simonmar
Differential Revision
D641: Fix #10017
Parents
rGHC07ee96faac49: Use strict atomicModifyIORef' (added in GHC 7.6).
Branches
Unknown
Tags
Unknown
Build Status
Buildable 3044
Build 3071: GHC Continuous Integration (amd64/Linux)