[EventEngine] Fix busy loop in thread pool when shutting down#39258
Closed
drfloob wants to merge 1 commit intogrpc:masterfrom
Closed
[EventEngine] Fix busy loop in thread pool when shutting down#39258drfloob wants to merge 1 commit intogrpc:masterfrom
drfloob wants to merge 1 commit intogrpc:masterfrom
Conversation
markdroth
approved these changes
Apr 15, 2025
drfloob
added a commit
that referenced
this pull request
Apr 17, 2025
…tting down (#39258) (#39296) Backports #39258 to v1.72.x branch. ---- Potential alternative fix for #39240. When the WorkStealingThreadPool is shutting down, the lifeguard thread could end up in a busy loop while waiting for the pool to quiesce. In some environments, this may prevent other threads from running in a timely manner, which can cause the process to hang. This PR adds a short delay on lifeguard thread's quiesce check, which grows exponentially to a maximum of 1 second if the thread pool is idle.
This was referenced Apr 21, 2025
Merged
Merged
Merged
Merged
gnossen
pushed a commit
that referenced
this pull request
Apr 21, 2025
…tting down (#39258) (#39319) Backports #39258 to v1.68.x branch. ---- Potential alternative fix for #39240. When the WorkStealingThreadPool is shutting down, the lifeguard thread could end up in a busy loop while waiting for the pool to quiesce. In some environments, this may prevent other threads from running in a timely manner, which can cause the process to hang. This PR adds a short delay on lifeguard thread's quiesce check, which grows exponentially to a maximum of 1 second if the thread pool is idle.
drfloob
added a commit
that referenced
this pull request
Apr 21, 2025
…tting down (#39258) (#39315) Backports #39258 to v1.71.x branch. ---- Potential alternative fix for #39240. When the WorkStealingThreadPool is shutting down, the lifeguard thread could end up in a busy loop while waiting for the pool to quiesce. In some environments, this may prevent other threads from running in a timely manner, which can cause the process to hang. This PR adds a short delay on lifeguard thread's quiesce check, which grows exponentially to a maximum of 1 second if the thread pool is idle.
veblush
pushed a commit
that referenced
this pull request
Apr 21, 2025
…tting down (#39258) (#39318) Backports #39258 to v1.69.x branch. ---- Potential alternative fix for #39240. When the WorkStealingThreadPool is shutting down, the lifeguard thread could end up in a busy loop while waiting for the pool to quiesce. In some environments, this may prevent other threads from running in a timely manner, which can cause the process to hang. This PR adds a short delay on lifeguard thread's quiesce check, which grows exponentially to a maximum of 1 second if the thread pool is idle.
yashykt
pushed a commit
that referenced
this pull request
Apr 22, 2025
…utting down (#39258) (#39320) Backports #39258 to v1.67.x branch. ---- Potential alternative fix for #39240. When the WorkStealingThreadPool is shutting down, the lifeguard thread could end up in a busy loop while waiting for the pool to quiesce. In some environments, this may prevent other threads from running in a timely manner, which can cause the process to hang. This PR adds a short delay on lifeguard thread's quiesce check, which grows exponentially to a maximum of 1 second if the thread pool is idle.
yashykt
pushed a commit
that referenced
this pull request
Apr 30, 2025
…utting down (#39258) (#39317) Backports #39258 to v1.70.x branch. ---- Potential alternative fix for #39240. When the WorkStealingThreadPool is shutting down, the lifeguard thread could end up in a busy loop while waiting for the pool to quiesce. In some environments, this may prevent other threads from running in a timely manner, which can cause the process to hang. This PR adds a short delay on lifeguard thread's quiesce check, which grows exponentially to a maximum of 1 second if the thread pool is idle.
This was referenced May 5, 2025
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Potential alternative fix for #39240.
When the WorkStealingThreadPool is shutting down, the lifeguard thread could end up in a busy loop while waiting for the pool to quiesce. In some environments, this may prevent other threads from running in a timely manner, which can cause the process to hang. This PR adds a short delay on lifeguard thread's quiesce check, which grows exponentially to a maximum of 1 second if the thread pool is idle.