Hello,
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?

Regards,
Csaba

Case A:

compiler\GHC\Driver\Session.hs:285:1: error:
    Bad interface file: _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\transformers-0.5.6.2\Control\Monad\Trans\Reader.hi
        _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)
    |
285 | import Control.Monad.Trans.Reader
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

compiler\GHC\Driver\Session.hs:286:1: error:
    Bad interface file: _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\transformers-0.5.6.2\Control\Monad\Trans\Except.hi
        _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)
    |
286 | import Control.Monad.Trans.Except
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

compiler\GHC\Driver\Session.hs:288:1: error:
    Bad interface file: _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\base-4.14.0.0\Data\Ord.hi
        _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\base-4.14.0.0\Data\Ord.hi: hGetBuf: invalid argument (Invalid argument)
    |
288 | import Data.Ord
    | ^^^^^^^^^^^^^^^
Error when running Shake build system:
  at action, called at src\Rules.hs:71:19 in main:Rules
  at need, called at src\Rules.hs:93:5 in main:Rules
* Depends on: _build/stage1/lib/package.conf.d/ghc-8.11.0.20200528.conf
  at need, called at src\Rules\Register.hs:117:5 in main:Rules.Register
* Depends on: _build/stage1/compiler/build/libHSghc-8.11.0.20200528.a
  at need, called at src\Rules\Library.hs:209:5 in main:Rules.Library
* Depends on: _build/stage1/compiler/build/GHC/Driver/Session.o
  at &%>, called at src\Rules\Compile.hs:77:9 in main:Rules.Compile
* Depends on: _build/stage1/compiler/build/GHC/Driver/Session.o _build/stage1/compiler/build/GHC/Driver/Session.hi
  at cmd', called at src\Builder.hs:291:23 in main:Builder
  at cmd, called at src\Builder.hs:376:8 in main:Builder
* Raised the exception:
Development.Shake.cmd, system command failed
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"
 "-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
.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
 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
-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\
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/
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
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-
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
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
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-
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
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
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
kell/ghc-whole-program-compiler-project/ghc-wpc/_build/stage1/lib/ghcversion.h -optc-DTHREADED_RTS -Wno-deprecated-flags -Wcpp-undef
Exit code: 1
Stderr and Stdout:
compiler\GHC\Driver\Session.hs:285:1: error:
    Bad interface file: _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\transformers-0.5.6.2\Control\Monad\Trans\Reader.hi
        _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)
    |
285 | import Control.Monad.Trans.Reader
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

compiler\GHC\Driver\Session.hs:286:1: error:
    Bad interface file: _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\transformers-0.5.6.2\Control\Monad\Trans\Except.hi
        _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)
    |
286 | import Control.Monad.Trans.Except
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

compiler\GHC\Driver\Session.hs:288:1: error:
    Bad interface file: _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\base-4.14.0.0\Data\Ord.hi
        _build/stage1/lib\x86_64-windows-ghc-8.11.0.20200528\base-4.14.0.0\Data\Ord.hi: hGetBuf: invalid argument (Invalid argument)
    |
288 | import Data.Ord
    | ^^^^^^^^^^^^^^^

Case B:

Access violation in generated code when writing 0x0

 Attempting to reconstruct a stack trace...

   Frame        Code address
 * 0x3eadb00    0x3063b36 C:\Users\IEUser\haskell\ghc-whole-program-compiler-project\ghc-wpc\_build\stage0\bin\ghc.exe+0x2c63b36
 * 0x3eadb08    0x2e12c89 C:\Users\IEUser\haskell\ghc-whole-program-compiler-project\ghc-wpc\_build\stage0\bin\ghc.exe+0x2a12c89
 * 0x3eadb10    0x4
 * 0x3eadb18    0x7c411e1
 * 0x3eadb20    0x3665e20 C:\Users\IEUser\haskell\ghc-whole-program-compiler-project\ghc-wpc\_build\stage0\bin\ghc.exe+0x3265e20
 * 0x3eadb28    0x5c2abd0
 * 0x3eadb30    0x9ec8010
 * 0x3eadb38    0x3fc3c70
 * 0x3eadb40    0x5c00320033006d
 * 0x3eadb48    0x33004d004d0049
 * 0x3eadb50    0x4c0044002e0032
 * 0x3eadb58    0x4c

Error when running Shake build system:
  at action, called at src\Rules.hs:71:19 in main:Rules
  at need, called at src\Rules.hs:93:5 in main:Rules
* Depends on: _build/stage1/lib/package.conf.d/directory-1.3.6.0.conf
  at apply1, called at src\Development\Shake\Internal\Rules\Oracle.hs:159:32 in shake-0.18.5-JIltN70Z6uA8zMbpBJImj0:Development.Shake.Internal.Rules.Oracle
* Depends on: OracleQ (ContextDataKey (Context {stage = Stage1, package = Package {pkgType = Library, pkgName = "directory", pkgPath = "libraries/directory"}, way = v}))
  at need, called at src\Hadrian\Oracles\Cabal\Rules.hs:53:9 in main:Hadrian.Oracles.Cabal.Rules
* Depends on: _build/stage1/libraries/directory/setup-config
  at need, called at src\Rules\Library.hs:214:18 in main:Rules.Library
* Depends on: _build/stage1/libraries/time/build/HStime-1.9.3.o
  at need, called at src\Rules\Library.hs:165:5 in main:Rules.Library
* Depends on: _build/stage1/libraries/time/build/Data/Time/Format/Format/Class.o
  at &%>, called at src\Rules\Compile.hs:77:9 in main:Rules.Compile
* Depends on: _build/stage1/libraries/time/build/Data/Time/Format/Format/Class.o _build/stage1/libraries/time/build/Data/Time/Format/Format/Class.hi
  at cmd', called at src\Builder.hs:291:23 in main:Builder
  at cmd, called at src\Builder.hs:376:8 in main:Builder
* Raised the exception:
Development.Shake.cmd, system command failed
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
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\
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
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
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
.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
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
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
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
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-
deprecated-flags
Exit code: 11
Stderr and Stdout:
Access violation in generated code when writing 0x0

 Attempting to reconstruct a stack trace...

   Frame        Code address
 * 0x3eadb00    0x3063b36 C:\Users\IEUser\haskell\ghc-whole-program-compiler-project\ghc-wpc\_build\stage0\bin\ghc.exe+0x2c63b36
 * 0x3eadb08    0x2e12c89 C:\Users\IEUser\haskell\ghc-whole-program-compiler-project\ghc-wpc\_build\stage0\bin\ghc.exe+0x2a12c89
 * 0x3eadb10    0x4
 * 0x3eadb18    0x7c411e1
 * 0x3eadb20    0x3665e20 C:\Users\IEUser\haskell\ghc-whole-program-compiler-project\ghc-wpc\_build\stage0\bin\ghc.exe+0x3265e20
 * 0x3eadb28    0x5c2abd0
 * 0x3eadb30    0x9ec8010
 * 0x3eadb38    0x3fc3c70
 * 0x3eadb40    0x5c00320033006d
 * 0x3eadb48    0x33004d004d0049
 * 0x3eadb50    0x4c0044002e0032
 * 0x3eadb58    0x4c