docker-atlassian-bamboo icon indicating copy to clipboard operation
docker-atlassian-bamboo copied to clipboard

Use proper init process

Open cdauth opened this issue 7 years ago • 3 comments

We are having a lot of zombie processes in our process list:

root      2408  0.0  0.0 413628  2876 ?        Sl   Apr18   0:11  \_ /usr/bin/containerd-shim 9aa19a2252d9f05bec000dde8054f939e78159155967d9724bc13fdc95d1502f /var/run/docker/libco
bin       2435  3.0 14.2 5293812 1754428 ?     Ssl  Apr18  37:21  |   \_ /usr/lib/jvm/java-8-openjdk-amd64/bin/java -Djava.util.logging.config.file=/opt/atlassian/bamboo/conf/loggi
bin       3434  0.0  0.0      0     0 ?        Z    Apr18   0:00  |       \_ [ssh] <defunct>
bin       3480  0.0  0.0      0     0 ?        Z    Apr18   0:00  |       \_ [ssh] <defunct>
bin       3514  0.0  0.0      0     0 ?        Z    Apr18   0:00  |       \_ [ssh] <defunct>
bin       3522  0.0  0.0      0     0 ?        Z    Apr18   0:00  |       \_ [ssh] <defunct>
bin       3635  0.0  0.0      0     0 ?        Z    Apr18   0:00  |       \_ [ssh] <defunct>
bin       3658  0.0  0.0      0     0 ?        Z    Apr18   0:00  |       \_ [ssh] <defunct>
bin       3683  0.0  0.0      0     0 ?        Z    Apr18   0:00  |       \_ [ssh] <defunct>
bin       3705  0.0  0.0      0     0 ?        Z    Apr18   0:00  |       \_ [ssh] <defunct>
bin       3725  0.0  0.0      0     0 ?        Z    Apr18   0:00  |       \_ [ssh] <defunct>
bin       3738  0.0  0.0      0     0 ?        Z    Apr18   0:00  |       \_ [ssh] <defunct>
bin       3770  0.0  0.0      0     0 ?        Z    Apr18   0:00  |       \_ [ssh] <defunct>
bin       3787  0.0  0.0      0     0 ?        Z    Apr18   0:00  |       \_ [ssh] <defunct>
bin       4177  0.0  0.0      0     0 ?        Z    Apr18   0:00  |       \_ [ssh] <defunct>
bin       4199  0.0  0.0      0     0 ?        Z    Apr18   0:00  |       \_ [ssh] <defunct>
bin       4813  0.0  0.0      0     0 ?        Z    Apr18   0:00  |       \_ [ssh] <defunct>
bin       4832  0.0  0.0      0     0 ?        Z    Apr18   0:00  |       \_ [ssh] <defunct>
bin      10591  0.0  0.0      0     0 ?        Z    Apr18   0:00  |       \_ [ssh] <defunct>
bin      10620  0.0  0.0      0     0 ?        Z    Apr18   0:00  |       \_ [ssh] <defunct>
bin      11061  0.0  0.0      0     0 ?        Z    Apr18   0:00  |       \_ [ssh] <defunct>

(continues for 1000s of lines).

The SSH processes are most probably created by Bamboo when it fetches Git repositories from Bitbucket.

This issue is probably related to the fact that Java is the main process in the docker container, and could easily be solved by using tini or dumb-init in the entrypoint script.

cdauth avatar Apr 19 '17 14:04 cdauth

Having seen this problem in our environment, I'm putting together a fix for this. It is based on top of my fix for #4, so I need/want to wait to see what happens to it before I push this one.

pwagland avatar May 13 '17 22:05 pwagland

Is there any progress on this ticket? In my environment it seems that the propper init process of @cbromberg does fix the problem: https://github.com/cbromberg/docker-atlassian-bamboo/commit/87156e02328783bdc07d37e0c3f5c29c39ade47d

I don't know why he didn't create a PR. @cptactionhank will it be possible to merge this changeset into your project?

cguentherTUChemnitz avatar Jan 08 '18 15:01 cguentherTUChemnitz

@cguentherTUChemnitz I created a PR and withdrew it again as the "proper init process" is already part of docker and docker-compose since 1.13.0: see comment here https://github.com/cptactionhank/docker-atlassian-bamboo/pull/7

cbromberg avatar Jan 08 '18 16:01 cbromberg