Skip to content

HTTP/2 stress server intermitently fails in duplex scenarios #42200

Closed
@ManickaP

Description

@ManickaP

When sending custom content in H/2 and using simple echo server. Then client disposes the response which might send RESET before the last DATA frame with END_STREAM flag leading to a server-side exception:

System.IO.IOException: The client reset the request stream.
  at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestStream.ReadAsyncInternal(Memory`1 destination, CancellationToken cancellationToken)

The root of the issue resides in sending END_STREAM completely asynchronously.

  • In case when our own predefined contents are used, this frame is send asynchronously and might be sent after SendAsync has finished.
  • In case custom content is used, the end of its SerializeToStreamAsync is not a strong indicator that the END_STREAM has been sent, it still happens completely asynchronously.

Relates to #1511

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions