I was trying to get the sources for the Android 1.6 release, but the repo
sync operation keeps hanging.
I am pasting the last part of the message i get on the terminal here:
Fetching projects: 19% (32/164) Initializing project platform/external/freetype ... remote: Counting objects: 970, done. remote: Compressing objects: 100% (414/414), done. Receiving objects: 57% (558/970), 1.28 MiB | 26 KiB/s
It just hangs there… no error messages or aything of that sort.
Has anyone faced a similar issue?
I wonder if you are using VMWare to run Linux. I experienced the same problem as you until I’ve found what was causing it: the tcp window size on our side being set to 0 (full). I am running Ubuntu 10.04 on VMWare on Windows 7 64-bit as host. To fix it just make sure you give plenty of RAM to Ubuntu on VMWare to discard any memory issues. I had mine set to 512MB and increase it to 1.5M for better performance. Then the most important setting (and the one that did the trick actually): make sure you set the network adapter on VMWare to bridged mode. If using NAT for example, the NAT service will choke and mess the window size for you.
The TCP window size of a client tells the server the number of bytes it is willing to receive at one time from the server; this is the client’s receive window. When the window is set to 0 it means that the client won’t be able to receive any more data until it process whatever data is still pending in its internal buffers. This is normal TCP stuff. The size effect of a window set to 0 on a client is that a TCP connection will still be alive for some time until the server decides he has waiting enough and kill the connection. This is what was causing my repo sync to hang with no errors.
Hope this helps someone referring this forum.
I have had this issue of git clones of large repositories hanging. Initially the speed will be high and then comes down drastically and finally it hangs. It was a issue with TCP Window Scaling. Once that was disabled, it was working fine.
(But the strange part is that when I ran it from Linux in VMWare, there was no issue.)
To disable this for current session
$ sudo sysctl -w net.ipv4.tcp_window_scaling=0
There was a similar problem back in September on SO.