#3429: Segfault when running with +RTS -N2
---------------------------------+------------------------------------------
    Reporter:  igloo             |        Owner:  simonmar        
        Type:  bug               |       Status:  closed          
    Priority:  high              |    Milestone:  6.12.1          
   Component:  Runtime System    |      Version:  6.11            
    Severity:  normal            |   Resolution:  fixed           
    Keywords:                    |   Difficulty:  Unknown         
    Testcase:                    |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
---------------------------------+------------------------------------------
Changes (by simonmar):

  * status:  new => closed
  * component:  Compiler => Runtime System
  * resolution:  => fixed

Comment:

 Fixed:
 {{{
 Tue Aug 18 04:29:42 PDT 2009  Simon Marlow <[email protected]>
   * Fix #3429: a tricky race condition

   There were two bugs, and had it not been for the first one we would
   not have noticed the second one, so this is quite fortunate.

   The first bug is in stg_unblockAsyncExceptionszh_ret, when we found a
   pending exception to raise, but don't end up raising it, there was a
   missing adjustment to the stack pointer.

   The second bug was that this case was actually happening at all: it
   ought to be incredibly rare, because the pending exception thread
   would have to be killed between us finding it and attempting to raise
   the exception.  This made me suspicious.  It turned out that there was
   a race condition on the tso->flags field; multiple threads were
   updating this bitmask field non-atomically (one of the bits is the
   dirty-bit for the generational GC).  The fix is to move the dirty bit
   into its own field of the TSO, making the TSO one word larger (sadly).
 }}}

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