Processes and signals: states, zombies, PID 1, and PID exhaustion

A process is a PID with a state and a parent. Signals are delivered when the process can run — which is why a D-state task ignores even SIGKILL, and why PID 1 in a container has to handle SIGTERM itself.

Read the briefing
About 4 min to read 12 drills

What to remember

  1. You cannot kill a zombie — it is already dead. It holds only a PID-table entry. Fix or kill the parent that never called wait().
  2. kill -9 cannot touch a D-state process. It is inside an uninterruptible kernel call. /proc//stack names what it is waiting for.
  3. Exit 137 = 128 + 9: something sent SIGKILL. Usually an OOM kill or the end of a termination grace period. 143 is SIGTERM.
  4. PID 1 does not get default signal actions. So an app with no SIGTERM handler ignores it — which is why every pod takes exactly 30 seconds to stop.
  5. fork says 'Resource temporarily unavailable'? Count PIDs, not RAM. EAGAIN is a count limit: pid_max, pids.max or ulimit -u. 'Cannot allocate memory' (ENOMEM) is the overcommit limit instead, the Redis-fork classic.

The big picture

Processes and signals is the topic that explains why containers take ten seconds to stop, why kill -9 sometimes does nothing, what a zombie actually costs, and why a host suddenly cannot fork. It is small, mechanical, and interviewers use it as a quick depth probe: either you know what PID 1 does or you do not.

The mental model

A process is a PID with a state and a parent. Signals are messages the kernel delivers when the process is schedulable, which is why a D-state process ignores even SIGKILL. Exit is a two-step dance: the child becomes a zombie holding its exit status until the parent reaps it. Containers make PID 1 an application that was never written to be init.

Diagrams

Process states, and where kill -9 stops working
              fork()
                |
                v
           +---------+   scheduled    +----------+
           | R  runs |<-------------->| R  ready |
           +----+----+                +----------+
                | waits on something
       +--------+---------+
       v                  v
+--------------+   +------------------+
| S  sleeping  |   | D  uninterruptib.|  signals are NOT
| (killable)   |   | NFS, dead disk   |  delivered here
+--------------+   +------------------+
       | exit()
       v
  +----------+   parent calls wait()   +--------+
  | Z zombie |----------------------->  |  gone  |
  +----------+                          +--------+
     ^ holds only a table entry; you cannot kill it

In depth

States, zombies, and orphans

In ps/top: R running or runnable, S interruptible sleep (waiting, wakeable by signals), D uninterruptible sleep (usually block or network filesystem I/O; signals wait until it returns), Z zombie (exited, not yet reaped), T stopped, I idle kernel thread. A zombie holds only a PID table entry and its exit status; it uses no memory or CPU, cannot be killed (it is already dead), and disappears when its parent calls wait(). A few zombies are noise; thousands mean a parent that never reaps, which eventually exhausts PIDs. When a parent dies first, children are re-parented to PID 1 (or the nearest subreaper), which is why an init that reaps matters.

Signals that matter

SIGTERM (15) politely asks a process to exit and can be handled: this is where graceful shutdown lives (stop accepting new work, finish in-flight requests, close connections, flush). SIGKILL (9) cannot be caught, blocked, or ignored, and gives the process no chance to clean up. SIGHUP (1) is conventionally "reload configuration" for daemons. SIGINT (2) is Ctrl-C; SIGSTOP/SIGCONT pause and resume; SIGUSR1/2 are application-defined (many services use them to rotate logs or dump state); SIGPIPE kills processes that write to a closed pipe unless handled. Default dispositions matter: a process that does not install a SIGTERM handler dies immediately on SIGTERM, which looks graceful in logs and is not.

Orchestrators send SIGTERM, wait a grace period (Kubernetes: terminationGracePeriodSeconds, default 30; Docker: 10), then SIGKILL. A container that exits with 137 was SIGKILLed (128+9); 143 is SIGTERM.

PID 1, containers, and PID exhaustion

In a container, your application often is PID 1, and PID 1 has two special properties: signals with default actions are not delivered to it (the kernel protects init from being killed by its own children's defaults), so an app with no SIGTERM handler ignores SIGTERM entirely and gets SIGKILLed after the grace period; and PID 1 must reap orphaned children or they accumulate as zombies. Symptoms: every pod takes exactly 30 seconds to terminate, rolling updates crawl, and connections are cut instead of drained. Fixes: handle SIGTERM in the application, use exec in entrypoint scripts so the binary becomes PID 1 rather than a child of a shell, or run a tiny init (tini, dumb-init, or Kubernetes shareProcessNamespace/pause semantics).

PID exhaustion: kernel.pid_max, the user's nproc rlimit and the cgroup pids controller cap the number of tasks, and all three make fork() and pthread_create() fail with EAGAIN: fork: retry: Resource temporarily unavailable, shells that will not start, and the JVM's misleading OutOfMemoryError: unable to create native thread. A fork that fails with Cannot allocate memory (ENOMEM) is a different problem, the commit limit under vm.overcommit_memory, which is why a large Redis or JVM process can fail to fork with gigabytes free. Causes of the count case are runaway thread creation, a fork bomb, or zombie accumulation. Diagnose with ls /proc/<pid>/task | wc -l, ps -eLf | wc -l, and the cgroup's pids.current against pids.max; contain with TasksMax= in systemd or a pod-level PID limit.

Myths and facts

Myth: You can kill a zombie with kill -9.

Fact: It is already dead; only the parent reaping it (or the parent dying, so init reaps) removes it.

Myth: kill -9 always works.

Fact: A process in uninterruptible sleep (D) will not act on any signal until the kernel operation returns.

Myth: PID 1 behaves like any other process.

Fact: Signals with default dispositions are not delivered to PID 1, and PID 1 inherits orphans that it must reap.

Myth: Exit code 137 means the application crashed.

Fact: 137 = 128+9: something sent SIGKILL, usually an OOM kill or the end of a termination grace period.

Myth: A fork failure on a host with free memory must be a kernel bug.

Fact: Read the errno. EAGAIN ('Resource temporarily unavailable') is a count limit: pid_max, the pids cgroup or ulimit -u. ENOMEM ('Cannot allocate memory') is the overcommit limit, which a large process can hit with gigabytes free.

How pros do it

  • Install a SIGTERM handler that drains: stop accepting work, finish in-flight requests, then exit before the grace period.
  • Use exec in entrypoint scripts, or a real init (tini/dumb-init), so PID 1 handles signals and reaps children.
  • Set terminationGracePeriodSeconds from measured drain time, and check for pods that always take the full grace period.
  • Bound processes with TasksMax / pod PID limits and alert on pids.current approaching pids.max.
  • Treat D-state processes as an I/O dependency problem: read /proc//stack rather than escalating the signal.

Questions people ask

What is a zombie, and how do you get rid of thousands of them?

Lead with 'you cannot kill a zombie, it is already dead'. It is a process-table entry holding an exit status its parent never collected with wait(), so the fix is the parent: find it with ps -eo pid,ppid,stat | awk '$3 ~ /^Z/', fix or restart it, and the children are re-parented to init and reaped. The caveat is cost: zombies use no memory or CPU, only PIDs, which is why thousands matter and one does not.

kill -9 did nothing. What is going on?

The process is in D state, uninterruptible sleep inside a kernel call, usually storage or a network filesystem, and no signal is delivered until that call returns. Read /proc/<pid>/stack or wchan to name the wait, then fix the dependency (the dead NFS server, the failing disk). Add that D-state tasks count in the load average, so the box looks CPU-bound while the CPUs are idle.

What is the difference between SIGTERM and SIGKILL?

SIGTERM is a request the process can catch: stop taking work, finish or checkpoint what is in flight, exit. SIGKILL is handled by the kernel, cannot be caught or ignored, and gives no chance to clean up, so a database killed with it does crash recovery on the next start and may lose anything not yet durable. Supervisors send TERM first and KILL after the grace period; exit 143 is TERM, 137 is KILL.

Why does every pod take exactly 30 seconds to stop?

Because PID 1 is ignoring SIGTERM and only dies when SIGKILL arrives at the end of the grace period. PID 1 gets no default signal actions, so an app with no handler, or a shell wrapper that never forwards the signal, sits there for the full 30 seconds. Fix: handle SIGTERM in the app, exec in entrypoint scripts, or run under tini; then size the grace period to the measured drain time.

Should I use tini in every container?

Use it when the process spawns children or has no SIGTERM handler; a single-process image whose binary handles SIGTERM and was started with exec form does not need it. The mechanism is that tini as PID 1 forwards signals and reaps orphans, which is exactly what an application was never written to do.

How do I see thread counts per process?

ls /proc/<pid>/task | wc -l, ps -o nlwp -p <pid>, or Threads: in /proc//status. Reach for it when fork or pthread_create fails with EAGAIN, and compare against pids.max, threads-max and ulimit -u.

Further reading

Drills · 12

Answer in your head, or out loud, before you reveal. Mark each one: "Again" brings it back, "Got it" counts on your desk.

1 Pick the strongest answer

You get paged: a build host has 3,000 processes in state Z, all [worker] <defunct>. A teammate has already run kill -9 on them and nothing changed. Why, and what actually fixes it?

  1. kill -9 needs root for defunct processes; retry with sudo. Permissions are irrelevant; there is no running process to receive the signal.
  2. They are consuming memory and will trigger the OOM killer; drop caches. Zombies have released their memory; the only cost is PIDs, which is why thousands of them matter.
  3. They are stuck in uninterruptible I/O; wait for the disk or reboot. That describes D state. Zombies hold no resources but a PID entry.
  4. Zombies are already dead; they are PID table entries waiting for their parent to call wait(). Fix or restart the parent (or, if the parent is gone, PID 1 must reap them). A signal cannot kill something that has already exited. The parent's failure to reap is the bug.
In short

You cannot kill a zombie because it is already dead, so fix or restart its parent, which must call wait().

Why

A zombie is a finished process whose exit status has not been collected. The parent is at fault, and the practical risk is PID exhaustion, not memory. The interview signal is diagnosing the parent (ps -o ppid=) rather than attacking the children.

The common mistake

Attacking the zombies: more kill -9, or 'reboot to clear them'. The parent is the bug, and a reboot destroys the evidence of which parent it was.

Read the docs

2 Pick the strongest answer

Every deploy, your containers sit for the full 10 seconds on docker stop and exit 137 instead of shutting down cleanly. The application runs as PID 1. What is the most likely cause?

  1. docker stop sends SIGKILL immediately, so no clean shutdown is ever possible. It sends SIGTERM first and only escalates after the grace period — which is exactly the 10 seconds observed.
  2. The image lacks a shell, so the signal has nowhere to go. Signals go to the process, not to a shell.
  3. PID 1 gets special signal treatment: the kernel does not apply default actions to it, so a process with no explicit SIGTERM handler simply ignores the signal, and the runtime escalates to SIGKILL when the grace period expires. Outside PID 1, an unhandled SIGTERM terminates the process by default; as PID 1 that default does not apply.
  4. Signals cannot cross the container boundary. Signals are delivered normally into PID namespaces.
In short

PID 1 is special: it ignores signals it has no handler for, so an app running as PID 1 will not stop on SIGTERM.

Why

This connects three things interviewers like to see linked: signal defaults, PID 1 semantics, and why containers lose in-flight requests on deploy. Answering with "add tini or handle SIGTERM, and check whether the shell is PID 1" is a strong senior answer.

The common mistake

Raising the grace period. That only delays the same hard kill, and it makes every deploy slower.

Read the docs

3 Pick the strongest answer

You get paged: load average on a backup host is past 40 and climbing while the CPUs sit idle. A backup process has been in state D for ten minutes and kill -9 has no effect. What is going on?

  1. It is a zombie and needs its parent to reap it. Zombies are Z, hold no resources, and do not affect load.
  2. The process trapped SIGKILL; send SIGTERM instead. SIGKILL cannot be caught; the process is simply not schedulable to act on it.
  3. It is in uninterruptible sleep waiting on I/O (often NFS or a failing disk); signals are delivered only when the syscall returns, and D-state tasks count toward load average. D state means the kernel will not interrupt the wait; the process is not ignoring you, it cannot hear you yet.
  4. The scheduler starved it; raise its priority with renice. It is not waiting for CPU; it is waiting for the kernel's I/O path.
In short

The process is in D state, stuck inside a kernel I/O wait, so no signal can reach it until that I/O returns.

Why

Uninterruptible sleep is how the kernel protects in-flight I/O; the process wakes when the device (or NFS server) answers. Because D-state tasks count in load average, a hung mount can make load spike with idle CPUs. The move is to find the I/O it waits on (cat /proc/<pid>/stack, /proc/<pid>/wchan, mount health), not to send more signals.

The common mistake

Escalating: kill -9 again, kill as root, renice. None of them can reach a process that is not schedulable; the disk or the NFS server is the thing to fix.

Read the docs

4 Answer out loud

Explain what happens when a service is asked to stop cleanly: which signal, what the process should do, what happens if it does not, and why PID 1 in a container is special. Three to five sentences.

In short

A strong answer says SIGTERM comes first and can be handled, SIGKILL follows after the grace period and cannot, and PID 1 must handle signals and reap children itself.

What a strong answer does
  • mechanism: SIGTERM is catchable: stop accepting work, finish or checkpoint, exit; after the grace period SIGKILL is uncatchable; PID 1 must forward signals and reap children, otherwise shells as PID 1 cause timeouts and zombies.
  • implications: Exec form or an init shim, handle SIGTERM in the app, size the grace period to the drain time, and note the same mechanism drives Kubernetes pod termination.
  • communication: Signal → expected behaviour → failure mode → PID 1 twist, crisp.
Why

Interviewers want the two-signal story, the PID 1 responsibilities, and the link to container and Kubernetes shutdown behaviour.

The common mistake

Describing SIGTERM as 'the kill signal' and stopping there, or forgetting that PID 1 ignores a signal it has no handler for, which is the whole reason containers take the full grace period.

5 Quick recall

systemctl stop, docker stop and a Kubernetes pod deletion all send the same signal first. Which one?

In short

SIGTERM (15) is sent first; SIGKILL (9) only follows after the grace period.

Accepted

SIGTERM · sigterm · TERM

Why

SIGTERM (15) is the polite request every supervisor sends first: the process may catch it, drain and exit. Only when it has not exited by the end of the grace period (systemd's TimeoutStopSec, Docker's 10 s, Kubernetes' terminationGracePeriodSeconds of 30 s by default) does SIGKILL (9) follow, and SIGKILL cannot be caught. A container that always takes the full grace period is one whose PID 1 never acted on the SIGTERM.

Read the docs

6 Pick the strongest answer

Quick one: what is a zombie process (Z, <defunct>), and how much memory is it holding?

  1. A process blocked on disk I/O that cannot be killed. That is uninterruptible sleep (D), a different and much more annoying state.
  2. A process that has exited but whose parent has not yet called wait() to collect its exit status. It holds only a process-table entry — no memory, no CPU. The zombie is the bookkeeping record of a dead process, kept so the parent can still read how it died.
  3. A process stuck in an infinite loop, consuming a full core. That is a runaway process; a zombie is already dead and runs nothing.
  4. A leaked process holding its full heap until reboot. All of its memory was freed at exit; only the table entry remains.
In short

A zombie has already exited and holds only a process-table entry, so it uses no memory and no CPU.

Why

The give-away that somebody has actually debugged this is the phrase "you cannot kill a zombie". The follow-up in most interviews is "so how do you clear them", and the answer is to signal or restart the parent.

The common mistake

Trying to kill -9 the zombie. It changes nothing, because there is no process left to signal.

Read the docs

7 Read the output

Why did kill -9 leave the process running?

$ ps -eo pid,ppid,stat,wchan:20,comm | grep -E 'STAT|backup'
  PID  PPID STAT WCHAN                COMMAND
14022     1 Ss   ep_poll              backup-agent
14108 14022 D    nfs_wait_on_request  backup-worker

$ sudo kill -9 14108
$ ps -o pid,stat,comm -p 14108
  PID STAT COMMAND
14108 D    backup-worker
  1. The parent process is restarting it under the same PID. PIDs are not reused that quickly, and the STAT would not stay D.
  2. It is in uninterruptible sleep (D) waiting on an NFS operation. The signal is recorded but cannot be delivered until the kernel call returns, so the process only dies once the NFS server responds or the mount times out. D state means the task is inside a kernel call that will not accept signals; the wchan names the NFS wait.
  3. The command needed sudo, which was missing. sudo was used, and a permission failure would have printed an error.
  4. SIGKILL was blocked by the process's signal handler. SIGKILL cannot be caught or blocked; delivery is what is delayed here, not permission.
In short

A process in D state is waiting inside the kernel, and no signal reaches it until that wait finishes.

Why

This is one of the highest-signal Linux questions there is: it separates "kill -9 always works" from an understanding of where signals are actually delivered. The bonus point is connecting D state to a load average that looks catastrophic while CPU sits at 5%.

The common mistake

Escalating to harder and harder kills. The problem is the disk or the NFS server, not the process.

Read the docs

8 Scenario: what do you do next?

A build host starts failing every new command with fork: retry: Resource temporarily unavailable. You still have one SSH session open from earlier. uptime shows a load average of 3 on a 16-core machine and plenty of free memory.

Step 1. What is your first move, given that you may not be able to start new processes?

  1. Reboot the host to clear it. It restores service and destroys the evidence, and the leak will simply refill after the next build.
  2. Open a second SSH session to work in parallel. Logging in forks; you will likely fail to connect and you gain nothing.
  3. Use the shell you already have and prefer builtins — the session's own shell can still run echo, and reading /proc needs no fork. Count processes and check kernel.pid_max and the user's nproc limit before spending your one working session. Fork failures with free memory mean a process or PID limit, and every external command you run risks losing the session you have.
  4. Add more RAM to the host. Memory is free; this is a count limit, not a capacity limit.

Step 2. There are 31,900 processes, nearly all <defunct> children of one CI agent, and nproc for that user is 32,768. What is the cause and the immediate fix?

  1. Delete the CI agent's work directory. Disk is not the constraint and this destroys build state.
  2. The CI agent has stopped reaping its children, so zombies are consuming the user's process allowance. Signal or restart the agent — its children are re-parented to init and reaped instantly. Zombies can only be cleared through the parent, and restarting the parent releases all of them at once.
  3. Kill the zombie processes individually with kill -9. A zombie is already dead; signals do nothing to it.
  4. Raise kernel.pid_max to 4 million. It buys time and lets the leak grow larger before the same failure returns.

Step 3. What stops it recurring?

  1. Cron a nightly restart of the agent. It masks the leak and fails the moment the leak rate outpaces the schedule.
  2. Fix or upgrade the agent so it reaps, run it under an init that reaps orphans, and alert on process count against nproc so the trend is visible days before it saturates. One fix for the cause, one guard for the class of bug, one alert that turns a 3am outage into a Tuesday ticket.
  3. Move the build to a bigger instance type. Process limits are per-user and unrelated to instance size.
In short

Work from the shell you already have, restart the CI agent whose zombies used up the process limit, then fix the agent so it reaps and alert on the process count.

Why

Interviewers use PID exhaustion because the naive answer is "out of memory" and the correct one requires reading the error precisely. The zombie twist adds the second insight — that you fix the parent, never the children.

Read the docs

9 Read the output

Walk me through it: why did the stop take ten seconds, and why exit code 137?

# Dockerfile
FROM python:3.12-slim
COPY app.py /app.py
CMD sh -c "python /app.py"

$ docker stop app
# ... 10 seconds pass ...
app
$ docker inspect app --format '{{.State.ExitCode}}'
137
  1. Python caught SIGTERM and spent the ten seconds in its own cleanup before exiting 137. 137 is 128 + 9: the process was SIGKILLed. A process that handled SIGTERM would exit within milliseconds with its own status, or 143 if the default action had run.
  2. docker stop always waits ten seconds before exiting. It waits only if the process has not exited after SIGTERM.
  3. The container ran out of memory and was OOMKilled. 137 is SIGKILL; OOM is one cause, a timed-out stop is another. Inspect shows OOMKilled separately.
  4. Nothing acted on SIGTERM: whatever ended up as PID 1 (the shell, or python once dash exec'd the single command) has no SIGTERM handler, and PID 1 ignores signals it has no handler for, so Docker waited its 10-second grace period and sent SIGKILL (128 + 9 = 137). PID 1 gets no default signal actions; without a handler, or an init in front of the app, the stop request is dropped and the runtime escalates to SIGKILL.
In short

Nothing handled SIGTERM as PID 1, and PID 1 ignores unhandled signals, so Docker waited 10 seconds and sent SIGKILL, which gives exit code 137.

Why

PID 1 has special responsibilities: it receives the stop signal, gets no default signal actions, and must reap orphans. So a clean stop needs a handler in PID 1 or an init in front of the app: install a SIGTERM handler in python, or run under tini / docker run --init so python is an ordinary child with default dispositions. Exec form (CMD ["python", "/app.py"]) matters when the app has a handler and a shell would otherwise sit in front of it; on its own it does not fix an app that never handled SIGTERM. The same mechanism explains slow Kubernetes pod terminations and zombie build-up.

Read the docs

10 Find what's broken

A teammate asks you to review this unit. Every restart corrupts the indexer's on-disk state and produces duplicate rows downstream, and when the indexer crashes, systemctl status reports a clean exit. Which two lines?

[Unit]
Description=ledger indexer
After=network-online.target

[Service]
Type=simple
User=indexer
ExecStart=/bin/sh -c "/opt/indexer/bin/indexer --config /etc/indexer.toml 2>&1 | logger -t indexer"
KillSignal=SIGKILL
TimeoutStopSec=90
Restart=always
RestartSec=2

[Install]
WantedBy=multi-user.target
In short

Line 9 (KillSignal=SIGKILL) gives the indexer no chance to flush, and line 8 hides it behind a shell pipeline; use the default SIGTERM and run the binary directly.

What's broken
  • Line 8: The shell pipeline makes sh the unit's main process: MainPID, the exit status and the restart decision follow the shell, whose status is logger's, so a crashed indexer reports as a clean exit; and a shell never forwards signals, so under KillMode=mixed or process (or as PID 1 in a container) the indexer would not see SIGTERM at all.
  • Line 9: KillSignal=SIGKILL skips graceful shutdown entirely; the process cannot flush or checkpoint.
Why

Graceful shutdown needs two things: the signal must reach the real process, and it must be a signal the process can handle. SIGKILL breaks the second outright; the shell wrapper puts the wrong process in front of the first and hides the indexer's real exit status behind the pipeline's (signal delivery is still fine under the default KillMode=control-group, fatal under mixed/process or in a container). TimeoutStopSec 90 (line 10) is fine on its own; Restart=always (line 11) is fine too. Interviewers who work on stateful infra love this one because it is how idempotency bugs are born.

Read the docs

11 Quick recall

Quick one: which signal is behind kill -9, the one no process can catch, block or ignore?

In short

SIGKILL (signal 9) cannot be caught, blocked or ignored.

Accepted

SIGKILL · sigkill · kill -9

Why

SIGKILL (9) and SIGSTOP (19) are handled by the kernel alone; SIGTERM (15) is the polite, catchable request.

12 Scenario: what do you do next?

The interviewer sets it up in one line: "a system is running out of PIDs." Concretely: a build host starts failing jobs with fork: retry: Resource temporarily unavailable, free -m shows 40 GB available, CPU is 20%, and SSH still works, barely.

Step 1. First check?

  1. Check disk space. The error is from fork, not from a filesystem call.
  2. Increase pid_max to the maximum. Possibly later; first find what is consuming PIDs or you buy an hour.
  3. Count processes and threads against the limits: ps -eLf | wc -l, cat /proc/sys/kernel/pid_max, cat /proc/sys/kernel/threads-max, and per-cgroup pids.current/pids.max; also ulimit -u for the failing user. fork EAGAIN with memory free points at a count limit; measuring against every relevant limit finds which one.
  4. Reboot the host to clear it. It clears the symptom, loses the evidence, and the leak comes back.

Step 2. There are 31,000 threads; 28,000 belong to one CI agent whose children are zombies (Z). What is the mitigation?

  1. Restart the CI agent (the parent that is not reaping), which frees the PIDs immediately; drain new jobs from the host while you do it. Kills the problem at its source with a bounded blast radius; the zombies vanish when the parent goes.
  2. kill -9 all zombie processes. Zombies cannot be killed; they are already dead.
  3. Raise threads-max so jobs can continue. It buys minutes and hides a leak that will exhaust the new limit too.
  4. Add swap. Memory is not the constraint.

Step 3. Systemic fix?

  1. Set pid_max to 4 million everywhere. A bigger bucket for the same leak.
  2. Ask the CI team to fix their agent. Necessary but not sufficient; the host still needs a guardrail.
  3. Run the agent under a proper init (systemd service or tini) that reaps children, put it in a cgroup with pids.max so a leak cannot take the host, and alert on pids.current approaching the limit. Reaping fixes the cause, the cgroup bounds the blast radius, the alert catches regressions early.
In short

Count processes and threads against pid_max, threads-max and pids.max, restart the parent that is not reaping its zombies, then put the agent under an init and a pids limit.

Why

Resource exhaustion that is not CPU, memory, or disk confuses people; the discipline is to enumerate the limits fork can hit and measure against each. Zombies are the classic PID leak. Interviewers use this prompt to see whether you go from symptom to the specific exhausted resource to the process that owns it.

Read the docs

Next lesson Users, permissions, and host security: modes, special bits, capabilities, sudo, SSH, and audit
Drill · Processes and signals
0:00

Loading…