Skip to content

System.Net.Http.Functional.Tests failure #84767

Closed

Description

@lewing

Error Blob

{
  "ErrorMessage": "As currently used, we don't expect to call this after disposing and we don't handle the ODE",
  "BuildRetry": false,
  "ErrorPattern": "",
  "ExcludeConsoleLog": false
}

Reproduction Steps

Seen in #84761
https://dev.azure.com/dnceng-public/public/_build/results?buildId=237855&view=logs&j=bc8f69e2-91b3-518c-84f8-466a04c1af40&t=0864dbdb-cb3f-5f82-b0b6-057b78db53e2&l=103

Process terminated. Assertion failed.
As currently used, we don't expect to call this after disposing and we don't handle the ODE
   at System.Net.Http.Http2Connection.TryReserveStream() in /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs:line 320
   at System.Net.Http.HttpConnectionPool.TryGetPooledHttp2Connection(HttpRequestMessage request, Http2Connection& connection, HttpConnectionWaiter`1& waiter) in /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs:line 832
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs:line 1073
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs:line 185
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 350
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskContinuation.cs:line 795
   at System.Threading.Tasks.Task.RunContinuations(Object continuationObject) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 3440
   at System.Threading.Tasks.Task.FinishSlow(Boolean userDelegateExecute) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 1999
   at System.Threading.Tasks.Task.TrySetException(Object exceptionObject) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 3355
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetException(Exception exception, Task`1& taskField) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 514
   at System.Net.Http.Http2Connection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs:line 2107
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs:line 185
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 350
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskContinuation.cs:line 795
   at System.Threading.Tasks.Task.RunContinuations(Object continuationObject) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 3440
   at System.Threading.Tasks.Task.FinishSlow(Boolean userDelegateExecute) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 1999
   at System.Threading.Tasks.Task.TrySetException(Object exceptionObject) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:line 3355
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetException(Exception exception, Task`1& taskField) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 514
   at System.Net.Http.Http2Connection.Http2Stream.ReadResponseHeadersAsync(CancellationToken cancellationToken) in /_/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Stream.cs:line 1023
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs:line 270
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread) in /_/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs:line 350
   at System.Threading.ThreadPoolWorkQueue.Dispatch() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs:line 919
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() in /_/src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.WorkerThread.cs:line 77
   at System.Threading.Thread.StartCallback() in /_/src/coreclr/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs:line 105
./RunTests.sh: line 168:    24 Aborted                 (core dumped) "$RUNTIME_PATH/dotnet" exec --runtimeconfig System.Net.Http.Functional.Tests.runtimeconfig.json --depsfile System.Net.Http.Functional.Tests.deps.json xunit.console.dll System.Net.Http.Functional.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing $RSP_FILE
/root/helix/work/workitem/

Report

Build Definition Test Pull Request
361133 dotnet/runtime System.Net.Http.Functional.Tests.WorkItemExecution #89869
359097 dotnet/runtime System.Net.Http.Functional.Tests.WorkItemExecution #89260

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 1 2

Known issue validation

Build: 🔎
Result validation: ⚠️ Validation could not be done without an Azure DevOps build URL on the issue. Please add it to the "Build: 🔎" line.

Activity

  1. added
    blocking-clean-ci
    Known Build Error
    on Apr 13, 2023
  2. ghost added
    untriaged
    on Apr 13, 2023
  3. removed
    untriaged
    on Apr 13, 2023
  4. MihaZupan commented on Apr 13, 2023

    @MihaZupan
    Member

    There's a race here where we'll signal the shutdown waiter and set the dispose flag at the same time, but since SignalShutdownWaiter means "push a work item to the thread pool", the connection may not be removed from the pool immediately, so things can still see the connection on the pool in a disposed state.

    I see at least two ways we could avoid this:

    • Instead of all the "ShutdownWaiter" logic, why aren't we just calling pool.InvalidateHttp2Connection when disposing/shutting down the Http2Connection? Feels like a lot of extra code for an indirection?
    • Why do we differentiate between _shutdown and _disposed in the Http2Connection? I may be missing some detail, but it looks like Dispose could just call Shutdown?
  5. added this to the 8.0.0 milestone on Apr 13, 2023
  6. added
    test-run-core
    on Jun 9, 2023
  7. self-assigned this
    on Aug 7, 2023
  8. ghost added
    in-pr
    on Aug 7, 2023
  9. ghost removed
    in-pr
    on Aug 8, 2023
  10. ghost locked as resolved and limited conversation to collaborators on Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Known Build Errorarea-System.Net.Httpblocking-clean-cibugtest-run-core

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions