[GHC] #9379: Blocked STM transaction is not interruptible

#9379: Blocked STM transaction is not interruptible -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: simonmar Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.8.3 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Blocked By: | None/Unknown Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- {{{#!hs import Control.Exception import Control.Concurrent import Control.Concurrent.STM import Foreign.StablePtr main :: IO () main = do tv <- atomically $ newTVar True _ <- newStablePtr tv t <- mask_ $ forkIO (blockSTM tv) killThread t blockSTM :: TVar Bool -> IO () blockSTM tv = do atomically $ do v <- readTVar tv check $ not v }}} This code blocks forever. As I understand it, since the transaction blocks, it should be interruptible even despite the mask, and so killThread must succeed here, and the program should finish promptly. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9379 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9379: Blocked STM transaction is not interruptible -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: simonmar Type: bug | Status: new Priority: normal | Milestone: Component: Runtime | Version: 7.8.3 System | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | https://phabricator.haskell.org/D104| -------------------------------------+------------------------------------- Changes (by simonmar): * differential: => https://phabricator.haskell.org/D104 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9379#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9379: Blocked STM transaction is not interruptible
-------------------------------------+-------------------------------------
Reporter: Feuerbach | Owner: simonmar
Type: bug | Status: new
Priority: normal | Milestone:
Component: Runtime | Version: 7.8.3
System | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Unknown
Unknown/Multiple | Blocked By:
Type of failure: | Related Tickets:
None/Unknown |
Test Case: |
Blocking: |
Differential Revisions: |
https://phabricator.haskell.org/D104|
-------------------------------------+-------------------------------------
Comment (by Simon Marlow

#9379: Blocked STM transaction is not interruptible -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: simonmar Type: bug | Status: merge Priority: normal | Milestone: 7.8.4 Component: Runtime | Version: 7.8.3 System | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | https://phabricator.haskell.org/D104| -------------------------------------+------------------------------------- Changes (by simonmar): * status: new => merge * milestone: => 7.8.4 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9379#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9379: Blocked STM transaction is not interruptible -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: simonmar Type: bug | Status: closed Priority: normal | Milestone: 7.8.4 Component: Runtime | Version: 7.8.3 System | Keywords: Resolution: fixed | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: | Blocking: | Differential Revisions: | https://phabricator.haskell.org/D104| -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed Comment: Merged. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9379#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC