Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: git hangs on pthread_join

From: Jeff King <hidden>
Date: 2016-06-15 22:57:28

On Thu, May 23, 2013 at 03:01:43PM +0200, Ian Kumlien wrote:
git 1.8.2.1 is started by xinetd
[...]
I have found "git receive-pack"s that has been running for days/weeks
without terminating....

Attaching gdb and doing a trace results in:
#0  0x0000003261207b35 in pthread_join () from /lib64/libpthread.so.0
#1  0x00000000004ce58b in finish_async ()
#2  0x000000000045744b in cmd_receive_pack ()
#3  0x0000000000404851 in handle_internal_command ()
#4  0x0000000000404c9d in main ()
I recently fixed a deadlock that could happen in receive-pack when
clients hung up before sending a valid pack header. The fix is commit
49ecfa1, and it's in git v1.8.2.2.

The stack trace for the deadlock fixed by 49ecfa1 would have
unpack_with_sideband between #1 and #2 above, but it is entirely
possible that it is simply inlined in your build of git, depending on
the -O level of your build (it is a static function that is only called
from one place). So it seems likely that it is the culprit.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help