#9423: shutdownCapability sometimes loops indefinitely on OSX after hs_exit() -------------------------------------+------------------------------------- Reporter: AndreasVoellmy | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.10.1 Component: Runtime System | Version: 7.8.2 Resolution: fixed | Keywords: Operating System: MacOS X | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: 9284 | Differential Revisions: Phab:D129 -------------------------------------+------------------------------------- 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/9423#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler