#2910: throwTo can block indefinitely when target thread finishes with 
exceptions
blocked
---------------------------------+------------------------------------------
    Reporter:  int-e             |        Owner:  igloo           
        Type:  merge             |       Status:  new             
    Priority:  normal            |    Milestone:  6.10.2          
   Component:  Runtime System    |      Version:  6.10.1          
    Severity:  normal            |   Resolution:                  
    Keywords:                    |   Difficulty:  Easy (1 hr)     
    Testcase:                    |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
---------------------------------+------------------------------------------
Comment (by simonmar):

 More patches to merge:

 {{{
 Wed Jan  7 11:20:26 GMT 2009  Simon Marlow <[email protected]>
   * putMVar and takeMVar: add write_barrier() to fix race with throwTo

 Wed Jan  7 12:06:52 GMT 2009  Simon Marlow <[email protected]>
   * fix a race where the timer signal could remain turned off, leading to
 deadlock

 Wed Jan  7 12:07:34 GMT 2009  Simon Marlow <[email protected]>
   * maybePerformBlockedException() should handle
 ThreadComplete/ThreadKilled
   Part of the fix for #2910

 Wed Jan  7 12:08:08 GMT 2009  Bertram Felgenhauer <[email protected]>
   * Fix two more locking issues in throwTo()

 Wed Jan  7 12:11:42 GMT 2009  Simon Marlow <[email protected]>
   * add comment

 Wed Jan  7 14:05:07 GMT 2009  Simon Marlow <[email protected]>
   * Close the races between throwTo and thread completion
   Any threads we missed were being caught by the GC (possibly the idle
   GC if the system was otherwise inactive), but that's not ideal.  The
   fix (from Bertram Felgenhauer) is to use lockTSO to synchronise,
   imposing an unconditional lockTSO on thread exit.  I couldn't measure
   any performance overhead from doing this, so it seems reasonable.
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2910#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to