Skip to content

feat(crash-reporting): read-only Windows install-dir DACL probe breadcrumb - #15107

Merged
nwparker merged 2 commits into
mainfrom
nwparker/win-install-dir-acl-probe
Aug 18, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/win-install-dir-acl-probe

Conversation

@nwparker

@nwparker nwparker commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​222 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​222
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​208 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​208

What this adds

On Windows, one read-only icacls read 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 bare 0x80000003 says only "a child asserted" — these are undiagnosable today.

While investigating we reproduced a cause deterministically on the same Windows build:

If the install tree carries an orphan / unresolvable S-1-15-2-* package ACE and neither S-1-15-2-1 nor S-1-15-2-2 is present to satisfy it, a healthy Electron 43.1.0 install flips to 10/10 launches crashing with exactly that signature. An additive icacls /grant *S-1-15-2-2:(OI)(CI)(RX) clears it — even when the orphan is inherited from a parent directory. An orphan capability SID (S-1-15-3-*) is harmless.

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_acl breadcrumb: status, probedTargetCount, orphanPackageSidCount, orphanPackageSids (capped at 3), hasWellKnownPackageGrant, matchesPoisonSignature.

It reads two targets — the install directory and one shipped module (ffmpeg.dll and friends, picked by existsSync). 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 recordCrashBreadcrumb into the retained ring, which process-gone-recorder already snapshots into every crash report — so it rides along with the next 0x80000003 with 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 icacls output:

Scratch-tree arm matchesPoisonSignature
clean false
+ orphan S-1-15-2-999-999-999 true (reports the SID verbatim)
+ S-1-15-2-2 additively, orphan still present false
orphan capability SID S-1-15-3-* only false
real %LOCALAPPDATA%\Programs\orca, read-only false — no false positive

Two things that only surfaced on real hardware and are encoded here:

  • icacls never prints S-1-15-2-1/-2 in SID form — always the localized friendly name. So orphan detection is pure raw-SID (locale-independent), while the well-known check accepts both forms.
  • The orphan ACE lands on line 1 of icacls output, glued to the echoed path with no separator. A naive echo-strip drops exactly the ACE we are looking for; the parser matches the principal:(flags) tail instead.

Gates: 471 passed (startup + crash-reporting), typecheck 0, oxlint 0, check:max-lines-ratchet OK — 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

  1. Two extra icacls spawns per Windows launch. Deferred behind setImmediate, 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.
  2. Raw orphan SIDs are recorded (capped at 3, sanitized). An 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.
  3. It fixes nothing. If the theory is right, affected users keep crashing until a remediation ships. This deliberately stops at evidence.

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 on close rather than exit, 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-2 grant (as Chromium's own set_lpac_acls does) 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.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9ec39a26-7d0b-49b1-89dc-ffb0c93b4b09

📥 Commits

Reviewing files that changed from the base of the PR and between 0289d72 and 064de66.

📒 Files selected for processing (2)
  • src/main/startup/windows-install-dir-acl-probe.test.ts
  • src/main/startup/windows-install-dir-acl-probe.ts

📝 Walkthrough

Walkthrough

Adds a Windows-only, read-only ACL diagnostic for the install directory and a representative module file. The probe invokes icacls within a shared five-second budget, classifies package SIDs, records sanitized breadcrumb data, reports unreadable targets, and runs once per process. Startup invokes the probe with serve-mode context. Tests cover ACL verdicts, target arguments, failures, platform and serve-mode guards, and duplicate suppression.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 34.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description gives detailed context, implementation scope, risks, and validation, but it omits many required template sections and the required linked issue. Add the required Linked Issue, Visual Proof, Testing, AI Disclosure, Review, boundary, Notes, Checklist, and Author sections, and complete each applicable item.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: a read-only Windows install-directory DACL probe that records crash-reporting breadcrumbs.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.
@nwparker
nwparker force-pushed the nwparker/win-install-dir-acl-probe branch from 62e0b3c to 0289d72 Compare August 17, 2026 23:15
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/main/startup/windows-install-dir-acl-probe.ts (1)

11-21: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Reduce 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

📥 Commits

Reviewing files that changed from the base of the PR and between 8cd3383 and 0289d72.

📒 Files selected for processing (3)
  • src/main/index.ts
  • src/main/startup/windows-install-dir-acl-probe.test.ts
  • src/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.
@nwparker
nwparker merged commit 9a41119 into main Aug 18, 2026
43 of 44 checks passed
paidaxingyo666 pushed a commit to paidaxingyo666/Manta that referenced this pull request Aug 21, 2026
…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.
dallascrilley pushed a commit to dallascrilley/orca that referenced this pull request Aug 27, 2026
…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.
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…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.
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