New issue 457 by charleso: Push hangs in latest msysgit 1.7.0.2
http://code.google.com/p/msysgit/issues/detail?id=457
What steps will reproduce the problem?
1. Start a Git daemon, with receive-pack enabled
2. Push anything (new branch or update of current branch)
3. Git client hangs indefinitely...
What is the expected output? What do you see instead?
git daemon --export-all --enable=receive-pack --base-path=`pwd` --verbose
[13353] Connection from 10.1.1.3:56651
[13353] Extended attributes (15 bytes) exist <host=10.1.1.3>
[13353] Request receive-pack for '/blah'
Pushing with verbose on the client doesn't seem to have anything useful to
say.
What version of the product are you using? On what operating system?
Using the latest version of msysgit (1.7.0.2) on Windows and 1.7.0.3 on
Ubuntu as the server.
Please provide any additional information below.
I am able to push to my github account just fine (ie
g...@github.com:me/blah.git). Fetching and deleting branches works ok. After
reverting back to the previous msysgit version I can push again. I've
tested this on three separate Windows machines and two different Ubuntu
machines with the daemon, so I'm pretty sure it's not an isolated case.
I've attached two Wireshark traces. One from a working 1.6.5.1 and the
other obviously the unresponsive 1.7.0.2.
Can I hazard a guess it's related to 'receive-pack' service? Does anyone
have any idea from these scraps of information? Apologies in advance if
this has been answered elsewhere or I've missed something obvious.
Attachments:
bad.trace 1.6 KB
good.trace 2.0 KB
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
I have tracked this down to a886ba2, which was a feature developed by Shawn
Pearce. I
have contacted (harassed) him directly to see if he has any ideas. I'll
also see if I
can pin-point the issue further, but my C skills are pretty much
non-existent.
Yea, I have no clue what's going on here.
The side-band-64k shouldn't have had a big impact on
Win32. But apparently it does. bad.trace seems to
imply that the client is waiting for something after
it has sent the command list, but before it sends the
pack file. The server is most certainly waiting for
the pack. So classic case of deadlock due to both of
the peers trying to read at once?
This is likely the "if (use_sideband && cmds_sent)"
block of builtin-send-pack.c around line 474. There
must be a deadlock in the client while it is creating
the async thread to act as a side-band demux.
As for why GitHub works and local git-daemon doesn't,
they probably haven't upgraded their binaries to use
the side-band-64k protocol for send-pack/receive-pack
yet. So the option isn't being enabled, and the client
is bypassing this start_async invocation.
Sorry I can't be more help. But I just don't get the
async stuff used in Win32.
I still don't understand exactly what's going on, but moving the
start_async call after pack_objects avoids the problem for me (so far).
Seeing as "in" isn't passed into pack_objects, I don't see how the attached
patch could hurt anything. Is the sideband_demux thread needed for anything
before receive_status?
I don't really like to make changes like this without grokking the cause of
the problem, but at least it isn't "sleep".
Attachments:
patch 1.1 KB
sideband_demux is needed to consume error message that the server side
produces while pack_objects sends data to the server. By moving the demuxer
later, there is nobody who consumes data (error messages) sent back from
the server to the client; this could fill up network buffers and ultimately
dead-lock the communication.
I'm afraid your patch is not a solution.
BTW, patches are better submitted to the mailing list and discussed there.
also occurs on Git-1.7.2.3-preview20100911.exe
This is still an ongoing issue with 1.7.2.3 on the Windows client and the
Linux server (same revision). Push hangs indefinitely. Push from Eclipse
EGit works from local (Windows) machine, and from other Linux hosts.
also occurs on Git-1.7.3.1-preview20101002.exe
Until someone figures out the solution, I also suggest the quick and dirty
patch:
sed -i -e 's@use_sideband = 1;@use_sideband = 0; // work-around for msysgit
bug 457@' builtin/send-pack.c