Repository navigation
feat(crash-reporting): read-only Windows install-dir DACL probe breadcrumb - #15107
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds a Windows-only, read-only ACL diagnostic for the install directory and a representative module file. The probe invokes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Records whether the install tree carries an orphan S-1-15-2-* package ACE with no S-1-15-2-1/-2 to satisfy it — the state that reproduces the 0x80000003 GPU/renderer init crash 10/10 (electron/electron#51761). Diagnostic only: never writes an ACL, never changes behavior.
62e0b3c to
0289d72
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/main/startup/windows-install-dir-acl-probe.ts (1)
11-21: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueReduce the incident narrative in this source file.
Move the reproduction history and workaround details to an issue or design document. Keep a short comment that states the diagnostic invariant and the linked reference. As per coding guidelines, comments must be concise, non-obvious, and brief—prefer one line.
Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7a914724-97f8-4b19-a482-4efe6ce5a57a
📒 Files selected for processing (3)
src/main/index.tssrc/main/startup/windows-install-dir-acl-probe.test.tssrc/main/startup/windows-install-dir-acl-probe.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/main/index.ts
Included review availability: Your plan includes up to 10 reviews per rolling hour; 6 remain after this review.
…locale risk Three readiness-review findings: - the signature was merged across targets, so a grant on the directory masked its absence on the module file - the exact per-file state the probe exists to detect - the well-known package name check is English-only and icacls localizes it, so a non-English box could false-positive silently; report whether the check could be trusted - the serve-mode test omitted platform, so the gate was never exercised Also switch to the durable recorder (this runs after initObservability, so the span lands in the diagnostics bundle) and correct two comments that misstated where the probe runs.
…crumb (stablyai#15107) * feat(crash-reporting): read-only Windows install-dir DACL probe Records whether the install tree carries an orphan S-1-15-2-* package ACE with no S-1-15-2-1/-2 to satisfy it — the state that reproduces the 0x80000003 GPU/renderer init crash 10/10 (electron/electron#51761). Diagnostic only: never writes an ACL, never changes behavior. * fix(crash-reporting): evaluate the ACL signature per target and flag locale risk Three readiness-review findings: - the signature was merged across targets, so a grant on the directory masked its absence on the module file - the exact per-file state the probe exists to detect - the well-known package name check is English-only and icacls localizes it, so a non-English box could false-positive silently; report whether the check could be trusted - the serve-mode test omitted platform, so the gate was never exercised Also switch to the durable recorder (this runs after initObservability, so the span lands in the diagnostics bundle) and correct two comments that misstated where the probe runs.
…crumb (stablyai#15107) * feat(crash-reporting): read-only Windows install-dir DACL probe Records whether the install tree carries an orphan S-1-15-2-* package ACE with no S-1-15-2-1/-2 to satisfy it — the state that reproduces the 0x80000003 GPU/renderer init crash 10/10 (electron/electron#51761). Diagnostic only: never writes an ACL, never changes behavior. * fix(crash-reporting): evaluate the ACL signature per target and flag locale risk Three readiness-review findings: - the signature was merged across targets, so a grant on the directory masked its absence on the module file - the exact per-file state the probe exists to detect - the well-known package name check is English-only and icacls localizes it, so a non-English box could false-positive silently; report whether the check could be trusted - the serve-mode test omitted platform, so the gate was never exercised Also switch to the durable recorder (this runs after initObservability, so the span lands in the diagnostics bundle) and correct two comments that misstated where the probe runs.
…crumb (stablyai#15107) * feat(crash-reporting): read-only Windows install-dir DACL probe Records whether the install tree carries an orphan S-1-15-2-* package ACE with no S-1-15-2-1/-2 to satisfy it — the state that reproduces the 0x80000003 GPU/renderer init crash 10/10 (electron/electron#51761). Diagnostic only: never writes an ACL, never changes behavior. * fix(crash-reporting): evaluate the ACL signature per target and flag locale risk Three readiness-review findings: - the signature was merged across targets, so a grant on the directory masked its absence on the module file - the exact per-file state the probe exists to detect - the well-known package name check is English-only and icacls localizes it, so a non-English box could false-positive silently; report whether the check could be trusted - the serve-mode test omitted platform, so the gate was never exercised Also switch to the durable recorder (this runs after initObservability, so the span lands in the diagnostics bundle) and correct two comments that misstated where the probe runs.
What this adds
On Windows, one read-only
icaclsread at startup that records the install directory's package-ACE shape into the crash-breadcrumb ring.It writes nothing, changes no behavior, and fixes no crash. It is instrumentation for a hypothesis we have not yet confirmed in the field.
191 lines of production code, 6 breadcrumb fields, no changes to any shared subsystem.
Why
Six v1.4.184 crash reports (Windows 11 build 26200) show the GPU and renderer children both dying at process init with
0x80000003, browser process surviving, before any Orca JS runs. A bare0x80000003says only "a child asserted" — these are undiagnosable today.While investigating we reproduced a cause deterministically on the same Windows build:
Corroborated upstream: electron/electron#51761 — "Electron apps crash with exit_code=-2147483645 (GPU process sandbox crash) when zombie SIDs exist in DACL" (open, 30 comments,
has-repro-comment). Upstream attributes the pollution to agentic coding tools' sandboxes leaving orphaned package ACEs on the profile chain, which inherit into%LOCALAPPDATA%\Programs\<app>— Orca's user population.We do not know whether either crashing machine has this precondition. That case rests on one truncated reporter note plus a lab repro. This probe is how we find out.
What it emits
Six fields on a
windows_install_dir_aclbreadcrumb:status,probedTargetCount,orphanPackageSidCount,orphanPackageSids(capped at 3),hasWellKnownPackageGrant,matchesPoisonSignature.It reads two targets — the install directory and one shipped module (
ffmpeg.dlland friends, picked byexistsSync). Both are needed: in the repro an orphan on the directory object alone was harmless, but on the DLLs it was not, so the directory's DACL is not sufficient evidence.Recorded with
recordCrashBreadcrumbinto the retained ring, whichprocess-gone-recorderalready snapshots into every crash report — so it rides along with the next0x80000003with no new plumbing.Fix evidence
An earlier revision of this branch was validated on real Windows 11 26200 hardware. The detection logic is unchanged; these are the arms it was driven through, against real
icaclsoutput:matchesPoisonSignaturefalseS-1-15-2-999-999-999true(reports the SID verbatim)S-1-15-2-2additively, orphan still presentfalseS-1-15-3-*onlyfalse%LOCALAPPDATA%\Programs\orca, read-onlyfalse— no false positiveTwo things that only surfaced on real hardware and are encoded here:
icaclsnever printsS-1-15-2-1/-2in SID form — always the localized friendly name. So orphan detection is pure raw-SID (locale-independent), while the well-known check accepts both forms.icaclsoutput, glued to the echoed path with no separator. A naive echo-strip drops exactly the ACE we are looking for; the parser matches theprincipal:(flags)tail instead.Gates: 471 passed (startup + crash-reporting), typecheck 0, oxlint 0,
check:max-lines-ratchetOK — no new bypasses.ELI5
Windows files have a guest list. Chromium's sandboxed helpers must read Orca's program files to start.
If some other installer scribbles a stale name onto that list, Windows starts checking the list strictly — and Orca's helpers turn out not to be on it. They die instantly and the window never appears. Adding one well-known name back fixes it, without removing the stale one.
We don't know yet whether that's what happened to the people who crashed. So this is a smoke detector, not a fix: Orca takes one quick read-only look at its own guest list and writes down what it saw, so the next crash report answers the question instead of us guessing.
Trade-offs
icaclsspawns per Windows launch. Deferred behindsetImmediate, once per process, one shared 5s budget. Zero spawns and zero fs I/O on macOS/Linux and in serve mode — asserted by a test that fails if either seam is touched.S-1-15-2-<hash>weakly hints at installed software, but it cannot be resolved locally — that is what makes it orphaned — and correlating the same SID across reports is the only thing that would identify the polluting tool. The user SID family (S-1-5-21) is never emitted, nor is the install path.Scope note
An earlier revision of this branch was 1,785 lines across 12 files, including a new observability primitive and edits to the shared crash-breadcrumb store. That was disproportionate to an unconfirmed hypothesis — the product of four adversarial review rounds where every finding was accepted without re-asking whether the whole thing was still the right size.
It has been cut to the minimum that answers the one binary question. Dropped: the tracer-sink-ready gate (the retained ring is the delivery path that matters; the span is a nice-to-have), the breadcrumb-store eviction exemption, install-path classification, a separate field-assembly module, and ~20 parse-introspection fields. Kept: the correctness properties review actually earned — exact (not prefix) matching of the well-known SIDs,
(DENY)/(IO)ACEs not counting as a grant, settling oncloserather thanexit, and the unguarded-throw protection at module scope.What this does not do
No remediation, advisory, or installer change. An install-time
S-1-15-2-2grant (as Chromium's ownset_lpac_aclsdoes) is deferred: it would change the security posture of every install to fix a defect not confirmed on any affected machine, and Chrome itself does not do this either — it grants two narrow capability SIDs. The sequence is: land this, wait for one field report carrying the signature, then decide.