Opened 2 months ago

Closed 2 months ago

#8777 closed bug (fixed)

Ghc crashes when compiling happstack-server on ubuntu-docker

Reported by: timthelion Owned by:
Priority: low Milestone:
Component: Compiler Version: 7.4.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I am trying to install a package that requires happstack on docker. I recieved the following error:

src/Happstack/Server/Internal/Socket.hs:61:7:ghc: panic! (the 'impossible' happened)
  (GHC version 7.4.1 for x86_64-unknown-linux):
        Can't happen: pprExp (CompExp [])

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

It appears I am not the first to receive this error as I found the following paste on lpaste: http://lpaste.net/report/99343

This bug is hard to reproduce. I tried making a minimal case for it in which only haskell-platform was installed. In the minimal case, ghc DOES NOT crash.

This works:

FROM ubuntu
RUN apt-get update
RUN apt-get install -y haskell-platform
RUN cabal update
RUN cabal install --global happstack-server-7.3.3 

However, if you run the following docker file, ghc will crash:

FROM ubuntu
RUN apt-get update
RUN apt-get install -y haskell-platform git libghc-terminfo-dev libghc-haskeline-dev
RUN cabal update
RUN git clone --branch dev https://github.com/evancz/Elm.git
RUN git clone --branch dev https://github.com/evancz/elm-repl.git
RUN git clone  https://github.com/evancz/elm-get.git
RUN cd Elm; git checkout a815b2fbd00e76c0109b1ab916fe5d0eb184648c
RUN cd elm-repl; git checkout 6ab74981363e8e7fabc05083539891568e3c4f17
RUN cd elm-get ; git checkout c67a8ba285f6bfde0a520da1552c4c3443cfab8e
RUN cabal install --global Elm elm-repl elm-get Elm/server

Crashes with attached output.

Change History (1)

comment:1 Changed 2 months ago by monoidal

  • Resolution set to fixed
  • Status changed from new to closed

Closing as 'fixed' since the issue is fixed in upcoming template-haskell-2.9:

https://github.com/ghc/packages-template-haskell/commit/d7b864b7ddb0e8c2f58d08dfd50e843eb8966b90

However, that fix will be present only in GHC 7.8, AFAIK 7.6 (or 7.4) is not going to have another bugfix release. Probably you can pester happstack's maintainers, a workaround should be easy.

PS. Regarding reproduction: pprExp 0 (CompE []) in GHCi with TH should work.

Note: See TracTickets for help on using tickets.