Skip to content

Child processes are not reaped - growing number of zombie processes #144

@vlcinsky

Description

@vlcinsky

We used dockerize with script, which is regularly fetching some external data.

The script is here: https://gitlab.com/tamtamresearch/cet/datahub/app-es-openlr/svc_es_openlr_doit/snippets/1908196

After a day we have found, CPU usage (in %) is growing:

image

  • green: user
  • red: system
  • black: iowait

Apparently, we did one system reboot.

Researching the cause, we have found, that there are thousands of zombie processes and the number was steadily growing.

The call in our Dockerfile looked like:

ENTRYPOINT ["dockerize", "-wait", "tcp://db:5432", "./repeat.sh"]
CMD ["3m", "./handlers/downloadData.php" ]

Changing it to (note: the call I put into original issue was mistakenly simple copy of the previous one, I cannot remember exactly what was the fix, I guess we have used shell or bash with -c)

ENTRYPOINT ["dockerize", "-wait", "tcp://db:5432", "./repeat.sh"]
CMD ["3m", "./handlers/downloadData.php" ]

resolved the problem: the number of zombie processes is zero now.

Conclusions

To me it seems, like dockerize script is not taking care of reaping child processes which were terminated and due to the environment, where it runs, nothing else does this important cleanup work.

It seems we hit similar issue as author of pull request #126

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions