[GHC] #12903: SIGINT is not handled in forked process
#12903: SIGINT is not handled in forked process -------------------------------------+------------------------------------- Reporter: qnikst | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime | Version: 8.0.1 System | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- If haskell program is forked in a toplevel hander that sends UserInterrupt in the main thread doesn't work, because Thread 1 doesn't exists in forked program, so that action is noop. Minimal example: {{{#!hs import Control.Concurrent import Control.Exception import System.Posix main = do pid <- forkProcess $ do handle (\UserInterrupt{} -> putStrLn "caught") $ threadDelay 2000000 signalProcess sigINT pid threadDelay 2000000 }}} Expected result: "caught" printed to stdout. Actual result: nothing is printed. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12903> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12903: SIGINT is not handled in forked process -------------------------------------+------------------------------------- Reporter: qnikst | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by qnikst): * cc: slyfox (added) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12903#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12903: SIGINT is not handled in forked process -------------------------------------+------------------------------------- Reporter: qnikst | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2770 Wiki Page: | -------------------------------------+------------------------------------- Changes (by qnikst): * differential: => Phab:D2770 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12903#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12903: SIGINT is not handled in forked process -------------------------------------+------------------------------------- Reporter: qnikst | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2770 Wiki Page: | -------------------------------------+------------------------------------- Changes (by Khudyakov): * cc: Khudyakov (added) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12903#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12903: SIGINT is not handled in forked process -------------------------------------+------------------------------------- Reporter: qnikst | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2770 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"895a131f6e56847d9ebca2e9bfe19a3189e49d72/ghc" 895a131f/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="895a131f6e56847d9ebca2e9bfe19a3189e49d72" Install toplevel handler inside fork. When rts is forked it doesn't update toplevel handler, so UserInterrupt exception is sent to Thread1 that doesn't exist in forked process. We install toplevel handler when fork so signal will be delivered to the new main thread. Fixes #12903 Reviewers: simonmar, austin, erikd, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2770 GHC Trac Issues: #12903 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12903#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12903: SIGINT is not handled in forked process -------------------------------------+------------------------------------- Reporter: qnikst | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: Runtime System | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2770 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed * milestone: => 8.2.1 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12903#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12903: SIGINT is not handled in forked process -------------------------------------+------------------------------------- Reporter: qnikst | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.2 Component: Runtime System | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2770 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: 8.2.1 => 8.0.2 Comment: I looked at this again and it actually seemed simple enough to merge and a sensible fix. Merged to `ghc-8.0` as fb0f4cf66f3fc7590821e6688440bf86c25aced1. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12903#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12903: SIGINT is not handled in forked process -------------------------------------+------------------------------------- Reporter: qnikst | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.2 Component: Runtime System | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2770 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Matthew Pickering <matthewtpickering@…>): In [changeset:"6720376500c33947fe196b68fe54f5e448376c5d/ghc" 67203765/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="6720376500c33947fe196b68fe54f5e448376c5d" Disable T12903 due to flakiness Test seems to randomly fail on harbormaster. Disabling it until it can be fixed. Test Plan: make test TEST=T12903 Reviewers: austin, bgamari, simonmar, mpickering Reviewed By: mpickering Subscribers: mpickering, thomie, qnikst Differential Revision: https://phabricator.haskell.org/D2821 GHC Trac Issues: #12903 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12903#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12903: SIGINT is not handled in forked process -------------------------------------+------------------------------------- Reporter: qnikst | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: Runtime System | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2770 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: 8.0.2 => 8.2.1 Comment: Given all of the trouble that this test has given us I'm afraid I'm going to need to revert in `ghc-8.0`. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12903#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12903: SIGINT is not handled in forked process -------------------------------------+------------------------------------- Reporter: qnikst | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: Runtime System | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2770 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"16c70dafe21ddf8da6085e22994376a9c79628fb/ghc" 16c70daf/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="16c70dafe21ddf8da6085e22994376a9c79628fb" Disable T12903 on Darwin due to flakiness Test seems to randomly fail on harbormaster and CircleCI. Disabling it until it can be fixed. Test Plan: make test TEST=T12903 Reviewers: austin, bgamari, simonmar, mpickering Reviewed By: mpickering Subscribers: mpickering, thomie, qnikst GHC Trac Issues: #12903 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12903#comment:9> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC