httpServe appears to be interfering with slave-thread
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
Research direction
Start by tracing the shutdown path in Snap/Http/Server.hs, then compare the exception handling in SlaveThread.hs and PartialHandler.hs. Use the linked sections and the proposed minimal reproduction to verify whether ThreadKilled reaches the parent invoking httpServe. Done means Ctrl-C shuts down the server and child threads without their output continuing.
Written by the indexing model from the issue text.
Description
Children aren't getting harvested on ctrl-c in GHCi, can see their output continue even though the web server itself successfully shut down.
I think slave-thread needs 1 a ThreadKilled 2 exception to bubble up to the parent thread (the one in main which invoked httpServe) in order for it to do its thing.
This looks like a good candidate for starting to narrow things down.
I'll try to put together a minimal repro in a bit.
Some context from IRC:
< mightybyte> One of our apps started exhibiting this behavior a few months back.
< bitemyapp> I think perhaps it is not letting the ThreadKilled bubble up.
< mightybyte> And I think it happened around the time that some code was added that probably forked some threads.
< mightybyte> So that all lines up with what you're saying.
- Dominant language
- Haskell
- Stars
- 197
- Forks
- 87
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from snapframework/snap-server
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
snapframework/snap-server#118 · 5 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
snapframework/snap-server#96 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
snapframework/snap-server#94 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
snapframework/snap-server#92 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
snapframework/snap-server#85 · 8 comments ·
All issues in snapframework/snap-server
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
objectionary/phino#1724 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
tomjaguarpaw/bluefin#108 ·
-
infrastructure
Difficulty 1/5 Under an hour Newbie friendliness 92/100
alunduil/collection-json.hs#373 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
digital-asset/daml#23439 ·
Maintainers usually reply within 1 day
-
Advance the dependency pin set to cardano-node 11.1.3Possibly taken @paolino claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100