Repository navigation
Description
Operating system: macOS 26.5.2 (25F84), Apple Silicon (Mac15,7)
Orca version: 1.4.137 (com.stablyai.orca)
Bundled watcher: @parcel/watcher 2.5.6 (@parcel/watcher-darwin-arm64)
Short summary
Desktop Orca just hard-crashed the whole app while I had an orchestrator running. Full process kill, not a recoverable JS error. Faulting thread is inside the bundled native file watcher on the FSEvents path:
FSEventsCallback → Watcher::isIgnored → v8::String::MakeExternal → EXC_BREAKPOINT (SIGTRAP)
This looks like the same general crash class as #5377 / #7547 / #8212 (native @parcel/watcher taking down the process), but the stack is different from those. Closest open sibling is probably #6635 on Linux serve, which is still a N-API / watcher-area abort.
I searched for Watcher::isIgnored / MakeExternal / 1.4.137 and did not find an open issue with this exact frame, so filing a fresh one.
What happened
App had been up for a long session (launched ~09:59, crashed ~23:43 local). I was working a monorepo worktree (vinext / soapfish-style, lots of agent/file churn). The orchestrator failed and the whole Orca window disappeared. macOS crash report points at Thread 47, not the main UI thread.
From the report:
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000115445224
Termination Reason: Namespace SIGNAL, Code 5, Trace/BPT trap: 5
Triggered by Thread: 47
Crashed thread:
Thread 47 Crashed:
0 Electron Framework ares_dns_rr_get_ttl + 3155384 (brk 0 / N-API fatal-ish abort)
1 Electron Framework ...
2 Electron Framework v8::internal::ThreadIsolation::JitPageReference::AllocationContaining...
3 Electron Framework uv_handle_set_data + ...
4 Electron Framework ...
5 Electron Framework v8::String::MakeExternal(v8::String::ExternalStringResource*)
6 watcher.node Watcher::isIgnored(std::string) + 1060
7 watcher.node FSEventsCallback(...) + 608
8 FSEvents implementation_callback_rpc
...
18 watcher.node FSEventsBackend::start()
There's also a separate watcher debounce thread idle at the time:
Thread 46:
Debounce::loop() (watcher.node)
Binary path for the native module in the crash:
/Applications/Orca.app/Contents/Resources/node_modules/@parcel/watcher-darwin-arm64/watcher.node
Notes from the installed build
I peeked at the bundle after the crash:
@parcel/watcherand@parcel/watcher-darwin-arm64are both 2.5.6- There is a
parcel-watcher-process-entry.jschild-process helper with a canary restart (process.exit(2)if events stop delivering) - Despite that isolation, this crash still took down the main Orca process with
watcher.nodeloaded in-process on the FSEvents callback path
So even if the out-of-process watcher is supposed to own native subscriptions, something is still ending up calling into Watcher::isIgnored from the FSEvents thread in a way that can abort Electron/V8.
Related issues
- [Bug]: Main-process crash in native file watcher (watcher.node Watcher::findCallback / napi_strict_equals; worker-teardown napi_fatal_error) — 3x in one day on macOS 1.4.68 #5377 (closed) — macOS 1.4.68 main-process crash in
Watcher::findCallback/napi_strict_equals+ worker-teardownnapi_fatal_error - [Bug]: Windows main-process crash in native file watcher (watcher.node, 0xc0000409 fail-fast) — 5x in 25 min on 1.4.116; third platform for the #5377 crash class #7547 (closed) — Windows 1.4.116
watcher.nodefail-fast, called out as third platform for [Bug]: Main-process crash in native file watcher (watcher.node Watcher::findCallback / napi_strict_equals; worker-teardown napi_fatal_error) — 3x in one day on macOS 1.4.68 #5377 - orca serve exits with SIGSEGV after FSEvents 'Events were dropped' under multiple concurrent agent worktrees #8212 (closed) — macOS 1.4.131
orca serveSIGSEGV after FSEvents "Events were dropped" under multiple concurrent agent worktrees - [Bug]: Headless 'orca serve' SIGABRT — uncaught Napi::Error (empty what()) tears down all agent terminals [Linux/WSL2, 1.4.97] #6635 (open) — Linux/WSL2 headless serve SIGABRT from uncaught
Napi::Errorduring watcher/N-API teardown - 100% CPU in bundled @parcel/watcher (InotifyBackend::handleEvents) with many/large workspaces #8112 (closed) — 100% CPU in
@parcel/watcherunder many/large workspaces (not a crash, same subsystem under load)
If #5377 is considered fixed for the findCallback path, this looks like a remaining (or regressed) variant on the FSEvents ignore path.
How to reproduce
Not a hard repro yet. In my case:
- Open Orca desktop 1.4.137 on macOS Apple Silicon
- Work in a large monorepo with active agents / orchestrator
- Leave it running for a long session with normal git + agent filesystem churn
- Eventually the app just dies; crash report shows
Watcher::isIgnoredon the FSEvents thread
Happy to grab more logs or try a debug build if useful. Full macOS Translated Report available if someone wants the complete dump.
Activity
Jinwoo-H commentedon Jul 15, 2026
Thanks for the detailed report — the crash report pointers made this one tractable. We dug into this and can explain what happened.
Root cause
This is a native lifetime defect in
@parcel/watcher2.5.6: its process-global shared state (the watcher registry, shared FSEvents backend, and directory tree) holds per-environment N-API references without lifetime guards. When a Node environment that subscribed goes away while the shared backend is live, the FSEvents callback thread and subscribe/teardown paths can touch freed or stale state.We reproduced this deterministically against the exact bundled
watcher.node(2.5.6, darwin-arm64) — no mocks, real addon:worker_threadsworker callssubscribe()(FSEvents backend) and exits without unsubscribing; the nextsubscribe()from another thread crashes the process. 20/20 runs, ~350ms to crash, under both Node and Electron.Watcher::findCallback/napi_strict_equals,Watcher::triggerCallbacks→ dead threadsafe-function abort,FSEventsCallback→DirTree::removeUAF — and SIGTRAP/EXC_BREAKPOINTlike yours. YourFSEventsCallback → Watcher::isIgnoredframe is the same family: the FSEvents callback thread reading watcher state that another environment's teardown freed.Why it hit you on 1.4.137, and why the helper didn't save you
You correctly spotted
parcel-watcher-process-entry.jsin your bundle — in 1.4.137 that isolation covered the explorer watches, but the runtime file watches still ran onworker_threadsinside the main process and imported@parcel/watcherdirectly. Native addon state is process-wide, so those worker subscriptions shared one FSEvents backend with the main process; a worker teardown race could (and did) take down the whole app. Long sessions with heavy agent/worktree churn — exactly your setup — maximize those teardown/resubscribe cycles.This was fixed in v1.4.138 (#8370): runtime file watches were moved out of the main process into crash-contained forked watcher processes. We validated the containment on the current build, including real native watcher crashes on macOS being absorbed by the child process with automatic resubscribe — the app survives.
What to do
Please upgrade to v1.4.138 or later (current is v1.4.139). We're closing this as fixed by that containment; if you ever see a crash on ≥1.4.138 where the main Orca process dies with
watcher.nodeon the faulting thread, please reopen with the crash report — we'd want to see it immediately.Two follow-ups we're tracking separately: reporting the underlying lifetime defect upstream with our minimal repro, and hardening one remaining narrow in-process subscription (a small per-repo
.git/worktreeswatch) as defense-in-depth.bbingz commentedon Jul 16, 2026
Reproduced again on Orca 1.4.143 (macOS 27.0 / build 26A5378n, Apple Silicon), so the v1.4.138 containment did not fully close this crash path.
At 2026-07-16 10:49 UTC+8, the desktop main process died during normal linked-worktree use. This was not a user quit, external signal, or OOM. Sanitized crash evidence:
EXC_BREAKPOINT (SIGTRAP), termination signal 5, deliberatebrk #0@parcel/watcher2.5.6 (watcher.node)Watcher::isIgnored(std::string) + 1060FSEventsCallback(...) + 6080x540d224operator deletewas freeing a heap-backed temporary string; the recorded slot size was 480 bytesThis matches the original #8479 report at both the watcher-symbol and Electron image-offset levels.
The remaining containment gap appears to be the narrow macOS Git-common watch. In v1.4.143,
worktree-git-common-watch.tsstill imports@parcel/watcherdirectly and subscribes to the Git common directory'sworktreessubtree in the Electron main process, bypassing the forked watcher supervisor. This is the remaining narrow in-process subscription mentioned in the closing comment. The explorer/runtime watcher paths are isolated, but a native failure in this path can still loadwatcher.nodeinto Electron main and terminate the entire GUI.Normal Git status churn was present immediately before the crash and can produce FSEvents beneath the watched Git worktree-metadata directory. That is a plausible trigger, not proof of the first corrupting write: the allocator detected the corruption later during cleanup inside
isIgnored, so the report alone cannot distinguish a use-after-free, double free, or adjacent overflow.Please reopen this as a regression on a version newer than 1.4.138. The containment fix would be to route the macOS Git-common narrow watch through the existing forked watcher supervisor (or use a polling fallback), with a linked-worktree metadata-churn fault-containment regression test.
I can provide a further-sanitized full
.ipsreport if useful.bbingz commentedon Jul 16, 2026
Sanitized full crash report for the Orca 1.4.143 recurrence:
.ips.txt919768716021d934d140a2fe9934272e9fcc67d6f3624d5e598d2d17a7b3bbd0Redacted: unique device, user, process, session, incident, and local-workspace identifiers. Retained for symbolication: all thread stacks, the faulting thread's registers, instruction bytes, binary image UUIDs/addresses, and system/app/Electron versions.