Skip to content

Test failing in CI: Microsoft.Extensions.Hosting.InternalHostTests.HostApplicationLifetimeEventsOrderedCorrectlyDuringShutdown #53720

Open

Description

@vitek-karas

https://dev.azure.com/dnceng/public/_build/results?buildId=1170895&view=ms.vss-test-web.build-test-results-tab&runId=35271328&resultId=115693&paneView=debug

Assert.True() Failure
Expected: True
Actual:   False


Stack trace
   at Microsoft.Extensions.Hosting.Internal.HostTests.HostApplicationLifetimeEventsOrderedCorrectlyDuringShutdown() in /_/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Internal/HostTests.cs:line 807

Known Issue Error Message

DO NOT USE JSON BELOW IF THIS IS A BUILD BREAK otherwise build analysis will allow pull requests to merge that break the build worse. For a build break, do not use this issue form. Make a regular new issue.

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "at Microsoft.Extensions.Hosting.Internal.HostTests.HostApplicationLifetimeEventsOrderedCorrectlyDuringShutdown()",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎
Result validation: ⚠️ Provided build not found. Provide a valid build in the "Build: 🔎" line.
Validation performed at: 7/9/2026 1:06:16 AM UTC

Report

Build Repository Test Pull Request
1634061 dotnet/runtime Microsoft.Extensions.Hosting.Internal.HostTests.HostApplicationLifetimeEventsOrderedCorrectlyDuringShutdown #135602
1622925 dotnet/runtime Microsoft.Extensions.Hosting.Internal.HostTests.HostApplicationLifetimeEventsOrderedCorrectlyDuringShutdown #135179
1622215 dotnet/runtime Microsoft.Extensions.Hosting.Internal.HostTests.HostApplicationLifetimeEventsOrderedCorrectlyDuringShutdown #135156
1622081 dotnet/runtime Microsoft.Extensions.Hosting.Internal.HostTests.HostApplicationLifetimeEventsOrderedCorrectlyDuringShutdown
1618260 dotnet/runtime Microsoft.Extensions.Hosting.Internal.HostTests.HostApplicationLifetimeEventsOrderedCorrectlyDuringShutdown #134466

Summary

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

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Jun 4, 2021
  2. removed
    untriagedNew issue has not been triaged by the area owner
    on Jun 5, 2021
  3. added this to the Future milestone on Jun 5, 2021
  4. SakeTao commented on Sep 8, 2025

    @SakeTao

    Failed in: runtime-coreclr libraries-pgo 20250906.1

    Failed tests:

    net10.0-windows-Release-x64-syntheticpgo-Windows.10.Amd64.Open
        - Microsoft.Extensions.Hosting.Internal.HostTests.HostApplicationLifetimeEventsOrderedCorrectlyDuringShutdown
    

    Error message:

    Assert.True() Failure
    Expected: True
    Actual:   False
    

    Stack trace:

       at Microsoft.Extensions.Hosting.Internal.HostTests.HostApplicationLifetimeEventsOrderedCorrectlyDuringShutdown() in /_/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Internal/HostTests.cs:line 838
       at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) in /_/src/coreclr/System.Private.CoreLib/src/System/RuntimeHandles.cs:line 1168
       at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.CoreCLR.cs:line 36
       at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 57
    
  5. karelz commented on Jan 21, 2026

    @karelz
    Member

    Triage: Let's check Kusto DB if it happened in some reasonable time recently. If not, let's close it.
    @mrek-msft

  6. mrek-msft commented on Jan 26, 2026

    @mrek-msft
    Member

    I verified it. It still fails from time to time. Found 7 failures. Oldest available in data is from 2025-10-08 and latest is from 2026-01-08. Checked at 2026-01-26. All failures has run duration ~5 seconds and all come from Windows. Happens on both net481 and net10.

    Remaining issue assigned in Extensions project in To Be Investigated state.

  7. added
    Known Build ErrorUse this to report build issues in the .NET Helix tab
    on Jul 9, 2026
  8. jkotas commented on Jul 9, 2026

    @jkotas
    Member

    Hit by #128950

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions