diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-12-02 12:55:04 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-12-02 12:55:04 -0400 |
commit | d1b81dcb7cfd85e8128914d38c192ebca58c8279 (patch) | |
tree | 93b496082c4fcb7f078eef2850fc69213131d235 /doc | |
parent | cc5f399db7502291fe2e01c5773095e88aefcbb8 (diff) |
welcome to the docker pid 1 zombie reaping problem
Diffstat (limited to 'doc')
2 files changed, 31 insertions, 0 deletions
diff --git a/doc/bugs/git-annex-unlock_shows_files___34__here__34____44___git-annex-whereis_doesn__39__t/.comment_1_f68c5d45bc2ecc95c3c770faa9e22acb._comment.swp b/doc/bugs/git-annex-unlock_shows_files___34__here__34____44___git-annex-whereis_doesn__39__t/.comment_1_f68c5d45bc2ecc95c3c770faa9e22acb._comment.swp Binary files differdeleted file mode 100644 index 88ae1a2cc..000000000 --- a/doc/bugs/git-annex-unlock_shows_files___34__here__34____44___git-annex-whereis_doesn__39__t/.comment_1_f68c5d45bc2ecc95c3c770faa9e22acb._comment.swp +++ /dev/null diff --git a/doc/bugs/git-annex_creates_many_zombies/comment_1_8390ade0c0a768d440bc71b20578ccbe._comment b/doc/bugs/git-annex_creates_many_zombies/comment_1_8390ade0c0a768d440bc71b20578ccbe._comment new file mode 100644 index 000000000..5985af21e --- /dev/null +++ b/doc/bugs/git-annex_creates_many_zombies/comment_1_8390ade0c0a768d440bc71b20578ccbe._comment @@ -0,0 +1,31 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2015-12-02T16:34:03Z" + content=""" +This seems to be the same problem discussed here in the context of +git-annex <https://github.com/datalad/datalad/issues/132> and here in the +general context of docker being broken +<blog.phusion.nl/2015/01/20/docker-and-the-pid-1-zombie-reaping-problem/>. + +So, it's a docker problem; since docker containers lack +any proper init, nothing waits on orphaned processes. While git-annex +normally waits on all child processes it starts, if a git-annex process +itself exits for some reason (eg an error) while a child process is +running, this results in an orphaned process. + +It is the responsibility of init to wait on such orphaned processes. So, eg +systemd-nspawn containers don't have this problem (in addition to their +many, many other benefits over docker). And if you're stuck running docker +all it takes to solve the problem is to make the top-level process in the +container do a `wait()` loop. As is done by eg +<http://github.com/phusion/baseimage-docker>. + +It might be possible for git-annex to have a top-level exception +handler that waits on any child processes that might be running. However, +this seems difficult to arrange; when git-annex was talking to a child +process over a handle, the child process may keep running as long as that +handle remains open, so the exception handler would block waiting for the +child process to exit. This kind of difficulty is probably why unix +delegates this job to init in the first place. +"""]] |