-
Notifications
You must be signed in to change notification settings - Fork 108
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
Resources not cleaned up with Ctrl+C #354
Comments
I'm afraid we can only be hold responsible for the behavior of a vanilla test executable. If |
Thanks @Bodigrim opened one here: commercialhaskell/stack#6236 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Minimal repro:
Observed behaviors:
threadDelay
pkill -INT
pkill -15
This behavior also happens with
unliftio
'sfinally
, which usesuninterruptibleMask
. It also fails to clean up anybracket
orwithResource
wrapping the entire test, e.g.cleanup
will never be printed in the following snippet:Changing the second
threadDelay
tothreadDelay 1
does clean up, so it's notthreadDelay
itself, just anything taking a long time. In our case, connecting to a postgres database (e.g. withpostgresql-libpq
'sconnectStart
function) in thefinally
block also shows this behavior.This only happens with
stack test
. Manually compiling withghc Main.hs && ./Main
will clean up, andcabal test --test-show-details=streaming
will exit immediately, but finish the cleanup in the background (as a zombie thread?).The text was updated successfully, but these errors were encountered: