Repository navigation
Conversation
added 2 commits
October 29, 2026 07:33
…orts Omarchy launches apps from a shell that holds a hard RLIMIT_RTTIME of 0 (no rtkit, so the portal's zero realtime budget is applied by PipeWire module-rt). Orca inherits it in every process, and the kernel CPU-timer watchdog SIGKILLs GPU and renderer processes with no dump while GBs of memory are free. A hard limit cannot be raised without privilege, so record it as a startup breadcrumb and in process-gone crash details. Move the daemon's /proc/self/limits parser into one shared reader so the terminal warning and crash attribution flag the same zero soft or hard limit.
…and restore timer-armed wording
Contributor
|
#36183 has merged and includes a later version of this PR's rttime-reporting changes (the same process-gone fields and daemon refactor). This PR looks superseded and is probably safe to close; I'm leaving that call to its owner. |
Contributor
|
Closing as superseded by #36183, which merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Some Omarchy setups start every app with a "realtime CPU budget" of zero. Linux enforces that budget with no warning: once a thread inside Orca's GPU or renderer process starts a CPU timer, the kernel kills the process outright. No crash dump is written, and memory is not the cause. Orca can't raise that budget. What it can do is say the budget is zero, so these reports explain themselves.
Description
What users saw: on Omarchy (kernel 7.2.x), Orca's GPU or renderer process died with exit code 9 (SIGKILL), with GBs of RAM free and no minidump. Windows went blank or reloaded while the main process kept running.
Root cause: the kernel's RLIMIT_RTTIME watchdog. When rtkit is missing, Omarchy's launcher (quickshell, a PipeWire client using module-rt / rtportal) ends up with a hard RLIMIT_RTTIME of
0 0. Every app it launches inherits that limit. The first time a Chromium thread's CPU timer is checked, the kernel sends SIGKILL (SI_KERNEL). An unprivileged process cannot raise a hard limit, so Orca cannot fix this itself.The real fix is upstream: omacom/omarchy#16824 (merged 2026-10-28). It installs rtkit, sets
rtportal.enabled=false, and adds theomarchy-realtime-repairmigration. Affected users should update Omarchy, or install rtkit and log in again.What this PR does: it makes future reports name the cause themselves.
src/main/linux-rttime-limit.ts(readZeroRtTimeLimit), which parses/proc/self/limitsand returns the raw soft/hard values when either one is 0. On non-Linux it returns null.buildProcessGoneCrashDetailsaddsrlimitRtTimeSoftUs/rlimitRtTimeHardUsto process-gone crash details when the limit is zero. GPU and renderer children inherit main's limit at fork, so main's own value matches theirs.linux_rttime_limitcrash breadcrumb at startup when the limit is zero.src/main/daemon/daemon-rttime-limit.ts(warnWhenRealtimeTimeoutIsZero, [Bug][Linux]: Orca runs with RLIMIT_RTTIME 0, so processes in Orca terminals get SIGKILLed #29745) now calls the shared helper. Its log event, fields and trigger condition are unchanged.Crash reports
Covered (Omarchy, kernel 7.2.8-9, GBs free, exit 9):
Not covered (real memory pressure, about 1 GB available; a different cause):
Fix evidence
All runs are on the Omarchy test box (
7.2.5-3-omarchy,pacman -Q rtkit→error: package 'rtkit' was not found).1. The kernel kills a thread with a CPU timer armed under a zero limit.
rttime_repro.pyarms aCLOCK_THREAD_CPUTIME_IDtimer for 200 ms and then spins for 3 s:2. The same kill hits Orca v1.4.244's GPU process (A/B). The same Orca build ran twice with a thread-CPU-timer shim, once under
prlimit --rttime=0:0and once unlimited.RENDERER_CPUTIMER armed pid=1491367), and there were 0exit_code=9lines.3. The real launcher passes a zero limit to its children (
/proc/<pid>/limitson the live session):(One older child,
inotifywait, showsunlimited. The apps quickshell launches inherit0 0.)4. The parser reads the real Omarchy limits file correctly.
readZeroRtTimeLimitwas run on quickshell's copied/proc/888655/limits:5. Tests:
pnpm vitest run src/main/daemon/daemon-rttime-limit.test.ts. That file covers the shared parser through the daemon wrapper.6.
pnpm check:changed --maxWorkers=2:✓ 20 check(s) passed in 154.7s.(Run on the final head. The first run caught a mocked-module test failure inmain-process-ready-duplicate-pty-repair.test.ts. The fix was to read the limit at startup straight from the shared helper.)Trade-offs
/proc/self/limitsper process-gone report, plus one at startup. Off Linux the helper returns early and reads nothing.Adversarial review
1 loop, clean: no P0 or P1 issues.
src/main/linux-rttime-limit.ts.node:fs, so the daemon bundle's plain-node entry guard is unaffected.electron.process_gonedetails.