k3s.service pkill -9 containerd-shim orphans container payloads on every restart, causing recurring lock-blocked crashloops (CI, o11y) #311
Labels
No labels
burndown-2026-06
coherence-core
consult
headless
interactive
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coilyco-flight-deck/infrastructure#311
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The recurring "CI is down again" failures and the long-running observability outage share one root cause:
k3s.servicecarriesExecStartPre=-/usr/bin/pkill -9 containerd-shim. Every k3s restart SIGKILLs all containerd-shims, the container payload processes survive as orphans reparented to init, and they keep holding exclusive file locks on their volumes. Fresh pods after the restart can never acquire those locks and crashloop until someone manually reaps the orphans.Evidence (2026-06-12, read-only shadow from ser8)
ActiveEnterTimestamp), matching the restart age on forgejo pods.docker-libis an emptyDir, so container restarts within the pod reuse it, and every new dind hangs onwaiting for response from boltdb openthen times out.forgejo-runner-0and-1are 0/2 CrashLoopBackOff (29-30 restarts).victoria-metrics(PID 15980) holds/storage/flock.lock(45d of crashloops, 521 restarts), orphanedclickhouse-server(PIDs 22658/22678) holds the ClickHousestatusfile (20d, 806 restarts, exit 76), and a leaked listener holds:9100blocking node-exporter (25d, 529 restarts).Fixes
:9100holder), then delete the crashlooping pods so they reschedule onto free locks. A reboot achieves the same wholesale.ps -o ppid= -p 1366725 1368559), andfuseron the emptyDircontainerd/daemon/meta.dbshould name them.pkill -9 containerd-shimExecStartPre ink3s.service. If it exists to clear some earlier hang, the correct shape isk3s-killall.shsemantics (kills whole container cgroups, payloads included) or letting pods survive the restart. Shim-only SIGKILL is precisely the orphan generator.k3s.servicedrift cleanup in #306 - both findings point at the unit file being hand-drifted from stock.Related
Recovery confirmed from the ser8 read-only watch: both runner pods 2/2 Running as fresh incarnations at 2026-06-12T11:13:23Z, and the runner log shows real task pickup and execution (tasks 271, 272 for coilyco-gaming/eco-app, with clean job-network teardown). The dormant queue from the outage window is draining.
The object-level fix is done. Items 3 and 4 (remove or replace the
pkill -9 containerd-shimExecStartPre, fold into the #306 unit-file cleanup) remain open, and they are what stops the recurrence.