Re: [PATCH 0/4] fix hang in git push when pack-objects fails
From: Jeff King <hidden>
Date: 2016-06-15 22:50:57
On Thu, Mar 31, 2011 at 10:45:38PM +0200, Johannes Sixt wrote:
On Donnerstag, 31. März 2011, Jeff King wrote:quoted
1. do nothing. I'm not 100% sure why, but the bug does not manifest itself with pthreads. I don't know how it behaves on win32.The reason might be that with threads we carefully close file descriptors, so that the other end sees EOF or broken pipe and terminates, while with a forked sideband demux one of the channels remains open in the forked process?
That was my thought, too, except that:
1. I don't see us closing the descriptor after we fork the async code
off. So even if the async code carefully closed it, the main
process would still have it open.
2. In some cases it may not even be a file descriptor that needs
closed, but rather a half-duplex shutdown (e.g., for git-over-tcp).
Because the point of the async code is that it is reading from the
remote socket.
So I'm really not sure. I can do some straces and try to investigate
further on what happens in the pthread case. But regardless, it seems
like we should be killing off any async processes explicitly on error.
-Peff