[GHC] #10017: signal handlers are invoked multiple times when the threaded rts is used
GHC
ghc-devs at haskell.org
Sun Feb 1 15:07:45 UTC 2015
#10017: signal handlers are invoked multiple times when the threaded rts is used
-------------------------------------+-------------------------------------
Reporter: redneb | Owner:
Type: bug | AndreasVoellmy
Priority: highest | Status: new
Component: Runtime System | Milestone: 7.10.1
Resolution: | Version: 7.10.1-rc1
Operating System: Linux | Keywords:
Type of failure: Incorrect result | Architecture:
at runtime | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: #9423 | Blocking:
| Differential Revisions: Phab:D641
-------------------------------------+-------------------------------------
Comment (by AndreasVoellmy):
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.
This has no impact on #9423; i.e. the fix here does not re-introduce the
issue identified in #9423.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10017#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list