You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
Permitting "unsuspendable" loops could result in unpredictable pauses/hangs.
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.
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,
Activity
VSadov commentedon May 10, 2022
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.
Permitting "unsuspendable" loops could result in unpredictable pauses/hangs.
GSPP commentedon May 11, 2022
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.
LakshanF commentedon Jun 2, 2022
A likely helpful testcase to go with this issue that repro's on a win-x64 machine. The steps to repro are as below,
src\libraries\System.Collections.Concurrent\testsdotnet.cmd build -c Release /t:Test /p:TestNativeAot=trueThe 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,
LakshanF commentedon Jun 18, 2022
This no longer repro's (#70831) in the latest build with the current merges
VSadov commentedon Jul 19, 2022
Async suspension on unix-x64 is now functional with #71187 merged
VSadov commentedon Aug 6, 2022
With #73216 merged all supported platforms should be able to reliably suspend now.
VSadov commentedon Aug 13, 2022
All the tasks planned for this workitem are done. I think we can close this now as Complete.