On a github windows runner, I see an "access violation" error when building Decimal. It seems somewhat repeatable, and to affect ghc 8.8.3 but not 8.8.2.
Sadly, this being a Setup.hs invocation, it's quite difficult to reproduce.
However, the fact that 8.8.2 works is interesting. While there were quite a few Windows-specific changes in process, these really shouldn't be able to cause a segfault. AFAIK, Setup.hs doesn't rely on the runtime linker so I doubt that 8b193877 is culpable. The only other potentially relevant changes are in CorePrep. However, this really wouldn't be platform specific.
@simonmichael on failure could you zip up the build directory? or perhaps pass to GHC +RTS --generate-crash-dumps, if this is crashing in a custom setup like @bgamari suggested you can add to your cabal file ghc-options: -debug -rtsopts -with-rtsopts="--generate-crash-dumps"
The dumps are created in %TEMP%\*.dmp.
I can't reproduce it locally and I currently lack way too much information to be able to determine what this is.. Why do you suspect the linker @bgamari ? Decimal doesn't seem to use TH so there should have been no need for the runtime linker..
@jakzale Maybe, but the error is too generic. I really would like a dump otherwise we're just guessing... can you call ghc with +RTS --generate-crash-dumps and upload the dump file.
If it doesn't generate one use procdump. https://docs.microsoft.com/en-us/sysinternals/downloads/procdump
and using procdump.exe -t -ma -e 1 -x . <program>.exe. This would really make things go a lot faster... since I can't reproduce it on my machine it's highly likely that something environmental if affecting it.
Now I'm seeing the notifications from this. @Phyx, I tried but haven't successfully captured .dmp files. At https://github.com/simonmichael/hledger/actions/runs/59047658 the dumps.zip artifact is the full contents of C:\Users\runneradmin\AppData\Local\Temp, after doing stack --no-terminal build --only-dependencies || true, with
We are getting a similar problem in Agda in the same environment (GHC 8.8.3, invoked via stack 2.1.3, Windows Server 2019 ("windows-latest" in github actions)). Also the problem doesn't happen with GHC 8.8.2:
alex > Preprocessing executable 'alex' for alex-3.2.5..alex > Building executable 'alex' for alex-3.2.5..alex > alex > Access violation in generated code when writing 0x0alex > alex > Attempting to reconstruct a stack trace...alex > alex > Frame Code addressalex > * 0x461da80 0x37f7b66 C:\Users\runneradmin\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x33f7b66alex > * 0x461da88 0x3277bb9 C:\Users\runneradmin\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x2e77bb9alex > * 0x461da90 0x5alex > * 0x461da98 0x5alex > * 0x461daa0 0x3d7dc22 C:\Users\runneradmin\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\bin\ghc.exe+0x397dc22alex > * 0x461daa8 0x718b230
The GitHub log is here. I also don't have a machine with Windows for reproducing the issue.
I cannot spot other difference than upgrade of Visual Studio (I have no idea how that might affect things), from Version: VisualStudio/16.4.5+29806.167 to Version: VisualStudio/16.5.0+29911.84. It might be that msys stuff is not compatible? (e.g. see https://github.com/actions/virtual-environments/issues/625 - suggests that some tools need to be updated).
I believe @phadej managed to reproduce it on AppVeyor, so I should be able to remote desktop there to debug further. The dumpfile was a good start but the line it claims causes this is in a file that doesn't seem to exist in the compiler.
Then again the compiler is statically linked so it could have come from some library. But being able to reproduce makes it very hard to debug.
We are getting a similar problem in Agda in the same environment (GHC 8.8.3, invoked via stack 2.1.3, Windows Server 2019 ("windows-latest" in github actions)). Also the problem doesn't happen with GHC 8.8.2.
FYI, the problem disappeared in Agda when using GHC 8.10.1.
I am glad to hear it. I am going to optimistically assume that the issue was fixed by the something the windows stabilization work that is present in 8.10 (perhaps the toolchain bump?). Do let us if you encounter this again the future.
I note that GHC 8.8.1, 8.8.2 and 8.8.3 are all mostly unusable on Windows (the first two the Cabal linking bug, the last one that everything segfaults when building). I appreciate 8.10 fixes it, but to a large extent this is leaving Windows unsupported for GHC 8.8.