Skip to content

HTTP2: Post method with ExpectAndContinue hangs after a first bunch of requests #30315

Closed
dotnet/corefx
#39638

Description

@Anipik

The Post ExpectContinue task is getting hanged when the cancellation rate is not zero.

I was not able to get any helpful info from the trace or aspnetlog. After some time it just throws an exception and hangs again. The exception thrown is

[Exit] thisOrContextObject: HttpClient#62601592, memberName: SendAsync, result: System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[System.Net.Http.HttpResponseMessage,System.Net.Http.RedirectHandler+<SendAsync>d__4]
[HandlerMessage] poolId: 66166301, workerId: 56140151, requestId: 0, memberName: AbortStreams, message: abortException=System.IO.IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine..
 ---> System.Net.Sockets.SocketException (10053): An established connection was aborted by the software in your host machine.
   --- End of inner exception stack trace ---
   at System.Net.Security.SslStream.<WriteSingleChunk>g__CompleteAsync|210_1[TWriteAdapter](ValueTask writeTask, Byte[] bufferToReturn)
   at System.Net.Security.SslStream.WriteAsyncInternal[TWriteAdapter](TWriteAdapter writeAdapter, ReadOnlyMemory`1 buffer)
   at System.Net.Http.Http2Connection.FlushOutgoingBytesAsync()
[HandlerMessage] poolId: 66166301, workerId: 56140151, requestId: 97, memberName: OnAbort, message: abortException=System.IO.IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine..
 ---> System.Net.Sockets.SocketException (10053): An established connection was aborted by the software in your host machine.
   --- End of inner exception stack trace ---
   at System.Net.Security.SslStream.<WriteSingleChunk>g__CompleteAsync|210_1[TWriteAdapter](ValueTask writeTask, Byte[] bufferToReturn)
   at System.Net.Security.SslStream.WriteAsyncInternal[TWriteAdapter](TWriteAdapter writeAdapter, ReadOnlyMemory`1 buffer)
   at System.Net.Http.Http2Connection.FlushOutgoingBytesAsync()
[HandlerMessage] poolId: 66166301, workerId: 56140151, requestId: 99, memberName: OnAbort, message: abortException=System.IO.IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine..
 ---> System.Net.Sockets.SocketException (10053): An established connection was aborted by the software in your host machine.
   --- End of inner exception stack trace ---
   at System.Net.Security.SslStream.<WriteSingleChunk>g__CompleteAsync|210_1[TWriteAdapter](ValueTask writeTask, Byte[] bufferToReturn)
   at System.Net.Security.SslStream.WriteAsyncInternal[TWriteAdapter](TWriteAdapter writeAdapter, ReadOnlyMemory`1 buffer)
   at System.Net.Http.Http2Connection.FlushOutgoingBytesAsync()
[Enter] thisOrContextObject: HttpConnectionPoolManager#52747788, memberName: RemoveStalePools, parameters: 
[HandlerMessage] poolId: 66166301, workerId: 0, requestId: 0, memberName: CleanCacheAndDisposeIfUnused, message: Cleaning pool.
[Exit] thisOrContextObject: HttpConnectionPoolManager#52747788, memberName: RemoveStalePools, result: 
[Enter] thisOrContextObject: HttpConnectionPoolManager#52747788, memberName: RemoveStalePools, parameters: 
[HandlerMessage] poolId: 66166301, workerId: 0, requestId: 0, memberName: CleanCacheAndDisposeIfUnused, message: Cleaning pool.
[Exit] thisOrContextObject: HttpConnectionPoolManager#52747788, memberName: RemoveStalePools, result: 

When cancelation rate is zero it works perfectly fine.

cc @stephentoub @eiriktsarpalis

Activity

  1. stephentoub commented on Jul 19, 2019

    @stephentoub
    Member

    Anything to do with cancellation ends up being impacted by the various bugs @geoffkizer is fixing. It's possible this is different, it's possible it's the same. We really need his work to land (very soon, right @geoffkizer ? 😉 ) before any such issues can be evaluated.

  2. karelz commented on Aug 3, 2019

    @karelz
    Member

    Fixed in master (5.0) in PR dotnet/corefx#39638 and also in release/3.0 branch (3.0) in PR dotnet/corefx#39775.

  3. transferred this issue fromdotnet/corefxon Feb 1, 2020
  4. added this to the 3.0 milestone on Feb 1, 2020
  5. ghost locked as resolved and limited conversation to collaborators on Dec 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions