Another process wait issue on Windows?
Recently I noticed another Windows failure from ghc-cabal
in CI:
Configuring compareSizes-0.1.0.0...
"inplace/bin/ghc-cabal.exe" configure utils/compare_sizes dist-install --with-ghc="C:/GitLabRunner/builds/2WeHDSFP/0/ghc/ghc/inplace/bin/ghc-stage1.exe" --with-ghc-pkg="C:/GitLabRunner/builds/2WeHDSFP/0/ghc/ghc/inplace/bin/ghc-pkg.exe" --disable-library-for-ghci --disable-library-vanilla --disable-library-profiling --disable-shared --configure-option=CFLAGS="-Wall -Wno-error=inline -iquote C:/GitLabRunner/builds/2WeHDSFP/0/ghc/ghc/utils/compare_sizes" --configure-option=LDFLAGS=" " --configure-option=CPPFLAGS=" " --gcc-options="-Wall -Wno-error=inline -iquote C:/GitLabRunner/builds/2WeHDSFP/0/ghc/ghc/utils/compare_sizes " --configure-option=--with-intree-gmp --with-gcc="C:/GitLabRunner/builds/2WeHDSFP/0/ghc/ghc/inplace/mingw/bin/gcc.exe" --with-ld="C:/GitLabRunner/builds/2WeHDSFP/0/ghc/ghc/inplace/mingw/bin/ld.exe" --with-ar="C:/GitLabRunner/builds/2WeHDSFP/0/ghc/ghc/inplace/mingw/bin/ar.exe" --with-alex="/c/GitLabRunner/builds/2WeHDSFP/0/ghc/ghc/toolchain/bin/alex.exe" --with-happy="/c/GitLabRunner/builds/2WeHDSFP/0/ghc/ghc/toolchain/bin/happy.exe"
Configuring compareSizes-0.1.0.0...
C:\GitLabRunner\builds\2WeHDSFP\0\ghc\ghc\tmp\ghcC7FB.o.tmp: renameFile:renamePath:MoveFileEx "\\\\?\\C:\\GitLabRunner\\builds\\2WeHDSFP\\0\\ghc\\ghc\\tmp\\ghcC7FB.o.tmp" Just "\\\\?\\C:\\GitLabRunner\\builds\\2WeHDSFP\\0\\ghc\\ghc\\tmp\\ghcC7FB.o": does not exist (The system cannot find the file specified.)
make[1]: *** [utils/compare_sizes/ghc.mk:9: utils/compare_sizes/dist-install/package-data.mk] Error 1
This appears to be merely the latest in a long line of persistent bugs on Windows regarding process
and its ability to wait for the subprocess to exit:
- prior to we had no way to ensure that all processes in a tree finish, resulting in failures due to
fork
ing programs (e.g.gcc
). See https://github.com/haskell/process/issues/77. This was fixed with the addition of theuse_process_jobs
flag in https://github.com/haskell/process/issues/80. - until %8.8.3 we had https://github.com/haskell/process/issues/167, which could result in
runProcess
returning before the entire subprocess tree had finished - in %8.8.3 we had #17926 (closed), which resulted in crashes (fixed in %8.8.4 with https://github.com/haskell/process/pull/176)
- now we have the present issue
Edited by Ben Gamari