Fix for Guardian CI Tests stack overflow, applying Box to reduce stack pressure#17846
Merged
Conversation
bolinfest
reviewed
Apr 14, 2026
Comment on lines
+1324
to
+1332
| let handle = | ||
| std::thread::Builder::new() | ||
| .name("guardian_parallel_reviews_fork_from_last_committed_trunk_history".to_string()) | ||
| .stack_size(TEST_STACK_SIZE_BYTES) | ||
| .spawn(|| -> anyhow::Result<()> { | ||
| let runtime = tokio::runtime::Builder::new_current_thread() | ||
| .enable_all() | ||
| .build()?; | ||
| runtime.block_on(Box::pin(async { |
Collaborator
There was a problem hiding this comment.
Can we get rid of this now that you have boxed things elsewhere?
Collaborator
Author
There was a problem hiding this comment.
tried removing and ci regressed, bazel local-build fails without the harness due to the same issue
won-openai
added a commit
that referenced
this pull request
Apr 14, 2026
1f29ddc to
df652d0
Compare
Collaborator
|
Let's land as-is to get the build green, but this is a bad code smell to me, so unless you have good evidence that it is not a bad code smell, then please eliminate the stack carveout post-merge. |
bolinfest
approved these changes
Apr 15, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Issue
guardian_parallel_reviews_fork_from_last_committed_trunk_history was failing on Windows/Bazel with a stack overflow:
thread 'guardian::tests::guardian_parallel_reviews_fork_from_last_committed_trunk_history' has overflowed its stackSolution
Reduced stack pressure in the guardian async path by boxing thin wrapper futures, and run the affected test on a dedicated 2 MiB thread stack.
Concretely: