Opened 3 years ago

Closed 3 years ago

#5484 closed bug (fixed)

HEAD build fails with ghc-7.2.1

Reported by: daniel.is.fischer Owned by: simonmar
Priority: highest Milestone: 7.4.1
Component: Build System Version: 7.3
Keywords: Cc: johan.tibell@…
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Building GHC failed Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Buidling HEAD with ghc-7.2.1 as bootstrapping compiler fails with a segfault when stage1 compiles GHC.Debug:

"inplace/bin/ghc-stage1"   -H32m -O -Wall -Werror -H64m -O0
  -package-name ghc-prim-0.2.0.0 -hide-all-packages
  -i -ilibraries/ghc-prim/. -ilibraries/ghc-prim/dist-install/build 
  -ilibraries/ghc-prim/dist-install/build/autogen
  -Ilibraries/ghc-prim/dist-install/build
  -Ilibraries/ghc-prim/dist-install/build/autogen
  -Ilibraries/ghc-prim/.
  -optP-include
  -optPlibraries/ghc-prim/dist-install/build/autogen/cabal_macros.h
  -package rts-1.0  -package-name ghc-prim -XHaskell98 -XCPP
  -XMagicHash -XForeignFunctionInterface -XUnliftedFFITypes
  -XUnboxedTuples -XEmptyDataDecls -XNoImplicitPrelude -O2 -O
  -dcore-lint -fno-warn-deprecated-flags -no-user-package-conf
  -rtsopts     -odir libraries/ghc-prim/dist-install/build
  -hidir libraries/ghc-prim/dist-install/build
  -stubdir libraries/ghc-prim/dist-install/build
  -hisuf hi -osuf  o -hcsuf hc -c libraries/ghc-prim/./GHC/Debug.hs
  -o libraries/ghc-prim/dist-install/build/GHC/Debug.o
gmake[1]: *** [libraries/ghc-prim/dist-install/build/GHC/Debug.o] Speicherzugriffsfehler
gmake[1]: *** Warte auf noch nicht beendete Prozesse...
gmake: *** [all] Fehler 2

The build goes through when bootstrapping with 7.0.4 or 6.12.3.

Change History (8)

comment:1 in reply to: ↑ description Changed 3 years ago by btutt

This happens for Windows x86 as well when building HEAD with ghc-7.2.1.

comment:2 Changed 3 years ago by judahj

I also got this segfault, with ghc-7.2.1 on OS X 10.7 x86_64:

"inplace/bin/ghc-stage1"   -H64m -O0 -fasm    -package-name ghc-prim-0.2.0.0 -hide-all-packages -i -ilibraries/ghc-prim/. -ilibraries/ghc-prim/dist-install/build -ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/dist-install/build -Ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/.    -optP-include -optPlibraries/ghc-prim/dist-install/build/autogen/cabal_macros.h -package rts-1.0  -package-name ghc-prim -XHaskell98 -XCPP -XMagicHash -XForeignFunctionInterface -XUnliftedFFITypes -XUnboxedTuples -XEmptyDataDecls -XNoImplicitPrelude -O -fasm -no-user-package-conf -rtsopts     -odir libraries/ghc-prim/dist-install/build -hidir libraries/ghc-prim/dist-install/build -stubdir libraries/ghc-prim/dist-install/build -hisuf hi -osuf  o -hcsuf hc -c libraries/ghc-prim/./GHC/Debug.hs -o libraries/ghc-prim/dist-install/build/GHC/Debug.o
make[1]: *** [libraries/ghc-prim/dist-install/build/GHC/Debug.o] Segmentation fault: 11
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2

I'm using BuildFlavour = quick.

comment:3 Changed 3 years ago by simonmar

  • Milestone set to 7.4.1
  • Priority changed from normal to highest

comment:4 Changed 3 years ago by kgardas

The same failure also happens on OpenSolaris buildbot: http://www.haskell.org/pipermail/cvs-ghc/2011-September/066020.html

comment:5 Changed 3 years ago by tibbe

  • Cc johan.tibell@… added

Broken on Mac OS X 10.7 as well.

comment:6 Changed 3 years ago by simonmar

  • Owner set to simonmar

comment:7 Changed 3 years ago by simonmar

This is an instance of #5453, basically a bug in the optimiser in 7.2.1 that can cause segfaults. (fixed in bd6f5de7bb41f868522c6db2ad2793477840297e)

I'm working on a workaround.

comment:8 Changed 3 years ago by simonmar

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

Here's the workaround:

commit f4e534f030c7f8cafd4877f273118b2e8f38b4b0

Author: Simon Marlow <marlowsd@gmail.com>
Date:   Mon Oct 3 16:44:47 2011 +0100

    workaround for #5485: use -fno-full-laziness with 7.2.1

I got the ticket number wrong in the commit message, that should be #5453.

Note: See TracTickets for help on using tickets.