Skip to content

Zombie python processes accumulating #378

Description

@david-becher

I noticed that the aks-mcp accumulates python zombie processes when run, e.g., in ca Kubernetes cluster, see the screenshot below ("Z" indicates Zombie process).

Image

This can lead to process exhaustion and file descriptor exhaustion (worst case scenario). It is also logged as an K8s event when to many Zombie processes accumulate.

ZombieProcessAccumulation: 20 zombie processes on node (threshold: 20)

One way to mitigate this, is either to handle SIGCHILD signals and effectively makeing a wait syscall on these processes, or just using something like tini or dumb-init in the dockerfile, which acts as a init process and reaps zombie processes.

To reproduce: run it in a container, exec into the running container and execute top.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions