[Bug Report] cubemastercli pod accumulates thousands of zombie processes (PID 1 = sleep infinity never reaps orphans)
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
6506Root cause
CubeMaster/docker/Dockerfile.cubemastercli ends with:
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:
- exec probes — the chart (
deploy/kubernetes/chart/templates/cubemastercli.yaml) defines readiness/liveness probes asexec(every 10s / 20s). - 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