-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Implement full GC suspension #67805
Comments
In CoreCLR we have 3 mechanisms for suspension:
We generally guarantee that any loop can be suspended via at least one mechanism. More than one is better. Ideally we should have the same guarantee on NativeAOT - at least one suspension mechanism should be available. |
Go has been plagued by unsuspendable loops. For a long time, the team was unwilling to sacrifice performance to make loops strictly suspendable. This caused instability of applications under certain circumstances. This issue has attracted about 300 comments from people who encountered a problem with that behavior. |
A likely helpful testcase to go with this issue that repro's on a win-x64 machine. The steps to repro are as below,
The test should hang. The following selected call stacks show the issues with GC suspension: Thread 34 below looks interesting in that the call stack seems broken for this test scenario,
|
This no longer repro's (#70831) in the latest build with the current merges |
Async suspension on unix-x64 is now functional with #71187 merged |
With #73216 merged all supported platforms should be able to reliably suspend now. |
All the tasks planned for this workitem are done. I think we can close this now as Complete. |
NativeAOT is missing implementation of full GC suspension logic. This manifest as hang when one thread of the program is running tight loop without any GC probes and another thread triggers GC.
More context:
Workitems:
supported already
[NativeAOT] Enabling return address hijacking on ARM64 Windows #70740
[NativeAOT] Asynchronous thread suspension at GC safe points on Windows #70316
[NativeAOT] Enabling asynchronous thread suspension at GC safe points on ARM64 Windows #70769
[NativeAOT] thread suspension on Unix #71187
[NativeAOT] Enable async runtime suspension and return hijacking on unix-arm64 #73216
[NativeAOT] thread suspension on Unix #71187
[NativeAOT] Enable async runtime suspension and return hijacking on unix-arm64 #73216
[NativeAOT] Follow up changes for the suspension loop routine. #73741
The text was updated successfully, but these errors were encountered: