-
Notifications
You must be signed in to change notification settings - Fork 524
Graceful shutdown regression #1547
Comments
@halter73 are you going to fix this as part of your changes or do you want me to look at it? |
I don't have the fix. I'm currently tying to stay focused on not regressing the current behavior. I think this could fixed after my changes are merged, but by all means feel free to look at it. |
I'll take a look. |
Logging is the reason things are busted. Here's what happening:
|
Logging is definitely messing things up, but why does the halter73/1547 branch still fail when it's using a "fake" logger? |
I didn't try your branch. Will take a look. |
Tried your branch, seems like an issue with pipes. It seems like neither |
@halter73 guess what the problem is 😄 . Like all problems of this class, something is blocking the libuv thread thus the socket output callback never gets scheduled. In particular KestrelHttpServer/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Http/ConnectionManager.cs Line 67 in 3e6303b
It's been a regression since we added the ability to change thread pool dispatching. It happens in the sample because it turns it off. EDIT: Confirms it happens in feature/dev-si too (for the same reason) |
The right fix is to avoid using the |
Lol. I forgot that we had disabled thread pool dispatching in this sample. I already changed ConnectionManager to use Task.Run() for other reasons in my branch. Same for KestrelThread.DoPostWork(). |
😄 I'll close this bug |
This issue is currently being obscured by aspnet/Logging#563, but here are the logs from Kestrel's sample app after Chrome opens two requests to http://localhost:5000. This is reproducible with and without connection adapters:
If I had to guess, I would say this was likely regressed by #1497, but the parent commit no longer builds due to corefx(lab) changes.
You can see the logs during dispose using my halter73/1547 branch.
The text was updated successfully, but these errors were encountered: