Skip to content

docs: explain SIGKILLed test processes under a zero RTTIME limit - #275

Merged
ElbertePlinio merged 2 commits into
mainfrom
fix/253-rttime-docs
Oct 7, 2026
Merged

ElbertePlinio merged 2 commits into
mainfrom
fix/253-rttime-docs

Conversation

@ElbertePlinio

@ElbertePlinio ElbertePlinio commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Cause

The SIGKILLs in #253 come from the kernel, not from another process. The test host passes down an RLIMIT_RTTIME hard limit of 0.

  • A tracefs trace of signal:signal_generate, filtered to SIGKILL, caught 6 vitest worker deaths and 4 other Node processes killed the same way. In each one the process raised the signal against itself with code=128 (SI_KERNEL). The kernel stack ended in send_signal_locked called from posix_cpu_timers_work.
  • RLIMIT_CPU is unlimited, so the only SIGKILL left in that path is the RLIMIT_RTTIME hard-limit check.
  • T3 Code runs with Max realtime timeout 0 0, and every process it starts inherits that. systemd, the user manager and the compositor have it unlimited. Slack, Chromium, Zed and a Firefox-based browser also run with 0 on this host. rtkit is not installed.
  • A small C repro under this limit is SIGKILLed as soon as a per-thread CPU-clock timer expires (exit 137). A process-clock timer survives.
  • The same path also killed zenity, hyprctl, Chrome threads and CLI children. That matches the empty-log Chrome exit in test: browser session status test flakes under parallel load #224 and the killed xdotool, display worker and relay children noted on test: vitest workers exit unexpectedly under concurrent full suites #253.
  • Audit and the earlier checks agree: no kill syscall targeted the victims, there was no OOM kill, and the victims never joined a scope cgroup.
  • 12 rounds of two concurrent full suites in a systemd-run --user unit, with RTTIME unlimited and everything else the same, logged no worker exit. That run was noisy, because /tmp filled up and the cgroup tests failed in the service cgroup. Under the T3 Code limit, about one round in four logged a worker exit.

The test suite cannot change a hard limit of 0, and CI does not set one. This PR documents the host requirement in AGENTS.md.

Not established: which code arms the per-thread CPU timer in the victims. Plain Node CPU loops, worker threads and repeated spawns survive under the limit.

Validation

  • bunx vitest run test/security: 152 passed. The security scan reads prose.
  • bun run lint and PickCheck: clean. The change is documentation only.

Closes #253
Closes #224

@ElbertePlinio
ElbertePlinio merged commit ea48181 into main Oct 7, 2026
5 checks passed
@ElbertePlinio
ElbertePlinio deleted the fix/253-rttime-docs branch October 7, 2026 17:01
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.

test: vitest workers exit unexpectedly under concurrent full suites test: browser session status test flakes under parallel load

1 participant