-
Notifications
You must be signed in to change notification settings - Fork 843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash with GHCRTS=--io-manager=native
(version: git HEAD)
#5851
Comments
Thank you. I am wondering if this is an upstream issue with GHC. I am using Stack installed with module Main (main) where
import GHC.IO.SubSystem (isWindowsNativeIO)
main :: IO ()
main = print isWindowsNativeIO It works fine with this executables:
ioTest-exe:
main: Main.hs
source-dirs: app
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
- -with-rtsopts=--io-manager=native It also works fine with this executables:
ioTest-exe:
main: Main.hs
source-dirs: app
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N As you experienced, it is only when setting RTS options using an environment variable |
I've raised this at the GHC level, in case it is a GHC bug (see GHC issue #22146). |
Sorry, but I am a bit unsure whether this configuration is testing the same crash as I reported. In my case, the crash is never from the test program itself, but from stack (when running
I am confused now, because setting |
@ruifengx, you are, of course, correct. I was not thinking clearly. What I should have been comparing was using Stack with the RTS option at the command line:
which yields the same error. The exception itself is defined in the |
I do think this is an upstream issue. See commercialhaskell/pantry#59 and GHC issue #22146. |
According to the latest comment in linked GHC issue, I do not believe we will get a fix from GHC soon (if ever), so I have just submitted hspec/silently#26 to address this problem. If it got merged there, I hope there could be a new |
So I just built stack with my patched extra-deps:
- git: https://github.com/ruifengx/silently.git
commit: 0718fc3d1f2b31b66757f51f7c8dbbc0d85179b7 Now (with EDIT: here is part of the output with
It hangs indefinitely after this, waiting for |
@ruifengx, thanks for investigating further. To help me follow along, when you refer to |
No, actually I am not particularly familiar with I did some digging into the stack codebase, and here is what I found out (hope it would be helpful):
I highly suspect the problem is rooted within |
Also does not suggestion an inappropriate workaround if the cause is the upstream bug discussed at #5851. Also updates the error documentation, generally. Also conforms the Haddock documentation of pretty exceptions in various modules. Also refactors some import lists, in passing, with a longer term view to a more consistent approach.
Note: the latest version (2.7.5) of stack on Windows was compiled using GHC 8.10.4, which did not have the new native WinIO manager. This error is produced with manually compiled stack, using the source from this GitHub repo, at commit 13ba67a (yesterday). I followed the procedure in the GitHub CI file to compile the executable, namely a
release.hs check
followed byrelease.hs build
.General summary/comments (optional)
Steps to reproduce
cd
into any stack project.GHCRTS=--io-manager=native
.stack build
.C:\sr
is mySTACK_ROOT
.$STACK_ROOT/pantry/pantry.sqlite3
as instructed, and rerunstack build
.Note: No error if we unset the
GHCRTS
environment variable.Expected
No error.
Actual
Error reported, and the build process did not start.
If you suspect that a Stack command misbehaved, please include the output of
that command in
--verbose
mode:Stack version
As explained above, a manual build. Work tree unchanged (therefore using almost the same environment as CI builds).
Method of installation
Other: manual build as explained above. I can provide the executable if needed.
The text was updated successfully, but these errors were encountered: