Skip to content

Conversation

MichalStrehovsky
Copy link
Member

This reverts commit e1d7398.

The fix didn't work around the problem after all. A CI run from a couple days ago still hits the CRT shutdown bug. Crashdump still at:

runfo get-helix-payload -j 608a7b9d-68cc-46d0-9d48-dd5571a3c251 -w System.Xml.Linq.xNodeBuilder.Tests -o c:\helix\608a7b9d-68cc-46d0-9d48-dd5571a3c251\System.Xml.Linq.xNodeBuilder.Tests\

We should ideally address this at the xunit single file runner level, but I (or Copilot) cannot find a way to get xunit infrastructure to wait for its background threads to finish.

The problem is that we still have an xunit background thread message bus collector delegator sink proxy factory factory doing some work at the time the main thread is already done. I tried disposing things, and adding more waits, and I'm just giving up, the thread is still there.

We could add a 500 ms wait at the end of single file runner Main and see if that works, I guess.

Cc @dotnet/ilc-contrib

@Copilot Copilot AI review requested due to automatic review settings July 1, 2025 05:04
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reverts the temporary debug UCRT shutdown workaround by removing quick_exit/at_quick_exit usage and associated conditional logic, falling back to the standard atexit and always returning from __managed__Main.

  • Drop at_quick_exit registration in startup.cpp
  • Remove <stdlib.h> include and quick_exit path in debug bootstrap main.cpp
  • Simplify exit behavior to always use atexit and return the managed main result

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/coreclr/nativeaot/Runtime/startup.cpp Removed debug-only at_quick_exit(&OnProcessExit) in favor of atexit
src/coreclr/nativeaot/Bootstrap/main.cpp Deleted <stdlib.h> include and debug quick_exit branch; always return __managed__Main

Copy link
Contributor

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

@jkotas
Copy link
Member

jkotas commented Jul 2, 2025

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkotas
Copy link
Member

jkotas commented Jul 2, 2025

/ba-g Known issue #117015 that's not getting matched for some reason

@jkotas jkotas merged commit c92fae9 into dotnet:main Jul 2, 2025
122 of 134 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants