[Bug Report] cubemastercli pod accumulates thousands of zombie processes (PID 1 = sleep infinity never reaps orphans)

Author: jiaweienCreated Sep 24, 2026Updated Sep 28, 2026
Labelsbugarea/CubeMasterneeds-triagebug-report-fixes-under-review

Observed in production

On a live cluster node, the pod cube-system/cube-cubemastercli-57c49f66d8-s7txq (container cubemastercli) accumulated 6500+ <defunct> zombie processes within ~3 weeks, all re-parented to the container's PID 1 (sleep infinity), and still growing.

$ ps -eo pid,ppid,stat,etime,cmd | awk '$3 ~ /^Z/' | head
   1205 3072253 Z    20-17:16:39 [cubemastercli] <defunct>
   ...
$ ps -eo stat | grep -c Z
6506

Root cause

CubeMaster/docker/Dockerfile.cubemastercli ends with:

dockerfile
CMD ["sleep", "infinity"]

sleep (container PID 1) never calls wait(), so every orphaned child re-parented to it stays a zombie forever. Zombie sources in this pod:

  1. exec probes — the chart (deploy/kubernetes/chart/templates/cubemastercli.yaml) defines readiness/liveness probes as exec (every 10s / 20s).
  2. kubectl exec / crictl exec — every operational CLI invocation (kubectl exec ... -- cubemastercli ...) and every interactive bash session adds orphaned children on exit.

Impact

PID space exhaustion in the container over time; requires periodic pod restarts as a workaround (a restart clears existing zombies but they immediately re-accumulate).

Proposed fix

Install tini in the image runtime stage and run it as PID 1 (ENTRYPOINT ["/usr/bin/tini", "-s", "--"], CMD ["sleep", "infinity"] unchanged), following the same pattern already used by node-bootstrap-daemonset.yaml and pvm-startup-gate-* templates (/usr/bin/tini -s --). tini reaps orphaned children, eliminating zombie accumulation.

PR incoming.

Assisted-by: kscc:glm-5.3-flash

Source: TencentCloud/CubeSandbox