[GHC] #10414: Buggy behavior with threaded runtime (-N1 working, -N2 getting into <<loop>>)

GHC ghc-devs at haskell.org
Sun Jun 28 15:27:09 UTC 2015


#10414: Buggy behavior with threaded runtime (-N1 working, -N2 getting into
<<loop>>)
-------------------------------------+-------------------------------------
        Reporter:  exio4             |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.10.1
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Incorrect result  |  Unknown/Multiple
  at runtime                         |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 I inlined the relevant parts of the parallel package into michaelt's
 example for the sake of testing across multiple versions of GHC. In the
 process I discovered that building with `-feager-blackholing` is necessary
 to reproduce the bug. Well, not surprising. (The parallel package
 specifies this flag in its cabal file.) To be specific, I am building it
 as
 {{{
 ghc -threaded -O -rtsopts par -fforce-recomp -feager-blackholing
 }}}
 and running as
 {{{
 while ./par 8 +RTS -N4; do :; done
 }}}
 until it fails (which is usually immediately).

 I managed to bisect the failure down to these three commits between 7.6
 and 7.8 which added cardinality analysis:
 https://github.com/ghc/ghc/compare/da4ff650ae77930a5a10d4886c8bc7d37f081db7...62653122f3cf2d48a475cadecc9b4483488c9769

 Interestingly in the versions that have cardinality analysis, the program
 still loops even when built with `-fkill-absence`.

 Hopefully this provides some clues to someone...

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


More information about the ghc-tickets mailing list