Closed
Description
Describe the bug
The test-suite terminates non-deterministically with:
cabal-tests.exe: fd:5: hGetLine: end of file
To Reproduce
Steps to reproduce the behavior:
$ ./validate.sh -v -s build -s lib-suite
...
=== Cabal: cabal-testsuite =================================================== 00:10:15 ===
C:\Users\Javier\code\cabal\dist-newstyle-validate-ghc-9.6.3\build\x86_64-windows\ghc-9.6.3\cabal-testsuite-3\build\cabal-tests\cabal-tests.exe --builddir=/c/Users/Javier/code/cabal/dist-newstyle-validate-ghc-9.6.3/build/x86_64-windows/ghc-9.6.3/cabal-testsuite-3 -j4 --with-ghc=ghc
threads: 4
tests to run: 509
PackageTests\TestSuiteTests\ExeV10\cabal-with-hpc.multitest.hs SKIP no cabal-install (4.38s)
PackageTests\AllowOlder\cabal.test.hs SKIP no cabal-install (4.45s)
PackageTests\AllowNewer\cabal.test.hs SKIP no cabal-install (4.45s)
PackageTests\AutoconfBadPaths\cabal.test.hs SKIP no cabal-install (0.53s)
PackageTests\AutogenModules\Package\setup.test.hs OK (1.51s)
PackageTests\AutogenModules\SrcDist\setup.test.hs OK (2.23s)
PackageTests\Backpack\bkpcabal01\cabal.test.hs SKIP no cabal-install (0.54s)
...
SKIP no cabal-install
END Test.Cabal.Server
GHCi exited with ExitFailure (-1073741510) (use -v for more information)
cabal-tests.exe: fd:4: hGetLine: end of file
Turns out that annotating the readUntilEnd
and readUntilSigil
calls to hGetLine
shows that non-deterministically, one of them fails. If I also print the script_path
provided, it is different each time, even sometimes it refers to tests which are marked as skipIfWindows
.
I don't know how the Test.Cabal.Server
is setup, maybe we are leaving the GHCi session in a zombie state?
Expected behavior
The test-suite should just run normally, as it does on CI.
System information
- MINGW64_NT-10.0-22621 3.4.10.x86_64 Msys
- cabal 3.10.2.0, ghc 9.6.3