From: Joey Hess Date: Wed, 2 Dec 2015 16:55:04 +0000 (-0400) Subject: welcome to the docker pid 1 zombie reaping problem X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~322^2~37 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e655c8f75ad947d1be5b7be368dc4424f604a209;p=git-annex.git welcome to the docker pid 1 zombie reaping problem --- 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 deleted file mode 100644 index 88ae1a2cc8..0000000000 Binary files a/doc/bugs/git-annex-unlock_shows_files___34__here__34____44___git-annex-whereis_doesn__39__t/.comment_1_f68c5d45bc2ecc95c3c770faa9e22acb._comment.swp and /dev/null differ 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 0000000000..5985af21e4 --- /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 and here in the +general context of docker being broken +. + +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 +. + +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. +"""]]