Fix #10017
ClosedPublic

Authored by AndreasVoellmy on Feb 1 2015, 9:01 AM.

Details

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.

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Branch
fix-trac-10017
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 3042
Build 3069: GHC Patch Validation (amd64/Linux)
AndreasVoellmy retitled this revision from to Fix #10017.
AndreasVoellmy updated this object.
AndreasVoellmy edited the test plan for this revision. (Show Details)
AndreasVoellmy added reviewers: austin, simonmar.
simonmar accepted this revision.Feb 2 2015, 2:52 AM
simonmar edited edge metadata.
This revision is now accepted and ready to land.Feb 2 2015, 2:52 AM

By the way, the rest of the signal tests are in the unix package, I'm not sure whether we should move it there.

Mikolaj accepted this revision.Feb 2 2015, 3:48 AM
Mikolaj edited edge metadata.

LGTM

This revision was automatically updated to reflect the committed changes.