[GHC] #10533: Typechecker behaves differently on Phab and on Mac
#10533: Typechecker behaves differently on Phab and on Mac -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Keywords: | Operating System: MacOS X Architecture: | Type of failure: None/Unknown Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- On my Mac, commit 61b96a86c5342fb1c850361177d60fe855d948f6 causes test `typecheck/should_compile/FD3` to fail. But Phab succeeded in validating this commit, as seen [https://phabricator.haskell.org/B4297 here]. (I don't believe that commit has anything to do with the failure -- it's just the snapshot I looked at.) This leads to two questions: 1. Why does this test fail on a Mac? 2. Why does the typechecker behave differently, at all, on two different platforms? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10533> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10533: Typechecker behaves differently on Phab and on Mac -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: MacOS X | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by simonpj): Bizarre. This is with HEAD? Can you compile FD3 with `-ddump-tc-trace` on your Mac and attach the results? Simon -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10533#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10533: Typechecker behaves differently on Phab and on Mac -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: MacOS X | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by rwbarton): FWIW that commit validates on my Linux laptop also. Let me know if you want me to run any tests here. But first I'd rule out explanation like: are you starting from a dirty build tree possibly? For example, if you run validate does the test still fail? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10533#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10533: Typechecker behaves differently on Phab and on Mac -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: MacOS X | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by goldfire): Just rebuilt on a different Mac (both with MacOS 10.8.5) from scratch with the same behavior. Here is an excerpt: {{{ 10:40:42 ~/Documents/Programming/ghc- cur/testsuite/tests/typecheck/should_compile> git log -n 1 commit 61b96a86c5342fb1c850361177d60fe855d948f6 Author: Richard Eisenberg <eir@cis.upenn.edu> Date: Fri Jun 5 09:56:21 2015 -0400 Fix #10489 Dang, roles are annoying. Test case: typecheck/should_compile/T10489 10:40:45 ~/Documents/Programming/ghc- cur/testsuite/tests/typecheck/should_compile> ~/Documents/Programming/ghc- cur/inplace/bin/ghc-stage2 --version The Glorious Glasgow Haskell Compilation System, version 7.11.20150605 10:40:53 ~/Documents/Programming/ghc- cur/testsuite/tests/typecheck/should_compile> ~/Documents/Programming/ghc- cur/inplace/bin/ghc-stage2 -ddump-tc-trace FD3.hs > ~/temp/FD3.log 2>&1 10:41:26 ~/Documents/Programming/ghc- cur/testsuite/tests/typecheck/should_compile> }}} The trace is attached. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10533#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10533: Typechecker behaves differently on Phab and on Mac -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: MacOS X | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by goldfire): Happy to help with further debugging, but it's hard to know where to begin without seeing what the correct behavior is, which I can't seem to get on my machine. @rwbarton, could you perhaps post your `-ddump-tc-trace` as well for comparison? Thanks! -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10533#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10533: Typechecker behaves differently on Phab and on Mac -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: MacOS X | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by rwbarton): Attached. Your output seems to have additional messages that are enabled when `debugIsOn`, so maybe some other debugging output or assertion is panicking for you? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10533#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10533: Typechecker behaves differently on Phab and on Mac -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: MacOS X | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by goldfire): Replying to [comment:5 rwbarton]:
Attached. Your output seems to have additional messages that are enabled when `debugIsOn`, so maybe some other debugging output or assertion is panicking for you?
Of course. The panic is an `ASSERT`ion failure. So perhaps the problem is happening on all platforms, but only caught in a `DEBUG` build. Indeed, your log contains the problematic derived constraint at the end of `tryReporters`. It just doesn't bail out. So, weirdness resolved, I believe... but now we need to figure out why that assertion is failing. Modifying ticket accordingly. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10533#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10533: Assertion failure on FD3 test in TcErrors -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.11 checker) | Keywords: Resolution: | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by goldfire): * os: MacOS X => Unknown/Multiple * component: Compiler => Compiler (Type checker) Old description:
On my Mac, commit 61b96a86c5342fb1c850361177d60fe855d948f6 causes test `typecheck/should_compile/FD3` to fail. But Phab succeeded in validating this commit, as seen [https://phabricator.haskell.org/B4297 here]. (I don't believe that commit has anything to do with the failure -- it's just the snapshot I looked at.)
This leads to two questions:
1. Why does this test fail on a Mac?
2. Why does the typechecker behave differently, at all, on two different platforms?
New description: Test case `typecheck/should_compile/FD3` leads to an `ASSERT`ion error: {{{ ghc-stage2: panic! (the 'impossible' happened) (GHC version 7.11.20150605 for x86_64-apple-darwin): ASSERT failed! file compiler/typecheck/TcErrors.hs line 321 [[D] _ :: a_amP[sk] ~ (String, a_amP[sk]) (CNonCanonical)] Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} FD3.log (attached) shows the error happening. (When originally posting this ticket, I was very confused. The first several comments, through comment:6, are now bogus. Please ignore.) -- -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10533#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10533: Assertion failure on FD3 test in TcErrors -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler (Type | Version: 7.11 checker) | Keywords: Resolution: fixed | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => fixed Comment: I looked at this and fixed it, but failed to make a separate patch. I think it is somewhere in {{{ commit 02bac0254182def11029e2f7373ba8d2ba9ebe44 Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Thu Jun 18 14:12:54 2015 +0100 Remove some horrible munging of origins for Coercible I just didn't think it was buying enough for all the cruft it caused. We can put some back if people start complaining about poor error messages. I forget quite how I tripped over this but I got sucked in. * Lots of tidying up in TcErrors * Rename pprArisingAt to pprCtLoc, by analogy with pprCtOrigin * Remove CoercibleOrigin data constructor from CtOrigin * Make relevantBindings return a Ct with a zonked and tidied CtOrigin * Add to TcRnTypes ctOrigin :: Ct -> CtOrigin ctEvOrigin :: CtEvidence -> CtOrigin setCtLoc :: Ct -> CtLoc -> Ct }}} But in any case it doesn't matter much. No need to merge etc. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10533#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC