Skip to content

fix(linux): launch the AppImage terminal daemon through its own mount - #23457

Closed
sergeytiron wants to merge 5 commits into
stablyai:mainfrom
sergeytiron:sergeytiron/fix-linux-appimage-daemon-own-mount
Closed

sergeytiron wants to merge 5 commits into
stablyai:mainfrom
sergeytiron:sergeytiron/fix-linux-appimage-daemon-own-mount

Conversation

@sergeytiron

@sergeytiron sergeytiron commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Orca runs every terminal inside a background helper, the terminal daemon. That helper is designed to keep running after you close the window, so your shells and agents are still there when you reopen Orca.

On Linux, when Orca is installed as an AppImage, all of Orca's files (including the daemon's program code) live on a temporary virtual disk. That disk exists only as long as the Orca window that created it. Once the window closed, or you logged out, the disk went away while the daemon kept running. The next time the daemon needed a piece of its own code that wasn't already in memory, it crashed, and every terminal and agent in it died, sometimes hours later.

With this change the daemon is started from the .AppImage file itself, so it gets its own virtual disk that lasts exactly as long as the daemon does.

What Changed

Before: in an AppImage, closing the Orca window (or logging out) left the terminal daemon running from a mount that no longer existed. It could keep going for minutes or hours, then die with SIGBUS as soon as memory pressure or new work needed code that wasn't resident. That killed every terminal and agent session. Reopening Orca after that could not recover the sessions.

After: the daemon survives window close, memory pressure and relaunch. The next window adopts it, the old terminals are restored with their scrollback, and new terminals work.

Mechanism. This only applies to a validated AppImage (resolveAppImageRuntimeIdentity) whose files are on a FUSE mount (checked in /proc/self/mountinfo). The daemon is spawned as $APPIMAGE -e <bootstrap> -- <daemon args> --no-sandbox instead of $APPDIR/orca-ide <entry> <args>. This works both inside the existing systemd-run --user --scope and on the plain-spawn path used when systemd isn't available.

  • Own mount. The AppImage runtime mounts its own copy of the files. It forks its mount server inside the daemon's scope, and the mount is released when the daemon exits.
  • Bootstrap. The parent can't know the new mount path in advance, so a small -e bootstrap finds daemon-entry.js relative to the APPDIR the child runtime exports.
  • Version check. The bootstrap exits if the file at $APPIMAGE is now a different release (for example, after a manual replace).
  • Trailing --no-sandbox. AppRun inserts --no-sandbox in front of the script when unprivileged user namespaces are blocked (Ubuntu 24.04+), and Node rejects it as a bad option. Passing it last stops AppRun from adding it.
  • Environment cleanup. The window's mount entries are removed from PATH/LD_LIBRARY_PATH, and APPIMAGE/APPDIR/ARGV0/OWD are dropped, reusing removeAppImageRuntimeEnv. The daemon maps nothing from the window's mount.
  • Fallback. If the AppImage launch fails for any reason (file missing, different version, FUSE refused), the daemon is launched the old way, with the existing scoped-then-unscoped retry. The AppImage attempt uses its own launch nonce, so its systemd scope unit can never collide with the retry's unit while a failed attempt's mount server is still exiting.

Unchanged: deb/rpm/tarball/dev builds, Windows, macOS, AppImages started with APPIMAGE_EXTRACT_AND_RUN, and systems without FUSE.

Not covered: helper processes that crash as the app quits, and orca serve. The main process's chrome_crashpad_handler still runs from the window's mount and can outlive it. That is handled by a separate crashpad PR, #23459 (fixes #22542).

Why

The other option considered was copying the runtime out of the mount to ~/.cache/orca/daemon-host/<profile>/<version> and running the daemon from there, reusing the Windows daemon-host relocation (#17865).

Costs of the copy approach:

  • Disk: about 235 MB per version per profile.
  • Extra machinery: pruning old copies, per-profile directories, a probe and fallback for a noexec cache, retry logic, and stripping the loader path.
  • Code: roughly twice the code, plus a reference doc.

Launching through the AppImage file instead:

  • Disk: costs nothing.
  • Machinery: nothing to prune or keep in sync.
  • Auto-update: survives it without extra work. The updater replaces the file with unlink + rename, and the daemon's runtime keeps an open handle on the old file, so the running daemon never notices.
  • Failure mode: any failure falls back to exactly today's behavior.

Remaining costs:

  • Per daemon: one extra FUSE mount and server process, a few MB.
  • Startup: a slightly slower daemon start, from the mount plus the bash AppRun.
  • Dependency: relying on AppRun's argument handling, guarded by the version check and the fallback.

Linked Issue

Part of #18200 (the daemon part; helper processes crashing at quit and orca serve are not covered here).

Visual Proof

N/A: no UI change. The difference is whether terminals survive closing the window, which the VM matrix below checks.

Testing

I built test AppImages from this branch and ran them on two VMs, one at a time. This Fedora 44 host compiles node-pty against GLIBC_2.42, which fails the glibc-floor gate. So the test builds used the node-pty binaries from the official v1.4.214 release (same Electron and node-pty versions), repackaged with electron-builder --prepackaged.

Each run:

  1. Opens a terminal running a tick loop.
  2. Quits.
  3. Forces page eviction. Without eviction the bug hides, because the daemon's pages are still in memory.
  4. Checks the daemon and the shell, then relaunches and checks adoption.
Case Official v1.4.214 This PR
Ubuntu 26.04, GNOME Wayland, systemd scope, SIGTERM quit + cgroup eviction daemon dead, shell stopped, sessions lost daemon alive, shell ticking, same daemon adopted, old terminal restored, new terminal works
Ubuntu 26.04, direct spawn (systemd-run made unavailable) — all pass
Ubuntu 26.04, AppImage replaced on disk (cp + mv -f, like the updater) while the daemon runs, then eviction + relaunch — all pass
Ubuntu 26.04, APPIMAGE_EXTRACT_AND_RUN=1 — falls back to today's launch; terminal works; daemon alive after quit + eviction
Ubuntu 26.04, forced fallback (file swapped for a build reporting 1.4.299, daemon killed) — log shows AppImage is 1.4.299, expected 1.4.214, then the retry from the current mount starts in its own scope unit; new terminal works
Ubuntu 26.04, AppImage attempt killed mid-startup — the failed scope unit was still alive when the retry started in a differently named unit; no collision, retry works
Ubuntu 20.04, X11, real window close + memory-pressure eviction daemon dead all pass

In every run of this PR, the daemon's /proc/<pid>/maps contains nothing from the window's mount.

Logout isn't scriptable on the test VMs. Tearing down GNOME Shell and the window's app-orca-*.scope leaves the daemon's own orca-daemon-*.scope, which holds both the daemon and its mount server. Stopping the whole user manager stops both together.

Local checks:

  • pnpm tc:node, tc:cli, tc:web
  • the changed-file tests, plus the daemon-init*, daemon-entry* and appimage-terminal-env tests
  • oxlint
  • check:code-quality:changed

New tests:

  • daemon-appimage-launch.test.ts: resolution rules, environment cleanup, and running the real bootstrap under Node, including the version-mismatch exit.

  • The spawn test covers the scoped and direct AppImage paths.

  • The identity test covers the fallback and checks that the AppImage attempt's scope nonce differs from the retry's.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

AI Disclosure

Implemented, VM-tested and written with Claude Code (Claude Opus 5.5), directed and reviewed by me.

Review

AI review: Codex (GPT-6 Sol, high), Claude Code /code-review high, CodeRabbit, Pullfrog.

  • Cross-platform: gated to a validated Linux AppImage; macOS, Windows, deb/rpm/tarball and extract-and-run are unchanged.
  • SSH/remote: no protocol change; remote hosts go through the same launcher rules.
  • Agents/integrations: no agent-specific code; agent terminals now survive quit, which is the fix.
  • Performance: one mountinfo/AppImage check per daemon launch; one extra FUSE process (a few MB) per daemon.
  • UI: none.
  • Security: no new privileges; only the validated $APPIMAGE is run, and the -e script contains only JSON-encoded values.
  • Findings fixed after opening: a retry could start beside a child whose cleanup failed (CodeRabbit, beeaea4); the AppImage daemon's recorded identity changed on every launch (Pullfrog, a07406e). Earlier review findings were fixed before opening.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Security: no new privileges. The spawned program is the already-validated $APPIMAGE, and the -e script contains only JSON-encoded paths and a version string.
  • Cross-platform: Linux AppImage only; every other package and platform takes the unchanged path.
  • SSH: remote hosts launch their own local daemon through the same code, and the same rules apply.
  • Backwards compatibility: the protocol is unchanged. A daemon started by an older version is still adopted or replaced by the existing rules.
  • Performance: a one-time check of /proc/self/mountinfo and the AppImage file per daemon launch.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred). I ran each typecheck project, the relevant tests and oxlint locally; the full suite and the release build are left to CI, because the local build fails the glibc gate on this host.

🤖 Generated with Claude Code

In an AppImage the daemon ran from the window's FUSE mount, which the
runtime unmounts when the window exits or the session ends; the surviving
daemon then SIGBUSed on its next cold page and took every terminal with it.
Launch it through $APPIMAGE instead so it gets its own runtime and mount,
scoped with the daemon, falling back to the in-mount launch on failure.

Part of stablyai#18200

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

We couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting @coderabbitai full review.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 45982f59-e27e-4873-bb97-e59b88804ca8


📥 Commits

Reviewing files that changed from the base of the PR and between beeaea4 and a07406e.


📒 Files selected for processing (6)
  • src/main/daemon/daemon-appimage-launch.ts
  • src/main/daemon/daemon-launched-child-spawn.test.ts
  • src/main/daemon/daemon-launched-child-spawn.ts
  • src/main/daemon/daemon-launched-child.ts
  • src/main/daemon/daemon-out-of-process-launcher-identity.test.ts
  • src/main/daemon/daemon-out-of-process-launcher.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.



📝 Walkthrough

Walkthrough

The change adds AppImage daemon launch resolution, command construction, and bootstrap version checks. The launcher uses this path when no relocated daemon host is available. Daemon spawning supports scoped and unscoped AppImage commands. Eligible failed AppImage attempts retry from the current mount. PID-file cleanup uses the launched child’s PID and launch nonce.


Priority: ⬇️ Low

Merge Risk | ⚪ Minimal · up to a0740

Merge Risk: ⚪ Minimal · up to a0740

The change enables FUSE-mounted AppImage daemons to use their own mount, with fallback to the current mount. The inspected launch, version-check, and retry behavior reveals no concrete merge-blocking issue; it is ready to merge after normal checks.

Security Architecture Review

Security architecture risk: 🔵 Low · up to a0740

The change is limited to the local Linux terminal daemon and adds checks before using an AppImage. No new security exposure was established. A failed AppImage launch can still fall back to the older, window-dependent launch path, and the packaged launch has not been validated by the available tests.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The independently affected scope is the launching user's local daemon, its terminal and agent sessions, and their endpoint and PID record. The inspected launch path does not show a new cross-user, tenant, or network entrypoint.

Trust Boundaries and Controls

  • observed — The process environment supplies the proposed AppImage location, but runtime identity and mount checks gate its use. Startup adoption compares the endpoint's reported process identity with the launched identity, and PID-file removal is conditioned on process identity and launch nonce.

Resilience and Maintainability Implications

  • inferred — The fresh AppImage-attempt nonce and nonce-matched cleanup reduce cross-attempt PID ownership mistakes. A confirmed cleanup failure prevents retry, while the deliberate in-mount fallback retains the previous daemon-lifetime limitation if own-mount startup fails.

Hardening Proposals

  • proposed — Validate the complete packaged AppRun launch and a forced AppImage-failure, fallback, window-close, and relaunch sequence; the available bootstrap test invokes the generated arguments with Node rather than the packaged AppImage.

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning Issue [#22542] is an active directly linked issue. It requires a coding fix for the detached chrome_crashpad_handler so it does not execute from an AppImage mount after unmount. The reviewed changes… Implement and test the [#22542] crashpad-handler fix in this pull request, or remove the direct link to [#22542] if that issue is not a target.
Out of Scope Changes check ⚠️ Warning The changed daemon-launch implementation and related tests address durable terminal-daemon execution. The directly linked issue [#22542] concerns the unrelated chrome_crashpad_handler AppImage unmou… Limit this pull request to the [#22542] crashpad-handler fix, or link the daemon-launch work to an active issue that defines its requirements and remove [#22542] as the direct target.
Docstring Coverage ⚠️ Warning Docstring coverage is 31.25% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 8 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: launching the Linux AppImage terminal daemon through its own mount.
Description check ✅ Passed The description is complete and relevant. It covers the user impact, mechanism, rationale, fallback behavior, scope, testing, review considerations, linked issue, and checklist status. It also explain…

Full details: Linked Issues check

Explanation

Issue [#22542] is an active directly linked issue. It requires a coding fix for the detached chrome_crashpad_handler so it does not execute from an AppImage mount after unmount. The reviewed changes implement terminal-daemon launch resolution, durable daemon identity, fallback behavior, and tests. They do not terminate or relocate chrome_crashpad_handler. A separate pull request reference does not establish that this fix is present.


Full details: Out of Scope Changes check

Explanation

The changed daemon-launch implementation and related tests address durable terminal-daemon execution. The directly linked issue [#22542] concerns the unrelated chrome_crashpad_handler AppImage unmount race. The summary also states that helper-process changes are outside this change's scope. Therefore, the reviewed daemon changes are not within the coding scope established by the linked issue.



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

@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


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 6a1f3480-58a7-4ef5-be0b-97d441dd2c63

📥 Commits

Reviewing files that changed from the base of the PR and between 484598b and fa1aefb.

📒 Files selected for processing (7)
  • src/main/daemon/daemon-appimage-launch.test.ts
  • src/main/daemon/daemon-appimage-launch.ts
  • src/main/daemon/daemon-launched-child-identity.test.ts
  • src/main/daemon/daemon-launched-child-spawn.test.ts
  • src/main/daemon/daemon-launched-child-spawn.ts
  • src/main/daemon/daemon-launched-child.ts
  • src/main/daemon/daemon-out-of-process-launcher.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@pullfrog pullfrog 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.

ℹ️ No critical issues — prior feedback addressed; one design gap worth a look.

Reviewed changes

  • Own-mount AppImage daemon launch — new daemon-appimage-launch.ts resolves a validated FUSE-mounted AppImage launch and builds $APPIMAGE -e <bootstrap> -- <daemon args> --no-sandbox, scrubbing the parent mount from the child env.
  • Bootstrap + version guard — the inline -e script resolves daemon-entry.js against the child's exported APPDIR and exits when the file at $APPIMAGE is a different release.
  • Spawn wiring — the new appImage option routes the direct path through spawnProcess and wraps the AppImage command in the durable scope when available.
  • Fallback + nonce isolation — launchDaemonChild uses a fresh scope nonce per AppImage attempt and falls back to the in-mount launch on any retryable failure.
  • Cleanup-failure guard — DaemonStartupCleanupError (extends AggregateError) is now non-retryable in both the AppImage fallback and the scoped→unscoped retry, resolving the earlier CodeRabbit thread.
  • Pid-record unlink now uses launched.identity.launchNonce, matching the nonce the daemon actually published.

ℹ️ The AppImage daemon records the window's ephemeral mount as its identity

The daemon still takes --entry-path (and --spawner-exec-path) from the launching window, whose AppImage mount path is a fresh mkdtemp mount on every launch. Now that the fix lets a daemon survive a window close, the next window's getDaemonLaunchIdentity compares a new mount against the recorded old one and always reports mismatch, so clean adoption depends entirely on the live-session probe and a daemon with no live sessions is replaced (billed to different_app_path). The live-session guard prevents session loss, so this is not a blocker — flagging it because the recorded identity never matches for AppImage.

Technical details
# AppImage daemon identity is ephemeral

`AppImage` type-2 mounts are `mkdtemp`-unique per run (`/tmp/.mount_<name>XXXXXX`), so an
`entryPath` captured from `getDaemonEntryPath()` cannot identify a release across launches.

## Affected sites
- `src/main/daemon/daemon-out-of-process-launcher.ts:120-139` — passes the window's `entryPath` into the AppImage resolution and into `launchDaemonChild`.
- `src/main/daemon/daemon-launched-child-spawn.ts:22-42` — `--entry-path` is `options.entryPath` (parent mount); `--spawner-exec-path` is the parent's `process.execPath` (also the parent mount).
- `src/main/daemon/daemon-pid-identity.ts:119-121` — `parsedPid.entryPath === expectedEntryPath ? 'match' : 'mismatch'`.
- `src/main/daemon/daemon-replacement-preflight.ts:93-128` — `mismatch` routes to replace unless `shouldPreserveDaemonWithLiveSessions` finds sessions.
- `daemon-tcc-attribution.ts`/`readDaemonOwnerMetadata` consume `spawnerExecPath` only on macOS/telemetry, so no Linux runtime fallout.

## Required outcome
- For a FUSE-mounted AppImage, the daemon should record an identity that is stable across launches (for example `$APPIMAGE`, or version-only) so `getDaemonLaunchIdentity` can return `match` for the surviving daemon instead of leaning on the live-session probe on every relaunch.

## Open questions for the human
- Is deferring to `shouldPreserveDaemonWithLiveSessions` on every AppImage relaunch intended, or should the AppImage path record the stable `$APPIMAGE` path?

ℹ️ Nitpicks

  • The JSDoc on launchDaemonChildInEitherScope says a scoped attempt "fails for any reason but a lost endpoint race [and] retries once, unscoped"; since beeaea4 a DaemonStartupCleanupError is also non-retryable. Consider updating the wording so the comment matches isRetryableLaunchFailure.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Each AppImage launch mounts at a fresh random dir, so a daemon that now
survives its window recorded an entry path the next window could never
match, and an idle survivor was replaced as 'different app path'. Record
and compare $APPIMAGE plus the in-image entry path instead; a new
release at the same path is still caught by the app-version check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sergeytiron

Copy link
Copy Markdown
Contributor Author

@pullfrog, thanks. Both items are addressed in a07406e.

1. Unstable identity: confirmed and fixed. You were right. getDaemonLaunchIdentity compared the pid record's entryPath with the new window's mount path. Every AppImage launch mounts at a fresh random directory, so a surviving daemon always came back as mismatch. With live sessions it was kept, but only because of the live-session check. With no sessions it was replaced and counted as different_app_path.

The own-mount daemon now records a path built from the AppImage file ($APPIMAGE joined with the entry's path inside the image, e.g. /apps/Orca.AppImage/resources/app.asar.unpacked/out/main/daemon-entry.js). The launcher resolves the AppImage launch before the replacement preflight and compares against that same value. This matches how the Windows relocation already works: the recorded identity is the stable install path, not the path the daemon actually runs from.

  • Same $APPIMAGE path, new release: the pid record's appVersion gets a different value, so isDaemonStaleForCurrentBundle still marks it stale. The daemon is replaced when it has no live sessions and kept when it does, the same as any packaged update. The only case that could still match wrongly is two different builds with the same version number at the same path, which only happens in local builds.
  • In-mount fallback daemon: if the AppImage launch fails and the in-mount launch is used, that daemon still records the window's mount path. So the next window sees mismatch and replaces it when idle. That is deliberate: that daemon dies once its window's mount goes away, so it should not be adopted as if it were durable.
  • --spawner-exec-path: left as the window's process.execPath, which is the process that really launched the daemon. It is only read by macOS attribution and telemetry.

Tests: spawn tests check which --entry-path the AppImage launch and the fallback each record. A new daemon-out-of-process-launcher-identity.test.ts checks that the preflight compares against the AppImage-based identity, and against the plain entry path when there is no AppImage.

2. JSDoc: fixed. The launchDaemonChildInEitherScope comment now names both cases that are never retried (a lost endpoint race and DaemonStartupCleanupError) and points to isRetryableLaunchFailure.

Checks: tc:node and oxlint are clean. The changed daemon tests (21) and daemon-init* (84) pass.

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

Delta since the prior pullfrog review (beeaea4): one commit, a07406e, giving an own-mount AppImage daemon a stable recorded identity.

  • Stable AppImage daemon identity — new appImageDaemonIdentityPath() returns join($APPIMAGE, entryPathInAppDir). Both --entry-path and the launcher's preflight now record this stable path instead of the window's ephemeral mkdtemp mount, so getDaemonLaunchIdentity can return match for a surviving own-mount daemon rather than leaning on the live-session guard. The release is still swapped via the recorded --app-version.
  • Launcher wiring — createOutOfProcessLauncher resolves the AppImage launch once up front and reuses the single getAppEnvironment() read; the relocated-host path is unchanged.
  • Tests — new daemon-out-of-process-launcher-identity.test.ts covers the identity path for an AppImage and the unchanged entry path elsewhere; spawn tests cover the recorded identity for both the AppImage and in-mount paths.
  • Doc fix — the launchDaemonChildInEitherScope JSDoc now states that a DaemonStartupCleanupError is not retried, matching isRetryableLaunchFailure.

Verified locally: the four focused suites pass (21 tests).

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

  • Stable own-mount identity — new appImageDaemonIdentityPath records $APPIMAGE joined with the entry's in-image path as the daemon's --entry-path, so a surviving own-mount daemon is no longer keyed on a per-launch mount path.
  • Preflight alignment — the launcher resolves the AppImage launch before prepareDaemonReplacement and passes that same identity path, so getDaemonLaunchIdentity can return match instead of always mismatch.
  • Launch gating preserved — the launch-time appImage option is still suppressed when a relocated host exists, and the original in-mount entryPath still backs forkEntryPath.
  • JSDoc — launchDaemonChildInEitherScope now names both non-retryable cases (lost endpoint race and DaemonStartupCleanupError) and points at isRetryableLaunchFailure.
  • Tests — added preflight identity coverage and --entry-path assertions for the AppImage and in-mount spawn paths.

Both items from the prior review are addressed. I traced the version path: a new release at the same $APPIMAGE still trips isDaemonStaleForCurrentBundle via the recorded --app-version, and the in-mount fallback deliberately keeps the mount identity so the next window replaces it when idle. The new tests would fail against the pre-fix code (the expected identity would be the mount path), and the changed daemon suites (21) plus daemon-init* (84) pass locally.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@sergeytiron

Copy link
Copy Markdown
Contributor Author

@nwparker since you're assigned #18200, this is the daemon part of it. Bot reviews are addressed and it's VM-tested. Could you approve the workflow runs when you get a chance?

@OrcaWin

OrcaWin commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

Thank you so much for this, @sergeytiron, and for the careful real-host testing. To save you another round, we brought it up to date with main in #27435, keeping all your commits and authorship. We added one small commit: the cleanup-failure retry veto now applies only to the AppImage attempt, so the existing non-AppImage Linux retry stays as it was. We'll land it from there, so I'm closing this one in favour of #27435. Your crashpad fix (#23459) is merged too. Thanks again!

@OrcaWin OrcaWin closed this Oct 11, 2026
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.

chrome_crashpad_handler crashes with SIGBUS (BUS_ADRERR) on app exit — AppImage squashfs unmount race

2 participants