-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Revert "Exit with quick_exit when using debug UCRT (#109006)" #117187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This reverts commit e1d7398.
There was a problem hiding this 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 instartup.cpp
- Remove
<stdlib.h>
include andquick_exit
path in debug bootstrapmain.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 |
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas |
Co-authored-by: Jan Kotas <[email protected]>
/azp run runtime-nativeaot-outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
/ba-g Known issue #117015 that's not getting matched for some reason |
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:
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