Windows, GHC 9.6.2, munmapForLinker: m32_release_page: Failed to unmap ... Attempt to access invalid address.
Summary
The CI for a pull request in the Hpack project for Windows only, using the 'system' GHC 9.6.2 supplied by the GitHub hosted runner and cabal-3.10.1.0
dies with complaints about unknown symbols:
ghc-9.6.2.exe: | C:\cabal\store\ghc-9.6.2\tls-1.7.0-8d58f20e9eccc9f7873d67e5a2bfbab4adac37aa\lib\libHStls-1.7.0-8d58f20e9eccc9f7873d67e5a2bfbab4adac37aa.a: unknown symbol `gettimeofday'
ghc-9.6.2.exe: | C:\cabal\store\ghc-9.6.2\tls-1.7.0-8d58f20e9eccc9f7873d67e5a2bfbab4adac37aa\lib\libHStls-1.7.0-8d58f20e9eccc9f7873d67e5a2bfbab4adac37aa.a: unknown symbol `tlszm1zi7zi0zm8d58f20e9eccc9f7873d67e5a2bfbab4adac37aa_NetworkziTLSziHandshakeziCommon13_zdwmakeCipherChoice_info'
ghc-9.6.2.exe: | C:\cabal\store\ghc-9.6.2\crypton-conne_-0.3.1-8964bf584322945dcb53418157c8e69109bc0668\lib\libHScrypton-conne_-0.3.1-8964bf584322945dcb53418157c8e69109bc0668.a: unknown symbol `tlszm1zi7zi0zm8d58f20e9eccc9f7873d67e5a2bfbab4adac37aa_NetworkziTLSziCore_bye1_closure'
ghc-9.6.2.exe: | C:\cabal\store\ghc-9.6.2\http-client-t_-0.3.6.2-887fc88ddae31b1bedf678cc8338c500c876074d\lib\libHShttp-client-t_-0.3.6.2-887fc88ddae31b1bedf678cc8338c500c876074d.a: unknown symbol `cryptonzmconnezuzm0zi3zi1zm8964bf584322945dcb53418157c8e69109bc0668_NetworkziConnection_zdfExceptionLineTooLong3_closure'
ghc-9.6.2.exe: | D:\a\hpack\hpack\dist-newstyle\build\x86_64-windows\ghc-9.6.2\hpack-0.35.2\t\spec\build\spec\spec-tmp\Hpack\Defaults.o: unknown symbol `httpzmclientzmtzuzm0zi3zi6zi2zm887fc88ddae31b1bedf678cc8338c500c876074d_NetworkziHTTPziClientziTLS_tlsManagerSettings_closure'
ghc-9.6.2.exe: Could not load Object Code D:\a\hpack\hpack\dist-newstyle\build\x86_64-windows\ghc-9.6.2\hpack-0.35.2\t\spec\build\spec\spec-tmp\Hpack\Defaults.o.
<no location info>: error:
then a series of 33 of the following messages at different memory addresses:
ghc-9.6.2.exe: munmapForLinker: m32_release_page: Failed to unmap 4096 bytes at 00007ff7e06e6000: Attempt to access invalid address.
and then
Access violation in generated code when reading 0x20
Attempting to reconstruct a stack trace...
Frame Code address
* 0x8f3c7fd840 0x7ff7d2d06636 C:\ghcup\ghc\9.6.2\bin\ghc-9.6.2.exe+0x4286636
* 0x8f3c7fd8c0 0x7ff7d19de05f C:\ghcup\ghc\9.6.2\bin\ghc-9.6.2.exe+0x2f5e05f
* 0x8f3c7fd8f0 0x7ff7d19deaf8 C:\ghcup\ghc\9.6.2\bin\ghc-9.6.2.exe+0x2f5eaf8
* 0x8f3c7fd8f8 0x7ff7d24818af C:\ghcup\ghc\9.6.2\bin\ghc-9.6.2.exe+0x3a018af
* 0x8f3c7fd900 0x7ef4f69385d0
* 0x8f3c7fd908 0x1ba0652d860
* 0x8f3c7fd910 0x4ee39
* 0x8f3c7fd918 0x7ef4f2ae7c40
Error: cabal-3.10.1.0.exe: Failed to build test:spec from hpack-0.35.2. The
build process terminated with exit code 11
At the Haskell Community, it has been speculated that perhaps the fix of #19421 (closed) has introduced a bug.
This may be Windows-specific, as the ubuntu-latest/GHC 9.6 and macos-latest/'system' GHC CI both pass. The ubuntu-latest/GHC 8.2 to GHC 9.4 also all pass. However, the CI does not test Windows pre-GHC 9.6.2.
Steps to reproduce
I don't yet have a reproducer outside of the Hpack project CI script. Also, I can build and test the Hpack project at the commit in the PR using Stack and GHC 9.6.2, without a problem.
Environment
- GHC version used: GHC 9.6.2
Optional:
- Operating System: Windows Server 2022
- System Architecture: x86_64