You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HTTP2: Hang when writing sending large data to completed request #30293
Writing large data to the request stream (Http2WriteStream retrieved from SerializeToStreamAsync) will hang if the server has finished. I would have expected Stream.WriteAsync to error.
dotnet test test\FunctionalTests --filter Name~DuplexStream_SendToUnimplementedMethod_Hang
Logic in the test is like:
Client makes HTTP/2 call to the server
Client immediately starts writing 64 KB to request stream
Server finishes response with 200. It never reads the request stream.
Client's first write of 64 KB succeeds (i.e. doesn't hang. I don't know what has happened to the data). Client writes another block of 64 KB. Client hangs on awaiting Stream.WriteAsync.
.NET Core SDK (reflecting any global.json):
Version: 3.0.100-preview8-013248
Commit: 135af55c46
Does a server always have to read the client request to prevent the client from hanging?
In this scenario the client has called the wrong location and the server sends them a simple status - HEADERS - saying so, followed by RST_STREAM (NO_ERROR). It ignores the request body because there is no reason to read it.
Activity
stephentoub commentedon Jul 18, 2019
Isn't that the bug here?
JamesNK commentedon Jul 18, 2019
Does a server always have to read the client request to prevent the client from hanging?
In this scenario the client has called the wrong location and the server sends them a simple status - HEADERS - saying so, followed by RST_STREAM (NO_ERROR). It ignores the request body because there is no reason to read it.
JamesNK commentedon Jul 18, 2019
I would have thought that if the client is hanging on Http2WriteStream.WriteAsync that it would error when the server sends a stream reset.
JamesNK commentedon Jul 18, 2019
https://github.com/dotnet/corefx/issues/39458
Same issue?
stephentoub commentedon Jul 18, 2019
Ah, that wasn't in the original description. If the server is sending RST_STREAM, then yes, the client should stop.
stephentoub commentedon Jul 18, 2019
Yes, if the issue is that the client isn't respecting RST_STREAM while sending the request body, that's the same issue.