-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
When threads have low free stack space, StackSpiller
may infinite-loop through the thread pool
#61757
Comments
Tagging subscribers to this area: @cston Issue DetailsWhen threads have marginally more than 128 KB of stack space, This appears to be the continuation triggered by Lines 16 to 28 in 16300e0
|
Repro is on an Ubuntu 20.04 VM, to run the System.Linq.Expressions tests with the following environment variable set (128 KB stack size for threads):
I attempted something simple, just to avoid checking the |
When threads have marginally more than 128 KB of stack space,
RuntimeHelpers.TryEnsureSufficientExecutionStack
discounts 128 KB of stack space and only considers the remaining space, and there may not be enough even for a non-nested/non-recursive thread pool work item. In that situation,StackGuard.RunOnEmptyStackCore
is triggered again from its continuation and keeps doing so sinceTryEnsureSufficientExecutionStack
always returns false.This appears to be the continuation triggered by
RunOnEmptyStackCore
, which triggers itself continually:runtime/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/StackSpiller.Generated.cs
Lines 16 to 28 in 16300e0
The text was updated successfully, but these errors were encountered: