Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » commit process hangs:()(commit not possible)
commit process hangs:() [message #696648] Thu, 14 July 2011 13:41 Go to next message
Andre Heine is currently offline Andre Heine
Messages: 6
Registered: July 2011
Junior Member
Hello all,

I have a problem to commit my staged file to my local repo.

First I "add" (Team->Add) my changed files, that works fine and fast
(like "git add" on my console).

After that I will commit them (Team->commit).
The commit-dialog was shown after a few seconds, but when I'm add the comment
and click "commit":

The dialog ends, but the process runs and runs (stays by 0%)...

The process never stopped, I'm unable to close eclipse too (only kill -9!).

From the console the "git commit" command need only one second!!!

There is a bug in bugzilla, which describe a slow performance when the commit-dialog was started (Bug 331273).

I think that is not my problem here, because this happens before the dialog
comes up.

Some google entries describe this behavior with SVN, but no solution found:()

Can anyone give me a hint to solve this situation?!
Or has someone the same problem?!

Nothing in the ErrorLog-View...

BTW, what must be the path for the git repo on linux?
The hole path included ".git"?

Bsp:
/home/ahe/src-git/dv
OR
/home/ahe/src-git/dv/.git

I will use the first, without ".git"...

Best regards
Andre

PS: Eclipse Indigo, latest update for all modules (CDT, EGIT, Mylyn, etc ...)
java 1.6 update 26
Opensuse 10.2
Re: commit process hangs:() [message #696976 is a reply to message #696648] Fri, 15 July 2011 08:45 Go to previous messageGo to next message
Andre Heine is currently offline Andre Heine
Messages: 6
Registered: July 2011
Junior Member
EDIT:

After 2.5 hours the commit process was finished:()
Takes a long long time...

Generally works the commit...

What is to do now???

Re: commit process hangs:() [message #697726 is a reply to message #696976] Sun, 17 July 2011 20:56 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin Rosenberg
Messages: 324
Registered: July 2009
Senior Member
Andre Heine skrev 2011-07-15 10.45:
> EDIT:
>
> After 2.5 hours the commit process was finished:()
> Takes a long long time...
>
> Generally works the commit...
>
> What is to do now???
>
>

Give use more hints. You can describe your project in some terms of
number of files, file size etc.

Also; does doing a git status (command line git) first help? I think
our stat'ing is not optimal yet, but I've performed commits on 100k
projects quickly.

-- robin
Re: commit process hangs:() [message #697875 is a reply to message #697726] Mon, 18 July 2011 09:14 Go to previous messageGo to next message
Andre Heine is currently offline Andre Heine
Messages: 6
Registered: July 2011
Junior Member
We have 2000 files and the git repo works
fine/fast from the console.

In another forum-entry I read about the "Git staging" view,
this view works quickly. Like working from console.

I use the "Git staging view" instead of "Team->add/commit"
now...

Thanks for your answer!!!

A this time eclipse+git+mylyn+cdt works great for me!!!!

Best regards

Andre

[Updated on: Mon, 18 July 2011 09:15]

Report message to a moderator

Re: commit process hangs:() [message #759227 is a reply to message #697875] Sun, 27 November 2011 20:53 Go to previous messageGo to next message
Heikki Vuolteenaho is currently offline Heikki Vuolteenaho
Messages: 7
Registered: November 2011
Junior Member
Just wanted to note that I also see this kind of behaviour. Running on OS X Lion, Eclipse 3.7.1 + egit + m2e + mtj.

Doing a commit usually works fine, but roughly 10-20% of the time, the commit hangs at 0% progress. Canceling doesn't work, so I need to kill the Eclipse process to recover. Also afterwards I have to delete the git lock file to continue working.
Re: commit process hangs:() [message #759419 is a reply to message #759227] Mon, 28 November 2011 15:50 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias Sohn
Messages: 578
Registered: July 2009
Senior Member
- which EGit version are you using ?
- capture a couple of thread dumps when this happens again, the stack traces in these dumps could help to find out what's going on
- alternatively find a publicly available repository which shows this behavior so that we can try to reproduce this
Re: commit process hangs:() [message #759649 is a reply to message #759419] Tue, 29 November 2011 13:37 Go to previous messageGo to next message
Heikki Vuolteenaho is currently offline Heikki Vuolteenaho
Messages: 7
Registered: November 2011
Junior Member
I'm using:
Eclipse EGit
1.1.0.201109151100-r
org.eclipse.egit.feature.group
Eclipse EGit

This happened again, and I captured two thread dumps. It seems the process is not deadlocked, the file system operations just take forever. It often seemed to be stopped at java.io.UnixFileSystem native methods like getBooleanAttributes0().

No network drives or anything, all on a local Macbook Air SSD drive. No other problems with the machine, and committing from the command line works.

Hope this helps,
Heikki
Re: commit process hangs:() [message #759713 is a reply to message #759649] Tue, 29 November 2011 17:33 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias Sohn
Messages: 578
Registered: July 2009
Senior Member
- try running git gc on your local repository and check if this helps to improve performance
- try if a recent nightly version of EGit is faster
- is there any other process (e.g. virus scanner, backup) keeping your disk busy ?
Re: commit process hangs:() [message #759900 is a reply to message #759713] Wed, 30 November 2011 14:04 Go to previous messageGo to next message
Heikki Vuolteenaho is currently offline Heikki Vuolteenaho
Messages: 7
Registered: November 2011
Junior Member
It's not consistently slow, most of the time everything is very fast. Shouldn't be much background activity either.

I can find other people running into problems with the same file IO operations in other software, so it seems to a non-egit-specific issue. Probably nothing you can do about it, especially without being able to reproduce it yourself.

I'll just try a clean install and see if the problem goes away.
Re: commit process hangs:() [message #760361 is a reply to message #759900] Fri, 02 December 2011 07:26 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin Rosenberg
Messages: 324
Registered: July 2009
Senior Member
heikki.vuolteenaho skrev 2011-11-30 15.04:
> It's not consistently slow, most of the time everything is very fast. Shouldn't be much background activity either.
>
> I can find other people running into problems with the same file IO operations in other software, so it seems to a non-egit-specific issue. Probably nothing you can do
> about it, especially without being able to reproduce it yourself.
>
> I'll just try a clean install and see if the problem goes away.
>

There may be different problems. Andre actually completed the commit, though I would never have the patience
to wait for two+ hours to see if it would. That *could* be an EGit problem.

The other thing is that the platform specific code, too and whenever we do progress reporting
we could fall victim. This doesn't just happen to EGit.

Stack traces from Eclipse could be useful in figuring out. Figure out the process id
and run jstack THEPID to get a stack trace and see where it stuck. The do the same
thing a while later to see if it is stuck in the same place.

Platform dependent tools like strace (linux) or dtruss (OS X) may also give you information about
what is happening at the OS-level. In particular you can see if Eclipse is actually doing anything
below the java level.

-- robin
Re: commit process hangs:() [message #760678 is a reply to message #760361] Sun, 04 December 2011 07:43 Go to previous messageGo to next message
Heikki Vuolteenaho is currently offline Heikki Vuolteenaho
Messages: 7
Registered: November 2011
Junior Member
I also initially thought it was a deadlock, but after checking with jconsole ja jstack, I didn't see any deadlocks. I did already take multiple stacktraces from the same slow commit, and they were different. So the process seems to be moving. I attached two stacktraces from the same slow commit in my previous message.

So it might be it would eventually finish. I can also try waiting the next time this happens (if I'm not in a hurry).
Re: commit process hangs:() [message #899030 is a reply to message #696648] Mon, 30 July 2012 09:26 Go to previous messageGo to next message
Heikki Vuolteenaho is currently offline Heikki Vuolteenaho
Messages: 7
Registered: November 2011
Junior Member
Bringing this back up again, as the problem is getting worse for me.

Now pretty much every operation that touched the git index makes eclipse hang. Checking with jstack, the main thread is working in jgit.treewalk.FileTreeIterator. Example stack trace:


"main" prio=6 tid=105001000 nid=0x7fff73f7f960 runnable [7fff5fbfc000]
java.lang.Thread.State: RUNNABLE
at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
at java.io.File.isDirectory(File.java:754)
at org.eclipse.jgit.treewalk.FileTreeIterator$FileEntry.<init>(FileTreeIterator.java:161)
at org.eclipse.jgit.treewalk.FileTreeIterator.entries(FileTreeIterator.java:142)
at org.eclipse.jgit.treewalk.FileTreeIterator.<init>(FileTreeIterator.java:127)
at org.eclipse.jgit.treewalk.FileTreeIterator.createSubtreeIterator(FileTreeIterator.java:133)
at org.eclipse.jgit.treewalk.AbstractTreeIterator.createSubtreeIterator(AbstractTreeIterator.java:528)
at org.eclipse.jgit.treewalk.TreeWalk.enterSubtree(TreeWalk.java:908)
at org.eclipse.jgit.treewalk.TreeWalk.next(TreeWalk.java:566)
at org.eclipse.jgit.dircache.DirCache.updateSmudgedEntries(DirCache.java:950)
at org.eclipse.jgit.dircache.DirCache.writeTo(DirCache.java:660)
at org.eclipse.jgit.dircache.DirCache.write(DirCache.java:607)
at org.eclipse.jgit.dircache.BaseDirCacheEditor.commit(BaseDirCacheEditor.java:198)
at org.eclipse.jgit.dircache.DirCacheEditor.commit(DirCacheEditor.java:117)
at org.eclipse.egit.core.GitMoveDeleteHook.moveFile(GitMoveDeleteHook.java:170)
at org.eclipse.team.internal.core.MoveDeleteManager.moveFile(MoveDeleteManager.java:87)
at org.eclipse.core.internal.resources.Resource.unprotectedMove(Resource.java:2004)
at org.eclipse.core.internal.resources.Resource.move(Resource.java:1631)
at org.eclipse.jdt.internal.core.CopyResourceElementsOperation.processCompilationUnitResource(CopyResourceElementsOperation.java:340)
at org.eclipse.jdt.internal.core.CopyResourceElementsOperation.processElement(CopyResourceElementsOperation.java:410)
at org.eclipse.jdt.internal.core.MultiOperation.processElements(MultiOperation.java:163)
at org.eclipse.jdt.internal.core.CopyResourceElementsOperation.processElements(CopyResourceElementsOperation.java:428)
at org.eclipse.jdt.internal.core.MultiOperation.executeOperation(MultiOperation.java:90)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:793)
at org.eclipse.jdt.internal.core.JavaModel.rename(JavaModel.java:285)
at org.eclipse.jdt.internal.core.CompilationUnit.rename(CompilationUnit.java:1267)
at org.eclipse.jdt.internal.corext.refactoring.changes.RenameCompilationUnitChange.doRename(RenameCompilationUnitChange.java:62)
at org.eclipse.jdt.internal.corext.refactoring.AbstractJavaElementRenameChange.perform(AbstractJavaElementRenameChange.java:89)
at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278)
at org.eclipse.jdt.internal.corext.refactoring.changes.DynamicValidationStateChange.access$0(DynamicValidationStateChange.java:1)
at org.eclipse.jdt.internal.corext.refactoring.changes.DynamicValidationStateChange$1.run(DynamicValidationStateChange.java:102)
at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:5204)
at org.eclipse.jdt.internal.corext.refactoring.changes.DynamicValidationStateChange.perform(DynamicValidationStateChange.java:105)
at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation$1.run(PerformChangeOperation.java:258)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:306)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:223)
at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:5204)
at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:106)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.ui.internal.WorkbenchWindow$13.run(WorkbenchWindow.java:1666)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:1663)
at org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:193)
at org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:151)
at org.eclipse.jdt.ui.refactoring.RenameSupport.perform(RenameSupport.java:198)
at org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode.doRename(RenameLinkedMode.java:362)
at org.eclipse.jdt.internal.ui.refactoring.reorg.RenameLinkedMode$EditorSynchronizer.left(RenameLinkedMode.java:119)
at org.eclipse.jface.text.link.LinkedModeModel.exit(LinkedModeModel.java:341)
at org.eclipse.jface.text.link.LinkedModeUI$4.run(LinkedModeUI.java:1193)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
- locked <7db2b4e28> (a org.eclipse.swt.widgets.RunnableLock)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3944)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3621)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)



I haven't had the patience to wait for more than 15mins, just have to kill Eclipse. After that, I have to delete .git/index.lock to continue working with git.

Using Mac OS X Lion, Eclipse 4.2 Juno (3.7.2 shows the same behaviour) and latest Egit from Juno update site:

Eclipse EGit 2.0.0.201206130900-r org.eclipse.egit.feature.group Eclipse EGit
Eclipse JGit 2.0.0.201206130900-r org.eclipse.jgit.feature.group Eclipse JGit


Any ideas for workarounds? I've tried re-installing Eclipse several times.
Re: commit process hangs:() [message #901288 is a reply to message #899030] Fri, 10 August 2012 15:55 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias Sohn
Messages: 578
Registered: July 2009
Senior Member
Could you try with latest nightly version of EGit ? There were a couple of fixes after 2.0 fixing some problems with index handling.
Re: commit process hangs:() [message #901554 is a reply to message #901288] Mon, 13 August 2012 11:12 Go to previous messageGo to next message
Heikki Vuolteenaho is currently offline Heikki Vuolteenaho
Messages: 7
Registered: November 2011
Junior Member
Installed the latest nightly, and no problems so far. Looks promising!
Re: commit process hangs:() [message #902021 is a reply to message #901288] Wed, 15 August 2012 14:13 Go to previous message
Heikki Vuolteenaho is currently offline Heikki Vuolteenaho
Messages: 7
Registered: November 2011
Junior Member
No hangups otherwise, but it still does hang whenever I try to commit. Jstack shows it's still busy in the same file system operations:

"Worker-133" prio=5 tid=11d79a000 nid=0x114901000 runnable [114900000]
java.lang.Thread.State: RUNNABLE
at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
at java.io.File.isDirectory(File.java:754)
at org.eclipse.jgit.treewalk.FileTreeIterator$FileEntry.<init>(FileTreeIterator.java:161)
at org.eclipse.jgit.treewalk.FileTreeIterator.entries(FileTreeIterator.java:142)
at org.eclipse.jgit.treewalk.FileTreeIterator.<init>(FileTreeIterator.java:127)
at org.eclipse.jgit.treewalk.FileTreeIterator.createSubtreeIterator(FileTreeIterator.java:133)
at org.eclipse.jgit.treewalk.AbstractTreeIterator.createSubtreeIterator(AbstractTreeIterator.java:528)
at org.eclipse.jgit.treewalk.TreeWalk.enterSubtree(TreeWalk.java:908)
at org.eclipse.jgit.treewalk.TreeWalk.next(TreeWalk.java:566)
at org.eclipse.jgit.api.CommitCommand.createTemporaryIndex(CommitCommand.java:314)
at org.eclipse.jgit.api.CommitCommand.call(CommitCommand.java:194)
at org.eclipse.egit.core.op.CommitOperation.commit(CommitOperation.java:249)
at org.eclipse.egit.core.op.CommitOperation.access$7(CommitOperation.java:227)
at org.eclipse.egit.core.op.CommitOperation$1.run(CommitOperation.java:192)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2326)
at org.eclipse.egit.core.op.CommitOperation.execute(CommitOperation.java:202)
at org.eclipse.egit.ui.internal.commit.CommitUI$2.run(CommitUI.java:221)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)





But still this is progress, I can commit from the command line and do other things with EGit.

Previous Topic:Working with Egit and non-Eclipse projects
Next Topic:Force modified eGIT version
Goto Forum:
  


Current Time: Thu Sep 18 18:06:29 GMT 2014

Powered by FUDForum. Page generated in 0.04509 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software