Skip to content

fix(executor): writable-probe temp dir fallback for respawn transport - #752

Merged
caomengxuan666 merged 1 commit into
masterfrom
fix/tmpdir-fallback-temp
Oct 17, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
fix/tmpdir-fallback-temp

Conversation

@caomengxuan666

@caomengxuan666 caomengxuan666 commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

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_path checked directory
EXISTENCE, but Android ships a present-but-unwritable /tmp, so the
respawn tempfile failed and the transport fell back to an inline -c
string past MAX_ARG_STRLEN.

Fix (src/executor/external_setup.rs only)

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

  • Repro (env -i, no TMPDIR): E2BIG → hello + status 0.
  • Regression test green (12.8s).
  • Full serial failure-set gate vs master: 18 vs 24 failing. Zero NEW
    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.
  • niubash product A/B (niubash pinned 6295367, only rubash [patch]
    switched): failure sets byte-identical (8=8).

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.
@caomengxuan666
caomengxuan666 merged commit 8f96ee5 into master Oct 17, 2026
8 checks passed
@caomengxuan666
caomengxuan666 deleted the fix/tmpdir-fallback-temp branch October 17, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant