docker-crashplan-pro icon indicating copy to clipboard operation
docker-crashplan-pro copied to clipboard

s6-notifyonchec zombie process

Open klieber opened this issue 5 years ago • 7 comments

I'm seeing the following zombie process when using this container:

PID  PPID  C STIME TTY      TIME        CMD
405 32589 30 Sep09 ?        3-00:41:55  /usr/local/crashplan/bin/CrashPlanService
412   405  0 Sep09 ?        00:00:00    [s6-notifyonchec] <defunct>

This appears to be a similar issue that was reported with your docker-handbrake container back in April: jlesage/docker-handbrake#59

Wondering if the same fix needs applied to this one?

Also, thank you for all your work on this container!

klieber avatar Sep 20 '19 00:09 klieber

Which version of the image are you using?

jlesage avatar Sep 20 '19 01:09 jlesage

Which version of the image are you using?

2.7.3

klieber avatar Sep 20 '19 20:09 klieber

The fix has been applied on version 2.6.4... I will check if I have the same thing on my side.

jlesage avatar Sep 22 '19 00:09 jlesage

Just wanted to say I'm observing the same on 2.9.0

~> ps axo stat,ppid,pid,comm | grep -w defunct
Z    22580 22591 s6-notifyonchec <defunct>
image

XDGFX avatar Jan 14 '20 16:01 XDGFX

This appears to have come back

**** 421 7.5 1.0 10232528 351960 ? Ssl 12:36 0:28 /usr/local/crashplan/bin/Code42Service root 432 0.0 0.0 0 0 ? Z 12:36 0:00 [s6-notifyonchec]

Z 421 432 s6-notifyonchec

Running Latest: 2.14.0 I just logged into ubuntu informing me of zombie processes tried restarting docker comes back, restarted entire system comes back. Verified latest version from docker image.

GreatHolyCow avatar May 01 '21 19:05 GreatHolyCow

Just stumbled upon this while researching a similar problem.

By default, s6-notifyoncheck forks itself before exec'ing into the program you trying to wait for readiness (I guess CrashPlanService in your case). Now s6-notifyoncheck, your process likely won't reap the child process, hence it will stay as a zombie process.

s6-notifyoncheck has an option to avoid this:

-d : doublefork. s6-notifyoncheck will run as the grandchild of prog... instead of its direct child. 
     This is useful if prog... never reaps zombies it does not know it has. 

agners avatar Feb 17 '22 21:02 agners

@agners Thanks a lot, it worked! I had same issue with the container docker-firefox.

root@arkanoid:/usr/local/etc/firefox-docker/config# docker exec -it firefox-alpine /bin/bash
root@firefox-alpine:/# ps -ef
UID          PID    PPID  C STIME TTY          TIME CMD
root           1       0  0 17:44 ?        00:00:00 s6-svscan -t0 /var/run/s6/services
root          38       1  0 17:44 ?        00:00:00 s6-supervise s6-fdholderd
root         434       1  0 17:44 ?        00:00:00 s6-supervise xrdp
root         435       1  0 17:44 ?        00:00:00 s6-supervise guacd
root         436       1  0 17:44 ?        00:00:00 s6-supervise web
root         437       1  0 17:44 ?        00:00:00 s6-supervise autostart
root         439       1  0 17:44 ?        00:00:00 s6-supervise xrdp-sesman
root         441     434  0 17:44 ?        00:00:00 /usr/sbin/xrdp --nodaemon
abc          442     436  0 17:44 ?        00:00:00 node app.js
root         443     435  0 17:44 ?        00:00:00 /bin/bash ./run
root         444     437  0 17:44 ?        00:00:00 bash ./run
root         445     439  0 17:44 ?        00:00:00 /usr/sbin/xrdp-sesman --nodaemon
root         446     441  0 17:44 ?        00:00:00 [s6-notifyonchec] <defunct>
root         455     443  0 17:44 ?        00:00:00 /usr/sbin/guacd -f -b 0.0.0.0 -l 4822
root         464     444  0 17:44 ?        00:00:00 sleep infinity
root         483       0  0 17:45 pts/0    00:00:00 /bin/bash
root         491     483  0 17:45 pts/0    00:00:00 ps -ef

adding the -d on the line s6-notifyoncheck solved me problem too.

root@firefox-alpine:/# cat /etc/services.d/xrdp/run
#!/bin/execlineb -P

# Move stderr to out so it's piped to logger
fdmove -c 2 1

# Notify service manager when xrdp is up
s6-notifyoncheck -d -w 500 -c "true &>/dev/null </dev/tcp/127.0.0.1/3389"

# Wait until other services are running
if { s6-svwait -t 10000 -U /var/run/s6/services/xrdp-sesman/ }

# set env
s6-env DISPLAY=:1

/usr/sbin/xrdp --nodaemon

jobenvil avatar Jun 16 '22 16:06 jobenvil