Skip to content

Compile stalls with pause returning ERESTARTNOHAND

I'm using ghc 7.4.1 from the debian package to compile GHC from git HEAD on linux powerpc.

The build all seems to go fine until it reaches this:

  HC [stage 1] libraries/containers/dist-install/build/Data/Sequence.o

At which stage the compile stalls. By stalls, I mean the compiler seems to make no further progress and consumes less than 1% CPU and less than 1% memory.

Killing the compile with Ctrl-C and running 'make' again and it stalls again in the same place. Doing a 'make clean' and starting again and it stall in the same place once more.

The command that is being run at the stall is:

/home/erikd/Git/ghc-upstream-git/inplace/lib/ghc-stage1 \
    -B/home/erikd/Git/ghc-upstream-git/inplace/lib -H64m -O0 -fasm -package-name \
    containers-0.5.0.0 -hide-all-packages -i -ilibraries/containers/. \
    -ilibraries/containers/dist-install/build -ilibraries/containers/dist-install/build/autogen \
    -Ilibraries/containers/dist-install/build -Ilibraries/containers/dist-install/build/autogen \
    -Ilibraries/containers/include -optP-include \
    -optPlibraries/containers/dist-install/build/autogen/cabal_macros.h -package array-0.3.0.3 \
    -package base-4.5.0.0 -package deepseq-1.2.0.1 -package ghc-prim-0.2.0.0 -O2 -Wall -XHaskell98 \
    -O0 -dcore-lint -no-user-package-db -rtsopts -odir libraries/containers/dist-install/build \
    -hidir libraries/containers/dist-install/build -stubdir libraries/containers/dist-install/build \
    -hisuf hi -osuf o -hcsuf hc -c libraries/containers/./Data/Sequence.hs -o \
     libraries/containers/dist-install/build/Data/Sequence.o

If I run that under strace I find that at the stall its doing the following:

rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
pause()                                 = ? ERESTARTNOHAND (To be restarted)
--- SIGVTALRM (Virtual timer expired) @ 0 (0) ---
sigreturn()                             = ? (mask now [])
pause()                                 = ? ERESTARTNOHAND (To be restarted)
--- SIGVTALRM (Virtual timer expired) @ 0 (0) ---
sigreturn()                             = ? (mask now [])
pause()                                 = ? ERESTARTNOHAND (To be restarted)
--- SIGVTALRM (Virtual timer expired) @ 0 (0) ---
sigreturn()                             = ? (mask now [])
pause()                                 = ? ERESTARTNOHAND (To be restarted)
--- SIGVTALRM (Virtual timer expired) @ 0 (0) ---

A bit of googling tells me that ERESTARTNOHAND is supposedly a kernel level errno that is not supposed to escape into userland. See

https://lkml.org/lkml/2011/12/23/117

Will continue the investigation.

Trac metadata
Trac field Value
Version 7.4.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture Unknown/Multiple
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information