Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cabal-install appears to hide stderr output on failure #7727

Closed
bgamari opened this issue Oct 8, 2021 · 2 comments
Closed

cabal-install appears to hide stderr output on failure #7727

bgamari opened this issue Oct 8, 2021 · 2 comments

Comments

@bgamari
Copy link
Contributor

bgamari commented Oct 8, 2021

Describe the bug
When investigating the failure of the cabal-install-3.6 release CI pipeline on ARMv7, I noticed that cabal-install eats useful output from GHC upon failure. Specifically, the CI log ends with:

Completed    edit-distance-0.2.2.1 (lib)
Installing   HTTP-4000.3.16 (lib)
Completed    HTTP-4000.3.16 (lib)
cabal: Failed to build Cabal-3.6.2.0 (which is required by exe:cabal from
cabal-install-3.6.2.0). The build process terminated with exit code 251

What went wrong? It's not at all clear from this error and if I didn't happen to stumble upon the fact that code 251 is GHC's exit code on heap overflow I wouldn't have known myself.

Looking at $CABAL_DIR/logs/ghc-8.10.7/Cabal-3.6.2.0-aa3b9fb077a93a7005de5308fb10da5d3f4036f77770639c1dad2871dc1f6799.log removes any doubt:

[177 of 247] Compiling Distribution.Simple.Program.Db ( src/Distribution/Simple/Program/Db.hs, dist/build/Distribution/Simple/Program/Db.o, dist/build/Distribution/Simple/Program/Db.dyn_o )
[178 of 247] Compiling Distribution.Simple.Program ( src/Distribution/Simple/Program.hs, dist/build/Distribution/Simple/Program.o, dist/build/Distribution/Simple/Program.dyn_o )
[179 of 247] Compiling Distribution.Simple.Program.Strip ( src/Distribution/Simple/Program/Strip.hs, dist/build/Distribution/Simple/Program/Strip.o, dist/build/Distribution/Simple/Program/Strip.dyn_o )
[180 of 247] Compiling Distribution.Simple.Command ( src/Distribution/Simple/Command.hs, dist/build/Distribution/Simple/Command.o, dist/build/Distribution/Simple/Command.dyn_o )
[181 of 247] Compiling Distribution.Simple.Setup ( src/Distribution/Simple/Setup.hs, dist/build/Distribution/Simple/Setup.o, dist/build/Distribution/Simple/Setup.dyn_o )
ghc: out of memory (requested 2097152 bytes)

This output should have been reported to the user.

To Reproduce
Steps to reproduce the behavior:

Run a build that fails. Observe that the error is less than helpful

Expected behavior
The error output from GHC is passed on to the user.

System information

  • Operating system: Linux/ARMv7
  • cabal-install-3.4.0.0, ghc-8.10.7

Additional context
Add any other context about the problem here.

@Mikolaj
Copy link
Member

Mikolaj commented Oct 9, 2021

Related to #5974 and tickets mentioned there. So, probably an old problem.

@ulysses4ever
Copy link
Collaborator

Should be closed by #8296. Please, let us know if it doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants