Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 359958

Summary: git clone hangs
Product: [Technology] EGit Reporter: Martin Oberhuber <mober.at+eclipse>
Component: CoreAssignee: Project Inbox <egit.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: jens.baumgart, matthias.sohn, remy.suen
Version: 1.0   
Target Milestone: 1.1   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Attachments:
Description Flags
thread dump
none
My configuration details
none
Thread dump after hitting the cancel button
none
screenshot showing where to cancel clone operation none

Description Martin Oberhuber CLA 2011-10-05 06:27:59 EDT
Created attachment 204581 [details]
thread dump

Build ID: Egit-1.0.0
(http://download.eclipse.org/egit/updates as per 5-Oct-2011)

Host: RHEL 5.3 x86_64 running a 32 bit JVM (Sun 1.6.0_21)

Performing a "Import Projects from git" and cloning an Eclipse git repo along the way reproducably hangs. The wizard counts objects, then proceeds until 5% or so then stops operation. Performing "git clone" on commandline for exactly the same repo has long since completed, EGit still hangs.

I used git://git.eclipse.org/gitroot/cdt/org.eclipse.cdt.git

Thread dump attached. Does the TimeoutInputStream really work as expected ?
Comment 1 Martin Oberhuber CLA 2011-10-05 06:29:55 EDT
I should add that from the import wizard, killing Eclipse is all I can do ... thus losing state and potentially data.
Comment 2 Martin Oberhuber CLA 2011-10-05 06:32:07 EDT
Created attachment 204582 [details]
My configuration details
Comment 3 Martin Oberhuber CLA 2011-10-05 06:55:54 EDT
Hm, I may have to eat my words ... when trying to reproduce, commandline git also hangs, so this may be a network connectivity problem ... still, in an ideal world I'd expect timeouts for this to work properly ?

1797 mober@szg-qa-lx2-64/local/mober/git$git clone git://git.eclipse.org/gitroot/cdt/org.eclipse.cdt.git
Cloning into org.eclipse.cdt...
remote: Counting objects: 445828, done.
remote: Compressing objects: 100% (74987/74987), done.
Receiving objects:   0% (1921/445828), 356.00 KiB | 112 KiB/s
Comment 4 Martin Oberhuber CLA 2011-10-05 15:17:53 EDT
Created attachment 204624 [details]
Thread dump after hitting the cancel button

Thinking this over again, I believe the main issue is that "cancel" did not work for the git clone operation when it hung due to network issues.

Attached is a 2nd thread dump from Eclipse still hanging after I hit the cancel button. Since the modal dialog was in front, I could only kill my Eclipse. I think that any network operation needs to be cancelable.
Comment 5 Matthias Sohn CLA 2011-10-09 04:25:33 EDT
I tried this with EGit 1.2 current nightly build and I can cancel clone operation in the Clone Wizard started from "Import projects from git". Clicking the red button to the right of the progress bar does cancel the clone operation (tried several times). 

Also please check the global "Remote connection timeout" in "Preferences > Team > Git". Before EGit commit 96282c0e32a2b4e02d1a5c3dd8e102143fe02f3c (submitted to master on 2011, July 29, i.e. after 1.0 was released) the default for this parameter was 0 which means JGit would never timeout hanging connections. Now the default timeout is 30 seconds.

Could you retry with latest nightly ?
Comment 6 Matthias Sohn CLA 2011-10-09 04:30:09 EDT
Created attachment 204821 [details]
screenshot showing where to cancel clone operation
Comment 7 Jens Baumgart CLA 2011-10-14 10:08:36 EDT
Checked the current EGit: started a clone operation and pulled the network cable. Afterwards I could cancel the operation.
I close the bug. Please reopen the bug if the problem reappears.