-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker stop command create <defunct> process #29
Comments
FYI I see the same issue with Update: The only log changing is
And some info about my test setup:
With |
Note: Mounting and unmounting via an /etc/fstab entry and writing to the mount point does not cause the defunct process count to increase. Linux mount command produced this in the
And unmount caused this:
These seem to match the GlusterFS log lines produced by the trajano Docker volume plugin. |
So, as far as I can work it out it seems that this plugin executes a command to do the mount, which looks like If I execute such a command on my host myself, first making sure that the target mount point directory exists, then indeed I get a successful GlusterFS mount, and a background A defunct process implies a parent that hasn't or won't clean it up. I don't know anything about the Docker process model, I assume the Maybe the issue here is that since the However, I see that the |
Passing
|
I'm attempting to modify the plugin to store the pid then kill it instead of calling unmount. Will let you know how it goes. Thanks to |
Hmm, I was wrong, killing the process also makes it defunct. |
So, on my LXD VM at least, the process hierarchy is as follows (according to
And it's this Using
So, wikipedia, source of all truth, says about defunct processes:
So the gluster-volume-plugin doesn't call |
The plugin uses CombinedOutput() as mentioned in the ticket here about defunct processes caused by Go exec, however the help given that ticket doesn't apply here as we cannot stop or do not want to stop glusterfs becoming a daeamon. This looks relevant: gluster/glusterfs#626 |
Note: running |
Maybe the problem is as simple as the plugin not being a single process docker container but launching other processes and not acting as a true PID 1 process so nothing ever reaps the other processes, i.e. use tini or s6 or any of the other Docker mini init implementations? |
Yes! I'll submit a PR for using tini as that solved it for me. |
…unct glusterfs processes.
…unct glusterfs processes.
@btheu: I suggested that I fork and publish a fixed version of the plugin and @trajano advised that that is the best way currently to get this fix released. I'll comment here when the release from my own fork is ready. Thanks @trajano. |
Update: I'll try and get to publishing my port as soon as I can, some other priorities and the consequences of the global situation got in the way until now. FYI for my own purposes I did already publish a Docker image containing the |
Every time a container having a glusterfs docker volume mounted is stopped, a daemon process typed as <defunct> is created.
After a control-c, ps aux shows defunct. This is what ps command shows after 6 starts and stops.
Regards,
The text was updated successfully, but these errors were encountered: