#5055: STM Exception "BlockedIndefinitelyOnSTM" throws to wrong thread
---------------------------+------------------------------------------------
  Reporter:  guest         |          Owner:                  
      Type:  bug           |         Status:  closed          
  Priority:  normal        |      Milestone:                  
 Component:  Compiler      |        Version:  7.0.3           
Resolution:  wontfix       |       Keywords:  stm             
  Testcase:                |      Blockedby:                  
Difficulty:                |             Os:  Unknown/Multiple
  Blocking:                |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown  |  
---------------------------+------------------------------------------------
Changes (by simonmar):

  * status:  new => closed
  * resolution:  => wontfix


Comment:

 GHC is behaving correctly here.  It has figured out that the entire
 program is deadlocked and has therefore sent ''both'' threads the
 `BlockedIndefinitelyOnSTM` exception.  It's just the way reachability
 works in the GC: neither thread is reachable from a root, so both are
 considered to be deadlocked.

 It's true that if we were to wake up just the child thread, then it could
 wake up the main thread.  But that's a difficult property for the GC
 determine - once it has found two threads to be deadlocked, which one
 should it try to wake up?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5055#comment:1>
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