Build races when using make -j8 ?

Neil Mitchell ndmitchell at gmail.com
Sun Mar 29 13:22:20 EDT 2009


Hi

Some possibly related information: I've been running parallel builds
of a different code base using GHC as a compiler. I occasionally see
zombie GHC processes created (starting but not doing anything) and I
also get your mismatched .hi interface files message as well. I'm
hoping to figure out what is going wrong on Monday.

I'm not using a make build system, so its possible that GHC itself is
at fault, not the GHC build system. Of course, with parallel build
stuff its hard to replicate and hard to debug, so the problems may be
unrelated.

Thanks

Neil

On Sun, Mar 29, 2009 at 7:21 AM, Ben Lippmeier <Ben.Lippmeier at anu.edu.au> wrote:
> Hi All,
> When I build with "make -j8" on my dept T2 (mavericks) I'm getting what
> looks like build races. Has anyone seen this problem before?
>
> Not being a make or unix file system expert, my only guess is that the
> interface file is being written to the FS in chunks, and that make is trying
> to compile modules that depend on it before the file is all there. However,
> that seems so obvious that someone would have noticed and fixed it by now.
>
> The machine reports:
> benl at mavericks:~> uname -a
> SunOS mavericks 5.10 Generic_127127-11 sun4v sparc
> SUNW,SPARC-Enterprise-T5120
>
> I get the problem after:
> $ make distclean
> $ sh boot
> $ ./configure
>
> $ make -j8
> ... runs for a while then gives:
> /data0/home/benl/software/ghc-6.8.3/bin/ghc -#include cutils.h -DSTAGE=1 ...
> -XRelaxedPolyRec -idist-stage1/build  -H64m -O0 -fvia-c -Rghc-timing -O0  -c
> simplCore/CSE.lhs -o dist-stage1/build/CSE.o  -ohi dist-stage1/build/CSE.hi
>
> coreSyn/CoreLint.lhs:40:0:
>   Bad interface file: dist-stage1/build/ListSetOps.hi
>       magic number mismatch: old/corrupt interface file?
>
>
> -- so I start make again ------------------------------
> $ make -j8
> ... runs for a while then gives:
>
> /data0/home/benl/software/ghc-6.8.3/bin/ghc -#include cutils.h -DSTAGE=1 ...
> -XRelaxedPolyRec -idist-stage1/build  -H64m -O0 -fvia-c -Rghc-timing -O0  -c
> coreSyn/CoreTidy.lhs -o dist-stage1/build/CoreTidy.o  -ohi
> dist-stage1/build/CoreTidy.hi
>
> coreSyn/CoreTidy.lhs:27:0:
>   Bad interface file: dist-stage1/build/Maybes.hi
>       magic number mismatch: old/corrupt interface file?
>
>
> -- one more time! --------------------------------------
> $ make -j8
> ... runs for a while then gives:
>
> /data0/home/benl/software/ghc-6.8.3/bin/ghc -#include cutils.h -DSTAGE=1 ...
> -XRelaxedPolyRec -idist-stage1/build  -H64m -O0 -fvia-c -Rghc-timing -O0  -c
> codeGen/CgMonad.lhs -o dist-stage1/build/CgMonad.o  -ohi
> dist-stage1/build/CgMonad.hi
> <<ghc: 53024912 bytes, 13 GCs, 2272460/6893568 avg/max bytes residency (5
> samples), 66M in use, 0.01 INIT (0.00 elapsed), 0.69 MUT (4.44 elapsed),
> 0.41 GC (2.61 elapsed) :ghc>>
>
> codeGen/CgMonad.lhs:62:0:
>   Bad interface file: dist-stage1/build/CgBindery.hi-boot
>       magic number mismatch: old/corrupt interface file?
>
>
> -- sigh, so I give up and just use a single thread ------
> $ make
> ... build completes with no further problems.
>
>
>
>
>
> _______________________________________________
> Cvs-ghc mailing list
> Cvs-ghc at haskell.org
> http://www.haskell.org/mailman/listinfo/cvs-ghc
>



More information about the Cvs-ghc mailing list