[GHC] #8209: Race condition in setNumCapabilities

GHC ghc-devs at haskell.org
Mon Sep 2 20:40:29 CEST 2013


#8209: Race condition in setNumCapabilities
-------------------------------------+----------------------------------
        Reporter:  akio              |            Owner:
            Type:  bug               |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  Runtime System    |          Version:  7.7
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  x86_64 (amd64)
 Type of failure:  Runtime crash     |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+----------------------------------

Comment (by ezyang):

 I haven't run the program, but are you sure (5) happens? It is fine for
 task 0 to hit your ASSERT even when setNumCapabilities is running, because
 it still needs to check whether or not it's acceptable to run, and that
 won't happen until setNumCapabilities. What it seems to me is happening is
 that waitForReturnCapability is improperly pre-committing to the
 capability it wants to return to, whereas it should always retrieve a
 fresh candidate capability each time around the wait loop.

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




More information about the ghc-tickets mailing list