From e655c8f75ad947d1be5b7be368dc4424f604a209 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 2 Dec 2015 12:55:04 -0400 Subject: [PATCH] welcome to the docker pid 1 zombie reaping problem --- ...c5d45bc2ecc95c3c770faa9e22acb._comment.swp | Bin 12288 -> 0 bytes ..._8390ade0c0a768d440bc71b20578ccbe._comment | 31 ++++++++++++++++++ 2 files changed, 31 insertions(+) delete mode 100644 doc/bugs/git-annex-unlock_shows_files___34__here__34____44___git-annex-whereis_doesn__39__t/.comment_1_f68c5d45bc2ecc95c3c770faa9e22acb._comment.swp create mode 100644 doc/bugs/git-annex_creates_many_zombies/comment_1_8390ade0c0a768d440bc71b20578ccbe._comment 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 88ae1a2cc855481f6fd8bcd3e2ee7bb1f858591a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2y>1gh5XU#v1W>4vCZl}fEGbb zi+Bbe13Fsr3RKMAIgrpqltFXSUw5}3v;X>Y z5g-CY;9m*&`5JqJn{KQ&ZmjNWf8AHFbRz;pfCvx)B0vO)01+SpM1Tko0U|&It|0*t zGj?{9vHf*4kN^Ll|NcL_&Db~87t}}8JCsFjp}yb3In-CwThuPZ3x; z$0)jp01+SpM1Tko0U|&IhyW2F0{QmHf;uw84mJj53KMEEKkI0ZxOR0f$?qlVxu z%*0fICt(!uqaRZ&oS}&GR&}}qXQ$NL~(Dq$LevP3gbp9<)K%7FepQg zH86N|JI>p~P7T-R*@t?15hu41fjT9y`~2_(3s2!ALofkOivgj4^3@cYH?9j+}VZBm=Md_77*L?{y*gRh_vgu6t J-Yi}i_6vJFMl=8b 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. +"""]] -- 2.30.2