-
Notifications
You must be signed in to change notification settings - Fork 42
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
"mmap 131072 bytes at (nil)" with 'stack test' when using hint (+ servant + hspec) #131
Comments
That doesn't ring a bell, no, but googling found a few hits: https://gitlab.haskell.org/ghc/ghc/-/issues/19421 They're both in the doctest project, which makes sense because doctest is a wrapper around the ghci executable, which is a wrapper around the ghc library, and hint is also a wrapper around the ghc library. I am thus guessing that the bug is ultimately in ghc itself. |
Thanks for the pointer. I will try to reduce my test case. (It's https://gitlab.imn.htwk-leipzig.de/autotool/all0/-/blob/master/server-implementation-servant/test/ApiSpec.hs#L207 but that pulls in a lot of depencies.) |
Since the documentation for the That documentation also says that the flag is only useful in GHCi, so I guess it's not surprising that this specific symptom only occurs with interpreted code and not when running the same code inside an executable. Since the code you linked to says it tests a timeout, I have a hypothesis. Perhaps the code which is interrupted by the timeout is a busy loop which allocates more and more memory, and thus uses up the portion of the lower 2Gb which the documentation says the RTS must use? What does the memory profile of your program look like while waiting for the timeout to trigger? |
Fedora GNU/Linux on x86_64
ah yes! something like that is happening, it evaluates |
I isolated this test case https://gitlab.imn.htwk-leipzig.de/autotool/all0/-/tree/master/hint-check but I give up (on debugging) for now, as it seems a Heisenbug to me. |
"Could not load module Data.ByteString, it is a member of the hidden package bytestring-0.10.12.0" sounds a lot like #128! That symptom should be pretty consistent though, you're saying it disappears when you try to debug it? What kind of debugging actions are causing it to disappear? |
I hit same issues recently after upgrading nixpkgs from release-20.09 to release-21.05 same ghc-8.10.4. The bug is reproducible only on Linux when I launch Haskell interpreter and MacOS BigSur is ok.
Once xm is mentioned the failure doesn't happen.
P.S. my case happens not during tests, but at regular program run. |
Hi. We use
hint
, inside aservant
app. We havehspec
tests for the app. When I run them withstack test
, I getThe error does not happen when I call the executable (
.stack-work/dist/x86_64-linux/Cabal-3.2.1.0/build/servant-tests/servant-tests
) directly.I could look into this more closely, but I wanted to ask first whether you've seen this before, as this would help me isolate the cause.
The text was updated successfully, but these errors were encountered: