From ffde7cf5658c2f0224f0061eff4b9ef1e1daf3f4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 17 Oct 2012 00:39:45 -0400 Subject: better fix for zombie problem, which turns out to be a zombie ssh started by rsync When rsyncProgress pipes rsync's stdout, this turns out to cause a ssh process started by rsync to be left behind as a zombie. I don't know why, but my recent zombie reaping cleanup was correct, it's just that this other zombie, that's not directly started by git-annex, was no longer reaped due to changes in the cleanup. Make rsyncProgress reap the zombie started by rsync, as a workaround. FWIW, the process tree looks like this. It seems like the rsync child is for some reason starting but not waiting on this extra ssh process. Ssh connection caching may be involved -- disabling it seemed to change the shape of the tree, but did not eliminate the zombie. 9378 pts/14 S+ 0:00 | \_ rsync -p --progress --inplace -4 -e 'ssh' '-S' ... 9379 pts/14 S+ 0:00 | | \_ ssh ... 9380 pts/14 S+ 0:00 | | \_ rsync -p --progress --inplace -4 -e 'ssh' '-S' ... 9381 pts/14 Z+ 0:00 | \_ [ssh] --- CmdLine.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'CmdLine.hs') diff --git a/CmdLine.hs b/CmdLine.hs index 331c363e4..66bf5b882 100644 --- a/CmdLine.hs +++ b/CmdLine.hs @@ -117,5 +117,6 @@ shutdown :: Bool -> Annex Bool shutdown nocommit = do saveState nocommit sequence_ =<< M.elems <$> Annex.getState Annex.cleanup + liftIO reapZombies -- zombies from long-running git processes sshCleanup -- ssh connection caching return True -- cgit v1.2.3