-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Hangs with HttpClientHandler and AutomaticDecompression in 2.1 preview #26049
Comments
@ayende thanks for your report! |
@ayende, are the failures with both http and https, or just https maybe? And is it possible something is causing the connection to be closed with partial data written by the server? I'm just wondering if this may be dotnet/corefx#29344. Long shot, as I would expect that to cause problems even without automatic decompression, but figured I'd ask. |
Stack trace for the hang, client side:
The URL is: This is reading from I'm trying to reproduce this again in a way that I can send a dump. |
@ayende, you mentioned you're only able to repro this as part of your full suite, not isolated. Can you tell what else is going on in the process, and in particular, what the threads in the thread pool look like? This stack trace shows that it's using the synchronous methods on these streams, but the synchronous methods on HttpClientHandler are all implemented as blocking on top of the async operations. I'm wondering if you're blocking all threads in the thread pool waiting for additional threads to be introduced to unblock whatever operation will allow these synchronous methods to continue. What does your process' thread count look like when you get these hangs? Is it slowly ticking up at 1 or 2 threads per second? |
I left this running overnight, and I don't think this is it. There are a 112 threads, but not a lot of them. The server side stack trace is:
This is reproducible by two specific tests that stream a few tens of thousands of records. I have a dump file (154MB compressed) that I'm uploading now. |
Have you tried mixing and matching, e.g. a 2.0 client with a 2.1 server, and a 2.1 client with a 2.0 server? Wondering if that would help to narrow it down. |
Okay, something that might be related.
Is it possible that there is a missing |
Link to the dump file: https://drive.google.com/file/d/1dS9xAMgHz7B5ncTvlLdRvSDCanRWmjRs/view?usp=sharing |
Yes. Are you able to build System.Net.Http.dll to try out a fix? Can you try adding |
Re-opening to track 2.1 port. |
Fixed in release/2.1 in PR dotnet/corefx#29470. |
We recently have run into a spate of hangs in our tests when running the full test suite.
We have been able to narrow it down to a consistent hang when an
HttpClient
is reading from a pretty big stream and Kestrel is sending a pretty big stream.This is all on the local machine, mind. We weren't able to reproduce this on stand alone tests, but consistently when running the full suite.
These tests pass without issue when running on 2.0.
Eventually we narrowed it down to removing this line:
On the server side, compression is done using:
Is this a known issue? Any other details that I can provide?
2.1.300-preview2-008533
The text was updated successfully, but these errors were encountered: