Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Repo sync hangs

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?

like image 690
rahul Avatar asked Jan 19 '10 06:01

rahul


People also ask

Can I pause repo sync?

If you want to pause the repo sync for a while and resume it later time of the day, press "CTRL + Z" and to resume the sync, type "fg" and press enter. If you want to switch off computer and do the sync tomorrow, Press "CTRL + Z" and Switch off computer.

What is repo sync?

repo sync [ project-list ] Downloads new changes and updates the working files in your local environment, essentially accomplishing git fetch across all Git repositories. If you run repo sync without arguments, it synchronizes the files for all projects.


1 Answers

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.

Cause: 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.

like image 103
Trenado Avatar answered Oct 20 '22 13:10

Trenado