#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  |  
---------------------------+------------------------------------------------

Comment(by simonmar):

 Replying to [comment:2 guest]:


 > Perhaps a hybrid could be built?  If all threads are STM blocked and
 there exists threads blocked on a TVar for which it has the only reference
 then send an exception to those threads.  Otherwise, send an exception to
 all the threads.  How practical is this?  (pretend for a moment that I
 would do the work, if that lie gets you to expand on the topic more ;-) )

 I think what you're asking for is a strongly-connected-component analysis
 of the graph of threads.  Then you could identify the thread(s) that have
 no references ''to'' them, and wake those up.  That would be the minimal
 set of threads that you could wake up.

 Unfortunately, SCC requires at least two traversals of the object graph
 (one with the pointers reversed), plus extra information would need to be
 stored per-thread.  This is pretty hard to do in the context of the
 existing GC.

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