Repository navigation
fix(executor): writable-probe temp dir fallback for respawn transport - #752
Merged
Merged
Conversation
A present-but-unwritable TMPDIR default (Android's /tmp) failed the respawn tempfile, falling back to an inline -c string that dies E2BIG past MAX_ARG_STRLEN (6000-function background jobs). Probe writability (pid+counter canary), fall back to process temp dir then shell cwd. background_command_with_large_function_table_runs green.
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.
fix(executor): writable-probe temp dir fallback for respawn transport
What
background_command_with_large_function_table_runs(6000 functions)failed E2BIG with no TMPDIR set:
shell_temp_pathchecked directoryEXISTENCE, but Android ships a present-but-unwritable
/tmp, so therespawn tempfile failed and the transport fell back to an inline
-cstring past
MAX_ARG_STRLEN.Fix (
src/executor/external_setup.rsonly)Writability probe (pid+counter canary file, created+removed) instead
of existence: configured dir → process temp dir → shell cwd. Helps
process substitution materialization too (same helper). Tempfile
removed after the child reads it (verified no litter).
Verification
env -i, no TMPDIR): E2BIG →hello+ status 0.tests. Proven fixed:
background_command_with_large_function_table(deterministic E2BIG → green, 3 runs). Other DISAPPEARED
(golden_trap, parse_acceptance, 3 perf canaries) also pass in
isolation on both legs — load-flake churn, not claimed.
6295367, only rubash[patch]switched): failure sets byte-identical (8=8).