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

Bug 337533

Summary: Eclipse hangs at Preferences-Team-Git-Configuration (and other places)
Product: [Technology] EGit Reporter: Alexey Markevich <a_markevich>
Component: UIAssignee: Robin Rosenberg <robin.rosenberg>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: caniszczyk, christian.fecht, fernando.ribeiro, jan.sievers, matthias.sohn, remy.suen, robin.rosenberg, robin, stefan.lay, thatnitind
Version: 0.11   
Target Milestone: 1.0.0   
Hardware: PC   
OS: Windows Server 2003   
Whiteboard:
Attachments:
Description Flags
Thread Dump none

Description Alexey Markevich CLA 2011-02-18 04:37:32 EST
Configuration:
Windows Server 2003 Enterprise x64 Edition Service Pack 2
jdk1.6.0_24_x64
eclipse-SDK-3.6.1-win32-x86_64

No records in error log view, no exceptions in Eclipse console.
Comment 1 Jens Baumgart CLA 2011-02-24 09:42:25 EST
We faced the same issue on a Windows XP machine with CYGWIN.

Thread Dump:

Thread [main] (Suspended)          
               java.io.FileInputStream.readBytes(byte[], int, int) line: not available [native method]         
               java.io.FileInputStream.read(byte[], int, int) line: 199        
               java.io.BufferedInputStream.read1(byte[], int, int) line: 256          
               java.io.BufferedInputStream.read(byte[], int, int) line: 317             
               sun.nio.cs.StreamDecoder.readBytes() line: 264  
               sun.nio.cs.StreamDecoder.implRead(char[], int, int) line: 306        
               sun.nio.cs.StreamDecoder.read(char[], int, int) line: 158  
               java.io.InputStreamReader.read(char[], int, int) line: 167 
               java.io.BufferedReader.fill() line: 136       
               java.io.BufferedReader.readLine(boolean) line: 299          
               java.io.BufferedReader.readLine() line: 362          
               org.eclipse.jgit.util.FS.readPipe(java.io.File, java.lang.String[], java.lang.String) line: 234   
               org.eclipse.jgit.util.FS_Win32_Cygwin(org.eclipse.jgit.util.FS_Win32).gitPrefix() line: 94     
               org.eclipse.jgit.util.SystemReader$1.openSystemConfig(org.eclipse.jgit.lib.Config, org.eclipse.jgit.util.FS) line: 77    
               org.eclipse.egit.ui.internal.preferences.GlobalConfigurationPreferencePage.init(org.eclipse.ui.IWorkbench) line: 145
Comment 2 Robin Rosenberg CLA 2011-04-10 17:52:27 EDT
*** Bug 342281 has been marked as a duplicate of this bug. ***
Comment 3 Robin Rosenberg CLA 2011-04-10 18:02:53 EDT
http://egit.eclipse.org/r/#change,2939 contains a workaround.
Comment 4 Robin Rosenberg CLA 2011-04-10 18:08:38 EDT
*** Bug 338342 has been marked as a duplicate of this bug. ***
Comment 5 Fernando Ribeiro CLA 2011-04-11 17:07:12 EDT
(In reply to comment #3)
> http://egit.eclipse.org/r/#change,2939 contains a workaround.

I didn't find it, can you add it here?
Comment 6 Robin Rosenberg CLA 2011-04-11 17:33:32 EDT
The workaround is to add 
-Djgit.gitprefix=/usr/local/git or whatever contains or would contain etc/gitconfig to (the end of) eclipse.ini

if jgit.gitprefix is defined JGit will no attempt to spawn a process in order
to figure it out
Comment 7 Fernando Ribeiro CLA 2011-04-11 20:31:28 EDT
Created attachment 192992 [details]
Thread Dump
Comment 8 Alexey Markevich CLA 2011-04-13 03:39:27 EDT
In my case I have cygwin at PATH. When I removed it - problem dissapeared.
Comment 9 Fernando Ribeiro CLA 2011-04-13 15:57:53 EDT
(In reply to comment #8)
> In my case I have cygwin at PATH. When I removed it - problem dissapeared.

I have Cygwin as well, hadn't realized that, will test again.
Comment 10 Fernando Ribeiro CLA 2011-04-13 16:43:11 EDT
(In reply to comment #9)
> (In reply to comment #8)
> > In my case I have cygwin at PATH. When I removed it - problem dissapeared.
> 
> I have Cygwin as well, hadn't realized that, will test again.

The issue is now gone after that change alone, didn't have to set jgit.gitprefix manually.
Comment 11 Fernando Ribeiro CLA 2011-04-13 16:46:06 EDT
Is the current patch going to be in 0.12?
Comment 12 Matthias Sohn CLA 2011-04-19 07:12:51 EDT
yes, this patch will be shipped with 0.12
Comment 13 Robin Rosenberg CLA 2011-04-24 17:16:30 EDT
*** Bug 343473 has been marked as a duplicate of this bug. ***
Comment 14 Robin Rosenberg CLA 2011-04-26 18:14:34 EDT
Any volunteers to test http://egit.eclipse.org/r/3261 ?

This patch is more debuggable and does things a little better.
Comment 15 Chris Aniszczyk CLA 2011-05-03 12:54:58 EDT
This issue is a bit difficult to reproduce and Robin's fix should help.

To debug further if you run into this issue ever again, ensure jgit.fs.debug is set to true.