Re: [PATCH] receive-pack: close sideband fd on early pack errors

2013-04-19 Thread Junio C Hamano
Jeff King writes: > This was triggered in the real world by attempting to push a ref from > a corrupted repository. pack-objects dies on the local end, we get an > eof on the receive-pack end without any data, notice that it's a bogus > packfile, and hit the deadlock. > > The bug was introduced b

[PATCH] receive-pack: close sideband fd on early pack errors

2013-04-19 Thread Jeff King
Since commit a22e6f8 (receive-pack: send pack-processing stderr over sideband, 2012-09-21), receive-pack will start an async sideband thread to copy the stderr from our index-pack or unpack-objects child to the client. We hand the thread's input descriptor to unpack(), which puts it in the "err" me