<div dir="ltr"><div>Hello,</div><div>I built GHC HEAD on windows 10, but some time the build process got stopped due to random crash. But when I restart the build process the error disappears. Is this a known issue?</div><div><br></div><div>Regards,</div><div>Csaba</div><div><br></div><div><b>Case A:</b></div><div><br><blockquote><i>compiler\GHC\Driver\Session.hs:285:1: error:<br>    Bad interface file: _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\transformers-0.5.6.2\Control\Monad\Trans\Reader.hi<br>        _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\transformers-0.5.6.2\Control\Monad\Trans\Reader.hi: hGetBuf: invalid argument (Invalid argument)<br>    |<br>285 | import Control.Monad.Trans.Reader<br>    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br><br>compiler\GHC\Driver\Session.hs:286:1: error:<br>    Bad interface file: _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\transformers-0.5.6.2\Control\Monad\Trans\Except.hi<br>        _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\transformers-0.5.6.2\Control\Monad\Trans\Except.hi: hGetBuf: invalid argument (Invalid argument)<br>    |<br>286 | import Control.Monad.Trans.Except<br>    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br><br>compiler\GHC\Driver\Session.hs:288:1: error:<br>    Bad interface file: _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\base-4.14.0.0\Data\Ord.hi<br>        _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\base-4.14.0.0\Data\Ord.hi: hGetBuf: invalid argument (Invalid argument)<br>    |<br>288 | import Data.Ord<br>    | ^^^^^^^^^^^^^^^<br>Error when running Shake build system:<br>  at action, called at src\Rules.hs:71:19 in main:Rules<br>  at need, called at src\Rules.hs:93:5 in main:Rules<br>* Depends on: _build/stage1/lib/package.conf.d/ghc-8.11.0.20200528.conf<br>  at need, called at src\Rules\Register.hs:117:5 in main:Rules.Register<br>* Depends on: _build/stage1/compiler/build/libHSghc-8.11.0.20200528.a<br>  at need, called at src\Rules\Library.hs:209:5 in main:Rules.Library<br>* Depends on: _build/stage1/compiler/build/GHC/Driver/Session.o<br>  at &%>, called at src\Rules\Compile.hs:77:9 in main:Rules.Compile<br>* Depends on: _build/stage1/compiler/build/GHC/Driver/Session.o _build/stage1/compiler/build/GHC/Driver/Session.hi<br>  at cmd', called at src\Builder.hs:291:23 in main:Builder<br>  at cmd, called at src\Builder.hs:376:8 in main:Builder<br>* Raised the exception:<br>Development.Shake.cmd, system command failed<br>Command line: _build/stage0/bin/ghc.exe -Wall -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db "-package-db _build/stage1/lib/package.conf.d" "-this-unit-id ghc-8.11.0.20200528"<br> "-package-id Win32-2.6.1.0" "-package-id array-0.5.4.0" "-package-id base-4.14.0.0" "-package-id binary-0.8.7.0" "-package-id bytestring-0.10.9.0" "-package-id containers-0.6.2.1" "-package-id deepseq-1<br>.4.4.0" "-package-id directory-1.3.6.0" "-package-id filepath-1.4.2.1" "-package-id ghc-boot-8.11.0.20200528" "-package-id ghc-boot-th-8.11.0.20200528" "-package-id ghc-heap-8.11.0.20200528" "-package-id<br> ghci-8.11.0.20200528" "-package-id hpc-0.6.1.0" "-package-id integer-gmp-1.0.3.0" "-package-id process-1.6.8.2" "-package-id template-haskell-2.17.0.0" "-package-id time-1.9.3" "-package-id transformers<br>-0.5.6.2" -i -iC:\Users\IEUser\haskell\ghc-whole-program-compiler-project\ghc-wpc\_build\stage1\compiler\build -iC:\Users\IEUser\haskell\ghc-whole-program-compiler-project\ghc-wpc\_build\stage1\compiler\<br>build\autogen -iC:\Users\IEUser\haskell\ghc-whole-program-compiler-project\ghc-wpc\compiler -Iincludes -I_build/stage1/lib -I_build/stage1/compiler/build -I_build/stage1/compiler/build/. -I_build/stage1/<br>compiler/build/../rts/dist/build -Icompiler/. -Icompiler/../rts/dist/build -IC:/Users/IEUser/haskell/ghc-whole-program-compiler-project/ghc-wpc/_build/stage1/lib/x86_64-windows-ghc-8.11.0.20200528/proces<br>s-1.6.8.2/include -IC:/Users/IEUser/haskell/ghc-whole-program-compiler-project/ghc-wpc/_build/stage1/lib/x86_64-windows-ghc-8.11.0.20200528/time-1.9.3/include -IC:/Users/IEUser/haskell/ghc-whole-program-<br>compiler-project/ghc-wpc/_build/stage1/lib/x86_64-windows-ghc-8.11.0.20200528/Win32-2.6.1.0/include -IC:/Users/IEUser/haskell/ghc-whole-program-compiler-project/ghc-wpc/_build/stage1/lib/x86_64-windows-g<br>hc-8.11.0.20200528/bytestring-0.10.9.0/include -IC:/Users/IEUser/haskell/ghc-whole-program-compiler-project/ghc-wpc/_build/stage1/lib/x86_64-windows-ghc-8.11.0.20200528/base-4.14.0.0/include -IC:/Users/I<br>EUser/haskell/ghc-whole-program-compiler-project/ghc-wpc/_build/stage1/lib/x86_64-windows-ghc-8.11.0.20200528/integer-gmp-1.0.3.0/include -IC:/Users/IEUser/haskell/ghc-whole-program-compiler-project/ghc-<br>wpc/_build/stage1/lib/x86_64-windows-ghc-8.11.0.20200528/rts-1.0/include -I_build/stage1/lib -optc-I_build/stage1/lib -optP-include -optP_build/stage1/compiler/build/autogen/cabal_macros.h -optP-DHAVE_IN<br>TERNAL_INTERPRETER -optP-DINTEGER_GMP -outputdir _build/stage1/compiler/build -Wnoncanonical-monad-instances -optc-Wno-error=inline -c compiler/GHC/Driver/Session.hs -o _build/stage1/compiler/build/GHC/D<br>river/Session.o -O0 -H64m -Wall -Wno-name-shadowing -Wnoncanonical-monad-instances -Wnoncanonical-monoid-instances -this-unit-id ghc -XHaskell2010 -XNoImplicitPrelude -ghcversion-file=C:/Users/IEUser/has<br>kell/ghc-whole-program-compiler-project/ghc-wpc/_build/stage1/lib/ghcversion.h -optc-DTHREADED_RTS -Wno-deprecated-flags -Wcpp-undef<br>Exit code: 1<br>Stderr and Stdout:<br>compiler\GHC\Driver\Session.hs:285:1: error:<br>    Bad interface file: _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\transformers-0.5.6.2\Control\Monad\Trans\Reader.hi<br>        _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\transformers-0.5.6.2\Control\Monad\Trans\Reader.hi: hGetBuf: invalid argument (Invalid argument)<br>    |<br>285 | import Control.Monad.Trans.Reader<br>    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br><br>compiler\GHC\Driver\Session.hs:286:1: error:<br>    Bad interface file: _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\transformers-0.5.6.2\Control\Monad\Trans\Except.hi<br>        _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\transformers-0.5.6.2\Control\Monad\Trans\Except.hi: hGetBuf: invalid argument (Invalid argument)<br>    |<br>286 | import Control.Monad.Trans.Except<br>    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br><br>compiler\GHC\Driver\Session.hs:288:1: error:<br>    Bad interface file: _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\base-4.14.0.0\Data\Ord.hi<br>        _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\base-4.14.0.0\Data\Ord.hi: hGetBuf: invalid argument (Invalid argument)<br>    |<br>288 | import Data.Ord<br>    | ^^^^^^^^^^^^^^^</i><br></blockquote></div><div><b>Case B:</b></div><div><br><blockquote><i>Access violation in generated code when writing 0x0<br><br> Attempting to reconstruct a stack trace...<br><br>   Frame        Code address<br> * 0x3eadb00    0x3063b36 C:\Users\IEUser\haskell\ghc-whole-program-compiler-project\ghc-wpc\_build\stage0\bin\ghc.exe+0x2c63b36<br> * 0x3eadb08    0x2e12c89 C:\Users\IEUser\haskell\ghc-whole-program-compiler-project\ghc-wpc\_build\stage0\bin\ghc.exe+0x2a12c89<br> * 0x3eadb10    0x4<br> * 0x3eadb18    0x7c411e1<br> * 0x3eadb20    0x3665e20 C:\Users\IEUser\haskell\ghc-whole-program-compiler-project\ghc-wpc\_build\stage0\bin\ghc.exe+0x3265e20<br> * 0x3eadb28    0x5c2abd0<br> * 0x3eadb30    0x9ec8010<br> * 0x3eadb38    0x3fc3c70<br> * 0x3eadb40    0x5c00320033006d<br> * 0x3eadb48    0x33004d004d0049<br> * 0x3eadb50    0x4c0044002e0032<br> * 0x3eadb58    0x4c<br><br>Error when running Shake build system:<br>  at action, called at src\Rules.hs:71:19 in main:Rules<br>  at need, called at src\Rules.hs:93:5 in main:Rules<br>* Depends on: _build/stage1/lib/package.conf.d/directory-1.3.6.0.conf<br>  at apply1, called at src\Development\Shake\Internal\Rules\Oracle.hs:159:32 in shake-0.18.5-JIltN70Z6uA8zMbpBJImj0:Development.Shake.Internal.Rules.Oracle<br>* Depends on: OracleQ (ContextDataKey (Context {stage = Stage1, package = Package {pkgType = Library, pkgName = "directory", pkgPath = "libraries/directory"}, way = v}))<br>  at need, called at src\Hadrian\Oracles\Cabal\Rules.hs:53:9 in main:Hadrian.Oracles.Cabal.Rules<br>* Depends on: _build/stage1/libraries/directory/setup-config<br>  at need, called at src\Rules\Library.hs:214:18 in main:Rules.Library<br>* Depends on: _build/stage1/libraries/time/build/HStime-1.9.3.o<br>  at need, called at src\Rules\Library.hs:165:5 in main:Rules.Library<br>* Depends on: _build/stage1/libraries/time/build/Data/Time/Format/Format/Class.o<br>  at &%>, called at src\Rules\Compile.hs:77:9 in main:Rules.Compile<br>* Depends on: _build/stage1/libraries/time/build/Data/Time/Format/Format/Class.o _build/stage1/libraries/time/build/Data/Time/Format/Format/Class.hi<br>  at cmd', called at src\Builder.hs:291:23 in main:Builder<br>  at cmd, called at src\Builder.hs:376:8 in main:Builder<br>* Raised the exception:<br>Development.Shake.cmd, system command failed<br>Command line: _build/stage0/bin/ghc.exe -Wall -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db "-package-db _build/stage1/lib/package.conf.d" "-this-unit-id time-1.9.3" "-packag<br>e-id Win32-2.6.1.0" "-package-id base-4.14.0.0" "-package-id deepseq-1.4.4.0" -i -iC:\Users\IEUser\haskell\ghc-whole-program-compiler-project\ghc-wpc\_build\stage1\libraries\time\build -iC:\Users\IEUser\<br>haskell\ghc-whole-program-compiler-project\ghc-wpc\_build\stage1\libraries\time\build\autogen -iC:\Users\IEUser\haskell\ghc-whole-program-compiler-project\ghc-wpc\libraries\time\lib -Iincludes -I_build/s<br>tage1/lib -I_build/stage1/libraries/time/build -I_build/stage1/libraries/time/build/lib/include -Ilibraries/time/lib/include -IC:/Users/IEUser/haskell/ghc-whole-program-compiler-project/ghc-wpc/_build/st<br>age1/lib/x86_64-windows-ghc-8.11.0.20200528/Win32-2.6.1.0/include -IC:/Users/IEUser/haskell/ghc-whole-program-compiler-project/ghc-wpc/_build/stage1/lib/x86_64-windows-ghc-8.11.0.20200528/bytestring-0.10<br>.9.0/include -IC:/Users/IEUser/haskell/ghc-whole-program-compiler-project/ghc-wpc/_build/stage1/lib/x86_64-windows-ghc-8.11.0.20200528/base-4.14.0.0/include -IC:/Users/IEUser/haskell/ghc-whole-program-co<br>mpiler-project/ghc-wpc/_build/stage1/lib/x86_64-windows-ghc-8.11.0.20200528/integer-gmp-1.0.3.0/include -IC:/Users/IEUser/haskell/ghc-whole-program-compiler-project/ghc-wpc/_build/stage1/lib/x86_64-windo<br>ws-ghc-8.11.0.20200528/rts-1.0/include -I_build/stage1/lib -optc-I_build/stage1/lib -optP-include -optP_build/stage1/libraries/time/build/autogen/cabal_macros.h -outputdir _build/stage1/libraries/time/bu<br>ild -Wnoncanonical-monad-instances -optc-Wno-error=inline -c libraries/time/lib/Data/Time/Format/Format/Class.hs -o _build/stage1/libraries/time/build/Data/Time/Format/Format/Class.o -O0 -H64m -Wall -fwa<br>rn-tabs -XHaskell2010 -XRank2Types -XDeriveDataTypeable -XStandaloneDeriving -XCPP -ghcversion-file=C:/Users/IEUser/haskell/ghc-whole-program-compiler-project/ghc-wpc/_build/stage1/lib/ghcversion.h -Wno-<br>deprecated-flags<br>Exit code: 11<br>Stderr and Stdout:<br>Access violation in generated code when writing 0x0<br><br> Attempting to reconstruct a stack trace...<br><br>   Frame        Code address<br> * 0x3eadb00    0x3063b36 C:\Users\IEUser\haskell\ghc-whole-program-compiler-project\ghc-wpc\_build\stage0\bin\ghc.exe+0x2c63b36<br> * 0x3eadb08    0x2e12c89 C:\Users\IEUser\haskell\ghc-whole-program-compiler-project\ghc-wpc\_build\stage0\bin\ghc.exe+0x2a12c89<br> * 0x3eadb10    0x4<br> * 0x3eadb18    0x7c411e1<br> * 0x3eadb20    0x3665e20 C:\Users\IEUser\haskell\ghc-whole-program-compiler-project\ghc-wpc\_build\stage0\bin\ghc.exe+0x3265e20<br> * 0x3eadb28    0x5c2abd0<br> * 0x3eadb30    0x9ec8010<br> * 0x3eadb38    0x3fc3c70<br> * 0x3eadb40    0x5c00320033006d<br> * 0x3eadb48    0x33004d004d0049<br> * 0x3eadb50    0x4c0044002e0032<br> * 0x3eadb58    0x4c</i><br></blockquote><b><br></b></div></div>