[GHC] #8087: Bug in IO manager when increasing the number of capabilities

GHC ghc-devs at haskell.org
Tue Jul 23 20:36:41 CEST 2013


#8087: Bug in IO manager when increasing the number of capabilities
-------------------------------------+------------------------------------
        Reporter:  parcs             |            Owner:
            Type:  bug               |           Status:  patch
        Priority:  normal            |        Milestone:
       Component:  libraries/base    |          Version:  7.7
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  Runtime crash     |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------
Changes (by parcs):

 * status:  new => patch


Comment:

 Here's the fix:

 {{{
 #!diff
 diff --git a/GHC/Event/Thread.hs b/GHC/Event/Thread.hs
 index ca8ed1e..c4f83a0 100644
 --- a/GHC/Event/Thread.hs
 +++ b/GHC/Event/Thread.hs
 @@ -339,7 +339,7 @@ ioManagerCapabilitiesChanged = do

                -- create new IO managers for the new caps:
                forM_ [old_n_caps..new_n_caps-1] $
 -                startIOManagerThread eventManagerArray
 +                startIOManagerThread new_eventManagerArray

                -- update the event manager array reference:
                writeIORef eventManager new_eventManagerArray
 }}}

 `startIOManagerThread` should be writing the metadata about the new IO
 threads to the new event manager array, not the old array.

 I was going to update the testsuite but I am not sure how to formulate a
 test case that doesn't rely on stdin.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8087#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler




More information about the ghc-tickets mailing list