[GHC] #8768: Internal compiler error on haskell-src-exts 1.14.01 (profiling)

#8768: Internal compiler error on haskell-src-exts 1.14.01 (profiling) ----------------------------------+--------------------------------------- Reporter: MagnusTherning | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc1 Keywords: | Operating System: Linux Architecture: x86_64 (amd64) | Type of failure: Compile-time crash Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ----------------------------------+--------------------------------------- I'm configuring and building {{{haskell-src-exts}}} like this: {{{ runhaskell Setup configure -O -p --enable-shared \ -fbase4 runhaskell Setup build }}} It builds the ordinary bits just fine, but when it gets to compiling for profiling: {{{ [ 1 of 22] Compiling Language.Haskell.Exts.Annotated.Syntax ( src/Language/Haskell/Exts/Annotated/Syntax.hs, dist/build/Language/Haskell/Exts/Annotated/Syntax.p_o ) /tmp/ghc340_0/ghc340_8.s:1:0: internal compiler error: Segmentation fault .section .rodata ^ Please submit a full bug report, with preprocessed source if appropriate. }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8768 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8768: Internal compiler error on haskell-src-exts 1.14.01 (profiling) ---------------------------------------+---------------------------------- Reporter: MagnusTherning | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc1 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Comment (by thoughtpolice): What GCC and binutils (or associated compiler/assembler tools) are you using ''exactly''? The thing is, this is actually a bug in GNU as or GCC it seems, as the choke happens when compiling the resulting profiled assembly code created by GHC - GHC has already done its job. There may be a possible way to work around this, but I'll need to know exactly what system you're on first to be sure I can reproduce it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8768#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8768: Internal compiler error on haskell-src-exts 1.14.01 (profiling) ---------------------------------------+---------------------------------- Reporter: MagnusTherning | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc1 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Comment (by MagnusTherning): Replying to [comment:1 thoughtpolice]:
What GCC and binutils (or associated compiler/assembler tools) are you using ''exactly''?
The thing is, this is actually a bug in GNU as or GCC it seems, as the choke happens when compiling the resulting profiled assembly code created by GHC - GHC has already done its job. There may be a possible way to work around this, but I'll need to know exactly what system you're on first to be sure I can reproduce it.
It's an up-to-date ArchLinux system: {{{ # pacman -Q binutils gcc binutils 2.24-2 gcc 4.8.2-8 }}} Let me know if there is more information you need from me. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8768#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8768: Internal compiler error on haskell-src-exts 1.14.01 (profiling) ---------------------------------------+---------------------------------- Reporter: MagnusTherning | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc1 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Comment (by dmbergey): I'm encountering the same error. I'm running debian sid. * ghc-7.8.1-rc2 * gcc-4.8.2-2 * binutils 2.24-3 Let me know if there's anything else I can do to help diagnose this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8768#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8768: Internal compiler error on haskell-src-exts 1.14.01 (profiling) ---------------------------------------+---------------------------------- Reporter: MagnusTherning | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Changes (by dmbergey): * version: 7.8.1-rc1 => 7.8.1-rc2 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8768#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8768: Internal compiler error on haskell-src-exts 1.14.01 (profiling) ---------------------------------------+---------------------------------- Reporter: MagnusTherning | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Comment (by octoploid): See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60436 Adding "-nostdinc" to the gcc invocation is a workaround. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8768#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8768: Internal compiler error on haskell-src-exts 1.14.01 (profiling) ---------------------------------------+---------------------------------- Reporter: MagnusTherning | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Comment (by volodya): It is still producing the same error. I'm trying to compile the package with the flag as follows: {{{ cabal build --gcc-options=-nostdinc }}} and as follows: {{{ runhaskell Setup.hs build --gcc-options=-nostdinc }}} What have I missed? Debian testing ghc 7.8.20140228-1 gcc 4.8.2-2 biinutils 2.24-4 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8768#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8768: Internal compiler error on haskell-src-exts 1.14.01 (profiling) ---------------------------------------+---------------------------------- Reporter: MagnusTherning | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Changes (by ghorn): * cc: gregmainland@… (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8768#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8768: Internal compiler error on haskell-src-exts 1.14.01 (profiling) ---------------------------------------+---------------------------------- Reporter: MagnusTherning | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.3 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Changes (by thoughtpolice): * milestone: => 7.8.3 Comment: I believe this should now be fixed by 396648eebaa1144d4d1f5326db716e8130f73732 - furthermore, this commit has been merged into the 7.8 branch. Can anyone test this please? I have not been able to reproduce it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8768#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8768: Internal compiler error on haskell-src-exts 1.14.01 (profiling) ---------------------------------------+---------------------------------- Reporter: MagnusTherning | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: 7.8.3 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Changes (by thoughtpolice): * status: new => infoneeded -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8768#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8768: Internal compiler error on haskell-src-exts 1.14.01 (profiling) ---------------------------------------+---------------------------------- Reporter: MagnusTherning | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: 7.8.3 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Comment (by MagnusTherning): I thought I'd make an attempt at verifying this just now, but got stuck already on getting all the sources. First I was told that I had an old {{{time}}} and should run {{{rm libraries/time}}}, which I did. Then I ran into the next issue: {{{ #!sh % ./sync-all -r git://git.haskell.org get -b ghc-7.8 .... == running git submodule update fatal: repository '/startdir/packages/Cabal.git' does not exist Clone of '/startdir/packages/Cabal.git' into submodule path 'librariesCabal' failed git failed: 256 at ./sync-all line 122. }}} I don't really have time to look into this myself, but if I get some guidance I'll be happy to fire off the build while keeping busy with more pressing stuff. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8768#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8768: Internal compiler error on haskell-src-exts 1.14.01 (profiling) ---------------------------------------+---------------------------------- Reporter: MagnusTherning | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: 7.8.3 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Comment (by MagnusTherning): Now I've managed to figure out what causes the build failure. It's the combination of me using {{{git clone --bare --mirror}}} into a local mirror and the use of submodules with relative paths. This means that I will need to also mirror all the relevant package repos. AFAIU this basically means that the {{{-r}}} argument to {{{sync-all}}} won't work as I think it was intended. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8768#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8768: Internal compiler error on haskell-src-exts 1.14.01 (profiling) ---------------------------------------+---------------------------------- Reporter: MagnusTherning | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: 7.8.3 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Comment (by MagnusTherning): I've just confirmed that {{{haskell-src-exts}}} versions 1.14.0.1 and 1.15.0.1 can be built with profiling information using the tip of the ghc-7.8 branch ({{{8404e800a35380281a218c78a6799ed6836b6fad}}}). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8768#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8768: Internal compiler error on haskell-src-exts 1.14.01 (profiling) ---------------------------------------+---------------------------------- Reporter: MagnusTherning | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: 7.8.3 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Comment (by CoreyOConnor): Same as Magnus: Reproduced on NixOS 64 bit using GHC 7.8.2. Could not reproduce using ghc-7.8 branch (8404e800a35380281a218c78a6799ed6836b6fad) Same build process was used in each case. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8768#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8768: Internal compiler error on haskell-src-exts 1.14.01 (profiling) ---------------------------------------+---------------------------------- Reporter: MagnusTherning | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: 7.8.3 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Changes (by ihameed): * cc: idhameed@… (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8768#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8768: Internal compiler error on haskell-src-exts 1.14.01 (profiling) ---------------------------------------+---------------------------------- Reporter: MagnusTherning | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: 7.8.3 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Comment (by rwbarton): So, this is fixed, right? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8768#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8768: Internal compiler error on haskell-src-exts 1.14.01 (profiling) ---------------------------------------+---------------------------------- Reporter: MagnusTherning | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.8.3 Component: Compiler | Version: 7.8.1-rc2 Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Changes (by thoughtpolice): * status: infoneeded => closed * resolution: => fixed Comment: I do believe this is fixed in 396648eebaa1144d4d1f5326db716e8130f73732 - closing. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8768#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC