Repository navigation
fix(browser): start Chromium with long Linux temp paths - #196778
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesThis PR shortens Chromium’s inherited Linux temporary root when TMPDIR exceeds 50 bytes. Example: Launch managed Chromium on Linux with TMPDIR=/tmp/gateway-gateway-gateway-gateway-gateway-gateway-gateway-gateway-gateway-gateway-.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it addresses a current Chromium startup failure with a focused fix, and no actionable patch defects were found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe browser plugin prepares a child environment from the Gateway environment, launches managed Chromium, and returns a browser handle after CDP readiness. flowchart TD
A[Gateway environment] --> B[Chrome launch environment]
B --> C[Linux temporary root selection]
C --> D[Managed Chromium process]
D --> E[Private singleton socket]
D --> F[CDP readiness]
F --> G[Browser handle]
Technical reviewBest possible solution: Keep the byte-length fallback in the existing Chrome launch-environment owner and leave private-directory creation and cleanup to Chromium. Do we have a high-confidence way to reproduce the issue? Current main passes oversized TMPDIR values into Chromium, whose inspected runtime creates and binds a filesystem singleton socket beneath that root; the body also reports a before/after reproduction, but no target code was executed during this review. Is this the best way to solve the issue? The patch is the smallest complete fix for the stated failure: it corrects the child environment at its existing owner without adding lifecycle state, changing the profile, or weakening sandbox settings. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6ee60ba1ebad. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +5, Tests +4, Docs +6, Other +2. Total +17 across 4 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 10, 2026, 1:05 PM ET / 18:05 UTC. |
|
Merged via squash.
|
) * fix(browser): start Chromium with long Linux temp paths * fix(browser): inspect the inherited Chromium temp root Co-authored-by: Vincent Koc <[email protected]>
…8901) (cherry picked from commit 1f088d2) Release adaptation: carry only 4 MiB ps cap and focused native capture regression. Unknown process ownership remains a refusal. Companions: later profile threading openclaw#200503, Linux temp path openclaw#196778, jemalloc openclaw#195331, and retired allocation cleanup openclaw#197656 are not prerequisites of this macOS capture bound; no PR-number follow-ups. Validation: diff check passed; focused test setup lacks @solidjs/vite-plugin in provided shared dependencies (lock differs), not a product verdict. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit f8f4d9f4c90a68c0e805b916918c4c1d35d23b0d) (cherry picked from commit d77e84457d8a53075e55507c7053344a22fe08ff)
) (cherry picked from commit afaaa8d) Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 447ada38d11314ce396ba64c3e47454026f40e48) (cherry picked from commit aee73b4603cbc18683525feb0fa7cacc31b46d12)
What Problem This Solves
Fixes managed Chromium aborting during startup when the Gateway inherits a long temporary-directory path on Linux.
User Impact
Managed browsers start without requiring operators to change the Gateway's TMPDIR. The Gateway environment, browser profile, and sandbox settings remain unchanged.
Why This Change Was Made
Chromium creates its process-singleton Unix socket under TMPDIR. The launch environment now falls back to /tmp only when the inherited path leaves insufficient space for Chromium's private temporary directory and socket name. Chromium still owns creation and cleanup of the private directory.
Evidence
launchOpenClawChrome: before, SIGABRT withSocket path too long; after, CDP ready on an isolated profile/port with the same long Gateway TMPDIR. A later host fontconfig abort is separate; this is startup/readiness proof, not sustained browsing proof.chrome.headless-launch.test.ts: 6 passed again on the final head; 105.85 seconds cold runner/compiler wall time.47b0ce478c8141b52ec4631b4ddbe3d8b018ff21.git diff --check, scoped oxlint (2 files), andpnpm tsgo:extensionspassed. The final head also passeslint:tmp:no-random-messagingafter switching the length check to Chromium's actual inherited TMPDIR rather than Node's generic temp-directory fallback.