#4850: Segfault when lots of blocked MVar messages
---------------------------------+------------------------------------------
    Reporter:  NeilMitchell      |        Owner:               
        Type:  bug               |       Status:  merge        
    Priority:  high              |    Milestone:  7.0.2        
   Component:  Runtime System    |      Version:  7.0.1        
    Keywords:                    |     Testcase:               
   Blockedby:                    |   Difficulty:               
          Os:  Windows           |     Blocking:               
Architecture:  Unknown/Multiple  |      Failure:  Runtime crash
---------------------------------+------------------------------------------
Changes (by simonmar):

  * status:  new => merge
  * milestone:  7.0.3 => 7.0.2


Comment:

 Fixed:

 {{{
 Tue Dec 21 11:49:11 GMT 2010  Simon Marlow <[email protected]>
   * releaseCapabilityAndQueueWorker: task->stopped should be false (#4850)

 Tue Dec 21 11:58:07 GMT 2010  Simon Marlow <[email protected]>
   * boundTaskExiting: don't set task->stopped unless this is the last call
 (#4850)
   The bug in this case was that we had a worker thread making a foreign
   call which invoked a callback (in this case it was performGC, I
   think).  When the callback ended, boundTaskExiting() was setting
   task->stopped, but the Task is now per-OS-thread, so it is shared by
   the worker that made the original foreign call.  When the foreign call
   returned, because task->stopped was set, the worker was not placed on
   the queue of spare workers.  Somehow the worker woke up again, and
   found the spare_workers queue empty, which lead to a crash.

   Two bugs here: task->stopped should not have been set by
   boundTaskExiting (this broke when I split the Task and InCall structs,
   in 6.12.2), and releaseCapabilityAndQueueWorker() should not be
   testing task->stopped anyway, because it should only ever be called
   when task->stopped is false (this is now an assertion).
 }}}

 We should get this in 7.0.2.

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