[GHC] #10765: GHC panic: Loading temp shared object failed with `--enable-coverage` option

#10765: GHC panic: Loading temp shared object failed with `--enable-coverage` option -------------------------------------+------------------------------------- Reporter: mrkkrp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Code | Version: 7.10.1 Coverage | Keywords: hpc | Operating System: Linux Architecture: x86_64 | Type of failure: Runtime crash (amd64) | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- Please see this StackOverflow question and answer for comprehensive description. http://stackoverflow.com/questions/31937302/ghc-panic-loading-temp-shared- object-failed In short, when test coverage (via HPC) is enabled (via `cabal configure --enable-coverage`) and `cabal repl` is started for non-test build target you get a GHC panic when you try to interact with your functions via REPL. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10765 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10765: GHC panic: Loading temp shared object failed with `--enable-coverage` option -------------------------------------+------------------------------------- Reporter: mrkkrp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Code Coverage | Version: 7.10.1 Resolution: | Keywords: hpc Operating System: Linux | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by bgamari): To quote the ticket, {{{ λ> parseTest (string "rere" <* eof) "reri" ghc: panic! (the 'impossible' happened) (GHC version 7.10.1 for x86_64-unknown-linux): Loading temp shared object failed: /tmp/ghc9380_0/libghc9380_93.so: undefined symbol: _hpc_tickboxes_megapzuEw3SHAmfXgNLpm5a31oXO6_TextziMegaparsecziError_hpc Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10765#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10765: GHC panic: Loading temp shared object failed with `--enable-coverage` option -------------------------------------+------------------------------------- Reporter: mrkkrp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Code Coverage | Version: 7.10.1 Resolution: | Keywords: hpc Operating System: Linux | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by Yuras): I saw the same issue too, but it is `cabal` fault because it passes `-fhpc` to `ghci`. Note: `cabal exec ghci` works, but `cabal exec ghci -- -fhpc` fails. Lack of HPC support in interpreter is [https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/hpc.html#idp... documented]. The relevant issue about bad error message from ghc is #9903. I propose to open an issue on `cabal`s tracker and close this one as a duplicate of #9903. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10765#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10765: GHC panic: Loading temp shared object failed with `--enable-coverage` option -------------------------------------+------------------------------------- Reporter: mrkkrp | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Code Coverage | Version: 7.10.1 Resolution: | Keywords: hpc Operating System: Linux | Architecture: x86_64 | (amd64) Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by mrkkrp): Replying to [comment:2 Yuras]:
I saw the same issue too, but it is `cabal` fault because it passes `-fhpc` to `ghci`. Note: `cabal exec ghci` works, but `cabal exec ghci -- -fhpc` fails.
Lack of HPC support in interpreter is [https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/hpc.html#idp... documented]. The relevant issue about bad error message from ghc is #9903.
I propose to open an issue on `cabal`s tracker and close this one as a duplicate of #9903.
I opened an issue on Cabal's GitHub page before reporting it here: https://github.com/haskell/cabal/issues/2757 where I was told that "GHC Panic" is usually signifies a GHC bug. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10765#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10765: GHC panic: Loading temp shared object failed with `--enable-coverage` option -------------------------------------+------------------------------------- Reporter: mrkkrp | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Code Coverage | Version: 7.10.1 Resolution: duplicate | Keywords: hpc Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: #9903 | Differential Revisions: -------------------------------------+------------------------------------- Changes (by Yuras): * status: new => closed * resolution: => duplicate * os: Linux => Unknown/Multiple * architecture: x86_64 (amd64) => Unknown/Multiple * related: => #9903 Comment: Replying to [comment:3 mrkkrp]:
I opened an issue on Cabal's GitHub page before reporting it here:
https://github.com/haskell/cabal/issues/2757
where I was told that "GHC Panic" is usually signifies a GHC bug.
They are right, ghc should fail with polite error message instead of a panic, but that is exactly why #9903 exists. Cabal's fault is to pass `-fhpc` to `ghci`. I sent a fix to Cabal, so closing. Thank you for reporting the issue. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10765#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC