You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Linux AppImage 1.4.148 — every CLI subcommand (incl. --version) SIGSEGVs in uv_close(); GUI mode unaffected #13719
Headless server, no desktop session. Xvfb :102 provides the display.
Also reproduced on kernel 7.0.0-28-generic before an unrelated reboot, so this is not kernel-version specific.
Summary
Every CLI subcommand of the Linux AppImage crashes with SIGSEGV (exit 139) inside uv_close().
This includes --version, which does no real work at all, so it is not workload- or watcher-related.
The GUI mode of the same binary runs fine on the same machine at the same time, which makes this
look like a CLI-path-only teardown bug rather than a broken environment.
Reproduction
Minimal, 100% reproducible (4/4 runs):
./orca-ide --no-sandbox --disable-gpu --version
# exit 139 (SIGSEGV), no version printed
./orca-ide --no-sandbox --disable-gpu serve --pairing-address <host># exit 139 (SIGSEGV), no pairing URL printed, no port opened
Meanwhile, on the same host and at the same moment:
Thread 1 "orca-ide" received signal SIGSEGV, Segmentation fault.
0x00005555592e7b35 in uv_close ()
#0 0x00005555592e7b35 in uv_close ()
#1 0x000055555ab20ecd in ?? ()
...
=> 0x5555592e7b35 <uv_close+37>: mov 0x168(%rax),%rcx
0x5555592e7b3c <uv_close+44>: mov %rcx,0x50(%rbx)
rip 0x5555592e7b35 <uv_close+37>
The faulting instruction reads handle->loop at offset 0x168 from %rax; %rax is not a valid
handle, i.e. uv_close() is called on an uninitialized or already-freed handle during teardown.
Kernel log shows the same fault at a constant binary offset on every run:
traps: orca-ide[...] general protection fault ip:...b35 ... in orca-ide[3d92b35,...+9ad3000]
Things ruled out
Each of these was tested and made no difference (still exit 139):
Running the extracted binary directly instead of the AppImage (FUSE mount not involved)
Real PTY vs. redirected stdio
kernel.apparmor_restrict_unprivileged_userns=0
Missing shared libraries (ldd reports none)
libuv in general is healthy on this host: Node 24.19.0 creates and closes TCP/fs-watch handles without issue.
Impact
orca serve is the documented way to expose a remote Orca runtime
(the UI itself suggests orca serve --pairing-address <host>), so on this platform remote pairing
via the CLI is impossible: the process dies before printing the orca://pair?code=... URL and
before binding a port.
Workaround
Running the GUI under Xvfb instead of serve produces a working runtime. The listening port
can be pinned by writing ~/.config/orca/mobile-ws-fallback-port.json:
{"port": 6769}
after which ~/.config/orca/orca-runtime.json reports ws://0.0.0.0:6769 and a remote client on the
same tailnet can reach it. This is what we ended up doing, but it bypasses the intended serve + pairing-code flow entirely.
Related
Possibly the same crash class as #8212 (orca serve SIGSEGV), but that report is macOS + FSEvents +
concurrent worktrees. This one is Linux, has zero workload, and reproduces on --version, so the
trigger looks different.
--version crashing is the tell, and I think it's explained without invoking libuv at all: --version is structurally ineligible for the redirect that routes a packaged Linux CLI invocation to the CLI entrypoint. It never reaches the CLI — the Electron main process keeps going with --version in argv and dies during startup/teardown. So this isn't "the CLI path SIGSEGVs"; for --version there is no CLI path taken.
Verified on upstream/main at c065a2d7e1.
The gate
On Linux, maybeRedirectAppImageCliLaunch (src/main/startup/appimage-cli-redirect.ts:91) is what re-execs the binary as the CLI. It delegates eligibility to getAppImageCliArgs (:133), which returns null — meaning no redirect — unless the argv clears three gates:
--version is not in it — nor is -v or -V. And --version starts with -, so findFirstCommandCandidate (:163-175) skips it and returns null, failing the :160 branch too. Both exits return null, so maybeRedirectAppImageCliLaunch returns { redirected: false } at :105 and src/main/index.ts:443-444 simply does not call app.exit. Startup continues.
The other redirect immediately above (maybeRedirectPackagedCliEntryLaunch, index.ts:430) can't catch it either — per the comment at index.ts:428-429, it "matches on the entry path instead", not on flags.
So ./orca-ide … --version runs the full Electron main startup. That is consistent with your strongest observation — that --version "does no real work at all" — because the work being done isn't the CLI's, it's GUI startup being torn down.
One command confirms or kills this
--helpis in HELP_FLAGS, and --version is not. So the two should diverge:
./orca-ide --no-sandbox --disable-gpu --help
Prints CLI help (exit 0) while --version still exits 139 → the gate is the mechanism, confirmed. The fix is a one-line eligibility change, not a libuv hunt.
Also exits 139 → the redirect isn't firing at all on your setup, and gate 2 (:145) is the next suspect, not the flag set.
That second case is worth pre-empting, because your own testing points at it:
env | grep -E 'APPIMAGE|APPDIR'
:145 requires APPIMAGEorAPPDIR to be set. You noted you also tried "running the extracted binary directly instead of the AppImage" — that clears both variables, so on that run the redirect could not have fired regardless of the subcommand. If your serve attempts were on the extracted binary, that alone explains them.
There's corroboration for that in your own report: the redirect spawns the CLI with stdio: 'inherit' (:120-123), so a serve invocation that did redirect would have printed the pairing URL through to your terminal. You saw no output at all — consistent with the redirect never firing rather than with the CLI starting and dying.
Things I checked and ruled out, so nobody re-chases them
--disable-gpu does not swallow the serve token.findFirstCommandCandidate only consumes a following value for flags in CLI_FLAGS_WITH_VALUES (:170), which is just --environment and --pairing-code (:27). Unknown flags are skipped without consuming the next token, so serve is still found as the first positional. (This mattered to check — the argv-scanner-eats-the-subcommand bug is real elsewhere in this area, see fix(serve): recognize CLI-form serve args on the Electron process #12818's description.)
serveis on the allow-list (APPIMAGE_CLI_COMMAND_NAMES, :30, entry at :76), so serve fails only on gates 1–2, never on gate 3. --version fails gate 3 unconditionally. Different reasons, same fall-through.
fix(serve): recognize CLI-form serve args on the Electron process #12818 (fix(serve): recognize CLI-form serve args on the Electron process) landed at 1.4.176-rc.1, i.e. after your build, and it is directly about CLI-form serve argv reaching the Electron process. It's worth retesting serve on current — but it only normalizes serve argv, so it cannot explain --version, and I'm not claiming it fixes this.
On the version gap
You're on 1.4.148 and main is at 1.4.178-rc.2, so a retest on current is worth doing before anyone spends effort here. I'd stress that the --version gate above still reads the same way on main today, so I would not expect an upgrade alone to fix the --version case.
What I could not determine
I have no Linux AppImage build to run, so I did not reproduce the SIGSEGV or confirm what specifically faults in uv_close() once startup proceeds with CLI argv. The gate analysis explains why the process is in Electron startup at all, which I think is the load-bearing half; the crash itself may well be a second, independent defect in early app.exit/teardown that the gate merely exposes. Your backtrace stands on its own for that part.
If --help works and --version doesn't, that asymmetry is the whole report in one line and would make this cheap to fix.
Two independent fixes. CLI subcommands no longer boot Chromium at all (#15083), and a packaged non-serve launch with no usable display exits 1 with an actionable diagnosis instead of dying in Ozone teardown — the code comment cites this issue by number (src/main/index.ts, // Fail before Chromium's missing-display teardown can segfault (#13719).).
Confirmed on hardware: the contract fails 4/8 against a pre-stack AppImage with three cases at status 133, and 8/8 after.
Activity
manuaudio commentedon Aug 11, 2026
--versioncrashing is the tell, and I think it's explained without invoking libuv at all:--versionis structurally ineligible for the redirect that routes a packaged Linux CLI invocation to the CLI entrypoint. It never reaches the CLI — the Electron main process keeps going with--versionin argv and dies during startup/teardown. So this isn't "the CLI path SIGSEGVs"; for--versionthere is no CLI path taken.Verified on
upstream/mainatc065a2d7e1.The gate
On Linux,
maybeRedirectAppImageCliLaunch(src/main/startup/appimage-cli-redirect.ts:91) is what re-execs the binary as the CLI. It delegates eligibility togetAppImageCliArgs(:133), which returnsnull— meaning no redirect — unless the argv clears three gates:and the flag set it checks against is (
:25):--versionis not in it — nor is-vor-V. And--versionstarts with-, sofindFirstCommandCandidate(:163-175) skips it and returnsnull, failing the:160branch too. Both exits returnnull, somaybeRedirectAppImageCliLaunchreturns{ redirected: false }at:105andsrc/main/index.ts:443-444simply does not callapp.exit. Startup continues.The other redirect immediately above (
maybeRedirectPackagedCliEntryLaunch,index.ts:430) can't catch it either — per the comment atindex.ts:428-429, it "matches on the entry path instead", not on flags.So
./orca-ide … --versionruns the full Electron main startup. That is consistent with your strongest observation — that--version"does no real work at all" — because the work being done isn't the CLI's, it's GUI startup being torn down.One command confirms or kills this
--helpis inHELP_FLAGS, and--versionis not. So the two should diverge:--versionstill exits 139 → the gate is the mechanism, confirmed. The fix is a one-line eligibility change, not a libuv hunt.:145) is the next suspect, not the flag set.That second case is worth pre-empting, because your own testing points at it:
:145requiresAPPIMAGEorAPPDIRto be set. You noted you also tried "running the extracted binary directly instead of the AppImage" — that clears both variables, so on that run the redirect could not have fired regardless of the subcommand. If yourserveattempts were on the extracted binary, that alone explains them.There's corroboration for that in your own report: the redirect spawns the CLI with
stdio: 'inherit'(:120-123), so aserveinvocation that did redirect would have printed the pairing URL through to your terminal. You saw no output at all — consistent with the redirect never firing rather than with the CLI starting and dying.Things I checked and ruled out, so nobody re-chases them
--disable-gpudoes not swallow theservetoken.findFirstCommandCandidateonly consumes a following value for flags inCLI_FLAGS_WITH_VALUES(:170), which is just--environmentand--pairing-code(:27). Unknown flags are skipped without consuming the next token, soserveis still found as the first positional. (This mattered to check — the argv-scanner-eats-the-subcommand bug is real elsewhere in this area, see fix(serve): recognize CLI-form serve args on the Electron process #12818's description.)serveis on the allow-list (APPIMAGE_CLI_COMMAND_NAMES,:30, entry at:76), soservefails only on gates 1–2, never on gate 3.--versionfails gate 3 unconditionally. Different reasons, same fall-through.fix(runtime): prevent file watcher SIGSEGV from crashing orca serve) landed at1.4.138-rc.3— before your 1.4.148, so you already have it. That supports your read that this is a different trigger from orca serve exits with SIGSEGV after FSEvents 'Events were dropped' under multiple concurrent agent worktrees #8212.fix(serve): recognize CLI-form serve args on the Electron process) landed at1.4.176-rc.1, i.e. after your build, and it is directly about CLI-formserveargv reaching the Electron process. It's worth retestingserveon current — but it only normalizes serve argv, so it cannot explain--version, and I'm not claiming it fixes this.On the version gap
You're on 1.4.148 and
mainis at1.4.178-rc.2, so a retest on current is worth doing before anyone spends effort here. I'd stress that the--versiongate above still reads the same way onmaintoday, so I would not expect an upgrade alone to fix the--versioncase.What I could not determine
I have no Linux AppImage build to run, so I did not reproduce the SIGSEGV or confirm what specifically faults in
uv_close()once startup proceeds with CLI argv. The gate analysis explains why the process is in Electron startup at all, which I think is the load-bearing half; the crash itself may well be a second, independent defect in earlyapp.exit/teardown that the gate merely exposes. Your backtrace stands on its own for that part.If
--helpworks and--versiondoesn't, that asymmetry is the whole report in one line and would make this cheap to fix.nwparker commentedon Sep 2, 2026
Fixed and now on
mainvia #18100.Two independent fixes. CLI subcommands no longer boot Chromium at all (#15083), and a packaged non-serve launch with no usable display exits 1 with an actionable diagnosis instead of dying in Ozone teardown — the code comment cites this issue by number (
src/main/index.ts,// Fail before Chromium's missing-display teardown can segfault (#13719).).Confirmed on hardware: the contract fails 4/8 against a pre-stack AppImage with three cases at status 133, and 8/8 after.