[GHC] #8836: ghc 7.6.3 (Linux) hangs on -O2

#8836: ghc 7.6.3 (Linux) hangs on -O2 ------------------------------+-------------------------------------------- Reporter: tsuraan | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: GHC doesn't work at all Unknown/Multiple | Test Case: Difficulty: Unknown | Blocking: Blocked By: | Related Tickets: | ------------------------------+-------------------------------------------- I haven't had any luck finding a minimal test case for this, but the following replicates the issue on my two Linux machines running ghc 7.6.3: git clone https://github.com/tsuraan/optimal-blocks cd optimal-blocks git checkout bceee69f9f03d2e559f96cdf58412ada09c96a8c cabal sandbox init cabal install --only-dependencies cabal configure cabal build Cabal build will successfully build Algorithm.OptimalBlocks.SipHash and Algorithm.OptimalBlocks.BuzzHash, and it will attempt to build Algorithm.OptimalBlocks, but it will hang forever, using 100% of a single core. I have no idea how to debug this, but in src/Algorithm/OptimalBlocks.hs, if you replace the "in Blocks (reverse rlist) end" with "in Blocks [] bs", it will compile. Also, if that same file starts with the line "{-# OPTIONS_GHC -O1 #-}" it will compile. This also happens on my Mac running OSX 10.8.5 and ghc 7.4.2 without llvm; I have to tweak the .cabal file a little to drop the lower bound on base and to get rid of the "-fllvm" flag, but if I do that I see the exact same behaviour. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8836 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8836: ghc 7.6.3 and 7.4.2 hang on -O2 --------------------------------------------+------------------------------ Reporter: tsuraan | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC doesn't work at all | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: --------------------------------------------+------------------------------ -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8836#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8836: ghc 7.6.3 and 7.4.2 hang on -O2 --------------------------------------------+------------------------------ Reporter: tsuraan | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC doesn't work at all | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: --------------------------------------------+------------------------------ Comment (by gelisam): I can reproduce the issue with 7.6.3 (removing the -fllvm flag), but not with 7.8.20140130 (also removing the upper bound on base). Must have been fixed already. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8836#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8836: ghc 7.6.3 and 7.4.2 hang on -O2 --------------------------------------------+------------------------------ Reporter: tsuraan | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC doesn't work at all | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: --------------------------------------------+------------------------------ Comment (by thoughtpolice): This looks similar to #7944 and #5550 - can you see where the compiler halts during compilation using `-v3` or something? In any case, if it's fixed by 7.8, all the better. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8836#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8836: ghc 7.6.3 and 7.4.2 hang on -O2 --------------------------------------------+------------------------------ Reporter: tsuraan | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC doesn't work at all | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: --------------------------------------------+------------------------------ Comment (by gelisam): You are right, it hangs at the same spot as #7944: {{{ ... *** SpecConstr: Result size of SpecConstr }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8836#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8836: ghc 7.6.3 and 7.4.2 hang on -O2 --------------------------------------------+------------------------------ Reporter: tsuraan | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC doesn't work at all | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: --------------------------------------------+------------------------------ Changes (by thoughtpolice): * status: new => closed * resolution: => duplicate Comment: Right, then we know what's wrong. Unfortunately, there isn't really a good 'fix' that's possible to backport to fix `SpecConstr` for 7.6 users - in the mean time, you'll have to get by with `-O1` or (`-O2 -fno-spec- constr`, I suppose). Alternatively, you can also try tuning the constructor specialisation threshold as noted in #7944. There won't be a 7.6.4 release, and as this is fixed in HEAD, I'm marking this as a duplicate. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8836#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8836: ghc 7.6.3 and 7.4.2 hang on -O2 -------------------------------------+------------------------------------- Reporter: tsuraan | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: GHC | Blocked By: doesn't work at all | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: closed => new * resolution: duplicate => Comment: I believe this is finally fixed; see #8852. Can you try now, with HEAD? Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8836#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8836: ghc 7.6.3 and 7.4.2 hang on -O2 -------------------------------------+------------------------------------- Reporter: tsuraan | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: GHC | Blocked By: doesn't work at all | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => infoneeded -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8836#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8836: ghc 7.6.3 and 7.4.2 hang on -O2 -------------------------------------+------------------------------------- Reporter: tsuraan | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: GHC | Blocked By: doesn't work at all | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by thoughtpolice): I believe this is fixed in HEAD after a quick attempt. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8836#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8836: ghc 7.6.3 and 7.4.2 hang on -O2 -------------------------------------+------------------------------------- Reporter: tsuraan | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: fixed | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: GHC | Blocked By: doesn't work at all | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: infoneeded => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8836#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC