Skip to content
← Back to writing

October 5, 2026

A zombie every ten seconds

My lab box rolled back an update, and while I was looking at why, its process panel reported 115,420 zombie processes. One health check line in the remote agent's image had been leaving them behind for weeks.

The morning of October 5 started with me locked out of my own lab. I had clicked update on eightly-ms01, the box behind lab.mjashley.com, and the update's health check failed, so Featherfall rolled it back as designed while I stared at a tab that would not load.

The real diff of commit 0896a4f in eightly-agent: tini added to the image, the busybox wget health check replaced by the agent's own healthcheck command, and a comment recording 115,420 zombies on eightly-ms01.

The rollback was my fault, and it came from the day before. On October 4 I had converted the cache on my NAS, and a systemd chain reaction during that change unmounted the NAS's container mounts. I brought the mounts back, restarted Docker and the apps, and called the NAS recovered. What I never did was ask systemd for the full list of what it had stopped in that same second. NFS was on the list. nfs-server, nfs-mountd and nfs-idmapd had been down for 15 hours.

ms01 mounts its media from the NAS over NFS. With the server gone the mount went stale, df hung on it, and the Eight.ly service on ms01 spent 1 minute 36 seconds probing disks before it opened its port. The update's health window was 60 seconds. So a healthy build got rolled back because a share on another machine was dead.

Starting NFS on the NAS and remounting the share on ms01 got me in again, and a second try at the update finished in 45 seconds. The real fixes became EOS-2525, which opens the HTTP port before the slow host housekeeping and measures each network mount separately with a 5 second bound, and EOS-2532, which stretches the health window to 150 seconds. The cost of that second change is that a truly broken build now takes up to two and a half minutes to roll back instead of one, and I will take that over a rollback that fires on a working build.

Then I looked at the process panel

Once lab was back I went through the dashboard to make sure nothing else was wrong, and the Process Information panel was badly wrong. Total processes: 116,158. Running: 0. Sleeping: 738. Zombie: 115,420.

A zombie process is one that has finished but whose exit status nobody has collected. It holds no memory and burns no CPU, but it keeps a slot in the process table, and that table has a ceiling. Long before a box reaches it, ps and top slow down and every screen that lists processes gets heavy, so 115,420 meant ms01 was steadily walking toward the point where it could not start anything new.

Every one of them had the same parent, /app/eightly-agent, and the same name, ssl_client.

One line in a Dockerfile

The Eight.ly remote agent is a small Go program that runs in a container on any Docker host you want to manage from Eight.ly OS. On ms01 it runs alongside the OS so the NAS can see ms01's containers. Its image had a health check, and the health check was this:

HEALTHCHECK --interval=10s --timeout=5s --retries=3 \
  CMD wget -q --spider https://localhost:9001/healthz --no-check-certificate || exit 1

The image is Alpine, so wget is busybox wget. When busybox wget talks HTTPS it does not do TLS itself. It forks a helper called ssl_client and pipes the connection through it. When the check took longer than 5 seconds, Docker killed wget. The helper was left with no parent, and an orphaned process normally gets adopted by PID 1, whose job is to collect it when it exits.

PID 1 in that container was the agent binary itself. The agent does not reap children because it never expected to have any. Every timed-out check left one more ssl_client behind, at most one every 10 seconds. At that rate 115,420 is at least 13 days of failing checks, and since not every check timed out it was likely longer.

Restarting the container cleared them, from 115,420 to 3, and I knew they would come back, because every box running the agent image had the same health check and the same missing init.

The fix, and the check that could not fire

EOS-2533 became eightly-agent #33 and eightly #1919. The picture above is the Dockerfile half of it. The health check is now a healthcheck subcommand of the agent binary that does the HTTPS request in-process, so it starts no child at all. The image now runs under tini with -s, which registers it as a subreaper, so anything that does get orphaned is still collected, and it stays quiet when someone also runs the container with Docker's own --init. The install command on the Agents page now carries --init too. And on the Eight.ly side, a container that stays unhealthy for an hour now raises a critical alert, because a health check failing for two weeks with nobody told is how this got to six figures.

The new CI job for the image starts the container three ways and counts zombies. The evidence on PR #33 reads: the old layout with the agent as PID 1 left 8 zombies, tini as PID 1 left 0, and --init left 0 with no tini warnings.

I keep thinking about the first version of that job. One of its checks was meant to confirm tini prints no warning under --init. It grepped for tini's warning prefix with a single space. Tini prints that prefix with two spaces. The grep could never match, which means the check could never fail, which means it would have reported "no warnings" forever whatever tini did. What caught it was the job's own control case, a run deliberately set up to produce the warning, which came back clean when it should not have. The check now matches the message text instead of the prefix. I have written about this shape before and I keep finding it: a guard that cannot fire looks exactly like a guard with nothing to report, and the only way to tell them apart is to make it fire on purpose.

The same job also turned up that my runners are not interchangeable. eightly-ci-6 could not start any container at all because of a runc permission error, and eightly-ci-1 had no buildx. Both now report "cannot check" with exit status 2, which shows red, and the image job is routed only to runners proven to start containers.

Codex reviewed the PR and caught one real bug I had missed: a bracketed IPv6 listen address like [::1] got a second pair of brackets added when the health check built its URL, so a healthy agent bound to IPv6 would always report unhealthy. That has a test now that failed before the fix.

The bug behind the bug

When the agent restarted on ms01 it did not come back cleanly. It rejected its own saved state because of folder permissions, and when it tried to register again the NAS answered 403. Digging into the 403 found something worse than the zombies. The agent's access token lasts 30 days, and nothing ever renewed it. Every remote agent on every install would quietly lose its connection about a month after it was enrolled, and ms01's token had already run out.

That is EOS-2536, eightly-agent #34 and eightly #1920. The agent now renews from day 15 of each 30-day token, and if it does find an expired token it says so and enrolls again cleanly instead of looping on 403. The tests use a fake clock and keep an agent connected for 100 days. EOS-2534 fixed the permissions problem by tightening the agent's own state folder instead of refusing to start.

At 00:38 UTC I recreated ms01's agent on the new signed image with --init, same settings and same data volume. Zombies: 2, and none of them ssl_client. An hour later at 01:40 UTC, still 2. The old rate would have added about 360 in that hour, and the NAS listed the agent as online again.

What the day turned into

The sprint I started that morning was four tickets about external GPUs, TV tuners and Coral accelerators, plus the install-wizard device picker they depended on and two real-hardware checks split off, seven in all. Everything above was found while working it, and I filed every finding into that same running sprint. By early evening it was past 30 tickets, nearly five times the size of a sprint meant to fit in one day. v2.3.68 and v2.3.69 shipped to ms01, the NAS and t320-b along the way. The rule I took from it is that a finding which does not block the running sprint still gets filed the same turn, but into an unstarted follow-up sprint, so the day's sprint stays a day.