Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse: "Update SVN cache" hangs and locks up

Every time I start eclipse, the program begins doing this "Update SVN cache" thing but it will sit at 0% forever. I cannot perform any operations (such as checking out my projects, building them, or even running them) until this operation is completed (which never happens). Also, whenever I try to type anything in the editor, the whole program freezes and I have to kill the process.

I have been searching google for the answer to this problem for days and have yet to come up with an answer. Has anyone else had a similar problem and found a solution?

I'd like to add that I've tried re installing eclipse, all its plugins, and the jdk from scratch. Nothing seems to be working.

like image 329
imnotfred Avatar asked Jun 18 '12 15:06

imnotfred


4 Answers

I faced the same issue and I tried to get out of this by disable most of performance setting for SVN in Eclipse:

  • Windows > Preferences > Team > SVN > Performance

OR (for latest versions): Windows > Preferences > Version Control (Team) > SVN > Performance

  • Disable: Computing deep outgoing state, Cache, persistent SSH

SVN Performance Settings in Eclipse

like image 152
Osify Avatar answered Nov 17 '22 20:11

Osify


I just ran into this issue and was able to rescue it. This was with Zend Studio 10.5 which sits on Juno. I have about five projects in my workspace, one of which was open. I couldn't close the project because it was waiting for "Update SVN Cache" to complete.

  • With Eclipse closed, I went to my open project and via the command line ran "svn cleanup."
  • In workspace/.metadata/.plugins/org.eclipse.team.svn.core, I had a bunch of temp directories. I created a backup tarball, and then blew them all away.

That didn't fix anything. Finally I tried this:

  1. With Eclipse closed, I went to my project directory and renamed .project to project.xml.
  2. Reopened Eclipse, projects were closed. No SVN Update messages.
  3. Restarted Eclipse.
  4. Opened the project, but Eclipse balked at the missing .project file.
  5. Closed Eclipse.
  6. Went to my project directory and renamed project.xml back to .project.
  7. Restarted Eclipse.
  8. Opened the project. Smooth sailing. Was just able to commit a change without incident.

So far my workspace/.metadata/.plugins/org.eclipse.team.svn.core directory is still empty.

I don't know if the first two things I tried helped out at all, or if just renaming the .project file to force-close the project was all it took. Next time it happens (and there will be a next time) I'll try just force-closing the project and report back.

like image 28
user3096856 Avatar answered Nov 17 '22 22:11

user3096856


In my case I realized that a tortoise SVN explorer related windows was somewhere open. It probably locked the cache and eclipse was waiting for the unlock.

Not a direct answer to the question, but this might help for somebody making a similar mistake.

like image 7
Narasimham Avatar answered Nov 17 '22 22:11

Narasimham


You're not the only one (see this bug report or this forum thread) but it's probably not a bug in Eclipse itself. Next steps:

  1. Get a thread dump to see whether this is a deadlock or a thread is waiting for something that never happens (in the bug report, it hangs in System.loadLibrary()). You can use jconsole for this, it comes with the SDK.

  2. Check all open projects in your workspace (that use SVN) with another SVN tool (command line svn or TurtoiseSVN if you're on windows) to make sure the data structures aren't corrupt.

  3. Get the latest version of Eclipse and/or the SVN plugin

  4. Try a different connector. Some people fare better with the JNI solution javahl, others with the pure-Java SVNKit.

like image 6
Aaron Digulla Avatar answered Nov 17 '22 22:11

Aaron Digulla