[GHC] #10017: signal handlers are invoked multiple times when the threaded rts is used

GHC ghc-devs at haskell.org
Mon Feb 2 16:05:07 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 Andreas Voellmy <andreas.voellmy@…>):

 In [changeset:"92c93544939199f6ef758e1658149a971d4437c9/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="92c93544939199f6ef758e1658149a971d4437c9"
 Fix #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 #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
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10017#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list