Login | Register
My pages Projects Community openCollabNet

Discussions > issues > [Issue 1047] New - Eclipse hangs for minutes opening subclipse disconnected projects

subclipse
Discussion topic

There will be a brief maintenance window every Friday at 17:00 Pacific.
For further details, see CollabNet's maintenance and upgrade policy.

Back to topic list

[Issue 1047] New - Eclipse hangs for minutes opening subclipse disconnected projects

Author sourcerer
Full name Markus
Date 2009-12-01 02:56:46 PST
Message http://subclipse.tigris.org/issues/show_bug.cgi?id=1047 Issue #|1047 Summary|Eclipse hangs for minutes opening subclipse disconnect |ed projects Component|subclipse Version|current Platform|All OS/Version|All URL| Status|NEW Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P2 Subcomponent|core Assigned to|issues@subclipse Reported by|sourcerer ------- Additional comments from sourcerer@tigris.org Tue Dec 1 02:56:45 -0800 2009 ------- Eclipse will hang for minutes in 'building workspace' when opening large projects (with nothing to build) which are disconnected from Subclipse but still subversion controlled if (for some reason) status is not cached by Subclipse. This might also relate to bugs 1029, 802 and 1016. You will also find forum entries relating to this. I did some investigation and have a reproducable test scenario. Common conditions for the problem to occur: Subclipse is disconnected. Subclipse's cache has no information saved. There are resource change notification due to open project or refresh. Steps to reproduce: Prerequisites: * Eclipse with Subclipse Plugin 1.6; javahl or svnkit adapter doesn't matter * An SVN Repository with a project of 1000+ files * This project must never have been checked out in your Eclipse workspace or if it had been checked out it needs to be deleted in Eclipse (including contents) and Eclipse restarted to be sure the subclipse cache (persistent property) is cleared. Do this: 1. With the Subclipse checkout wizard checkout the project **with depth empty ('only this item')!** 2. **Disconnect** subclipse from the project (team/disconnect) with option 'keep .svn files' 3. **Close** the **project** 4. **Exit Eclipse** 5. **Outside Eclipse** In a shell perform a **full checkout** over the empty checkout. Something like: svn co --force --depth infinity svn://your_project 6. Now **restart Eclipse** 7. Open the progress view to see what will happen 8. You might also want to open jvisualvm (in your Java bin directory) and attach to your Eclipse session 9. Now **open the project** 10. Eclipse will not automatically find the newly checked out items unless you set the 'refresh automatically' preference so do a **refresh manually** Now Eclipse will show the new items immediatly; everything looks fine but: The progress bar shows 'building workspace' is running. This will take minutes instead of seconds! In jvisualvm do some thread dumps. You will get something like the following: pre. "Worker-6" prio=10 tid=0x00007f9d35236800 nid=0xef5 runnable [0x00007f9d28848000] java.lang.Thread.State: RUNNABLE at org.tigris.subversion.javahl.SVNClient.status(Native Method) at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.getStatus(AbstractJhlClientAdapter.java:481) at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.getStatus(AbstractJhlClientAdapter.java:467) at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.getStatus(AbstractJhlClientAdapter.java:460) at org.tigris.subversion.subclipse.core.status.RecursiveStatusUpdateStrategy.statusesToUpdate(RecursiveStatusUpdateStrategy.java:62) at org.tigris.subversion.subclipse.core.status.RecursiveStatusUpdateStrategy.statusesToUpdate(RecursiveStatusUpdateStrategy.java:46) at org.tigris.subversion.subclipse.core.status.RecursiveStatusUpdateStrategy.statusesToUpdate(RecursiveStatusUpdateStrategy.java:46) at org.tigris.subversion.subclipse.core.status.RecursiveStatusUpdateStrategy.statusesToUpdate(RecursiveStatusUpdateStrategy.java:46) at org.tigris.subversion.subclipse.core.status.RecursiveStatusUpdateStrategy.statusesToUpdate(RecursiveStatusUpdateStrategy.java:46) at org.tigris.subversion.subclipse.core.status.StatusCacheManager.basicGetStatus(StatusCacheManager.java:220) at org.tigris.subversion.subclipse.core.status.StatusCacheManager.getStatus(StatusCacheManager.java:190) at org.tigris.subversion.subclipse.core.status.StatusCacheManager.getStatus(StatusCacheManager.java:138) at org.tigris.subversion.subclipse.core.resources.LocalResource.getStatus(LocalResource.java:208) at org.tigris.subversion.subclipse.core.resources.LocalFolder.getStatus(LocalFolder.java:288) at org.tigris.subversion.subclipse.core.resourcesListeners.RevertResourceManager.processResources(RevertResourceManager.java:152) at org.tigris.subversion.subclipse.core.resourcesListeners.RevertResourceManager.resourceChanged(RevertResourceManager.java:112) at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:291) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285) at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149) at org.eclipse.core.internal.resources.Workspace.broadcastBuildEvent(Workspace.java:297) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:136) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Most of the time you catch the client adapter getting status. This is triggered by the RevertResourceManager which is trying to figure out if a resource has been deleted and added again. This local svn operation is done even though we are disconnected! (first bug) It would be fast if the svn statuses returned would be fed into the subclipse status cache. But this is not done because we are disconnected. (second bug) So the status will be retrieved over and over again for every resource 'added' by the refresh. See SVNWorkspaceRoot#getResourceFor pre. public static IResource getResourceFor(IResource parent, IPath location) { if (parent == null || location == null) { return null; } if (parent instanceof IWorkspaceRoot) { return null; } if (!isManagedBySubclipse(parent.getProject())) { return null; } ... this is called by StatusCacheManager#setStatuses: pre. Thread [Worker-6] (Suspended (breakpoint at line 403 in org.tigris.subversion.subclipse.core.resources.SVNWorkspaceRoot)) org.tigris.subversion.subclipse.core.resources.SVNWorkspaceRoot.getResourceFor(org.eclipse.core.resources.IResource, org.eclipse.core.runtime.IPath) line: 403 org.tigris.subversion.subclipse.core.resources.SVNWorkspaceRoot.getResourceFor(org.eclipse.core.resources.IResource, org.tigris.subversion.svnclientadapter.ISVNStatus) line: 444 org.tigris.subversion.subclipse.core.status.StatusCacheManager.updateCache(org.eclipse.core.resources.IResource, org.tigris.subversion.svnclientadapter.ISVNStatus[]) line: 94 org.tigris.subversion.subclipse.core.status.StatusCacheManager.setStatuses(org.eclipse.core.resources.IResource, org.tigris.subversion.svnclientadapter.ISVNStatus[]) line: 240 org.tigris.subversion.subclipse.core.status.StatusCacheManager.basicGetStatus(org.eclipse.core.resources.IResource, org.tigris.subversion.subclipse.core.status.StatusUpdateStrategy) line: 220 org.tigris.subversion.subclipse.core.status.StatusCacheManager.getStatus(org.eclipse.core.resources.IResource, org.tigris.subversion.subclipse.core.status.StatusUpdateStrategy) line: 190 org.tigris.subversion.subclipse.core.status.StatusCacheManager.getStatus(org.eclipse.core.resources.IResource) line: 138 org.tigris.subversion.subclipse.core.resources.LocalFile(org.tigris.subversion.subclipse.core.resources.LocalResource).getStatus() line: 208 org.tigris.subversion.subclipse.core.resourcesListeners.RevertResourceManager.processResources(org.eclipse.core.resources.IResourceDelta[]) line: 142 org.tigris.subversion.subclipse.core.resourcesListeners.RevertResourceManager.resourceChanged(org.eclipse.core.resources.IResourceChangeEvent) line: 112 org.eclipse.core.internal.events.NotificationManager$2.run() line: 291 org.eclipse.core.runtime.SafeRunner.run(org.eclipse.core.runtime.ISafeRunnable) line: 42 org.eclipse.core.internal.events.NotificationManager.notify(org.eclipse.core.internal.events.ResourceChangeListenerList$ListenerEntry[], org.eclipse.core.resources.IResourceChangeEvent, boolean) line: 285 org.eclipse.core.internal.events.NotificationManager.broadcastChanges(org.eclipse.core.internal.watson.ElementTree, org.eclipse.core.internal.events.ResourceChangeEvent, boolean) line: 149 org.eclipse.core.internal.resources.Workspace.broadcastBuildEvent(java.lang.Object, int, int) line: 297 org.eclipse.core.internal.events.AutoBuildJob.doBuild(org.eclipse.core.runtime.IProgressMonitor) line: 136 org.eclipse.core.internal.events.AutoBuildJob.run(org.eclipse.core.runtime.IProgressMonitor) line: 238 org.eclipse.core.internal.jobs.Worker.run() line: 55 If you once have such a project with no cached Subclipse status information you can always reproduce by simply closing and opening the project. This will trigger the pre-build resource change event again with Subclipse disconnected and no statuses cached.

« Previous message in topic | 1 of 13 | Next message in topic »

Messages

Show all messages in topic

[Issue 1047] New - Eclipse hangs for minutes opening subclipse disconnected projects sourcerer Markus 2009-12-01 02:56:46 PST
     [Issue 1047] Eclipse hangs for minutes opening subclipse disconnected projects sxc5678 Christian Sarrasin 2010-06-02 06:10:36 PDT
     [Issue 1047] Eclipse hangs for minutes opening subclipse disconnected projects sxc5678 Christian Sarrasin 2010-07-06 23:21:50 PDT
     [Issue 1047] Eclipse hangs for minutes opening subclipse disconnected projects markphip Mark Phippard 2010-07-07 06:20:45 PDT
     [Issue 1047] Eclipse hangs for minutes opening subclipse disconnected projects selsemore Stephen Elsemore 2010-07-07 06:27:26 PDT
     [Issue 1047] Eclipse hangs for minutes opening subclipse disconnected projects vnicolici Vladimir Nicolici 2010-06-03 02:22:16 PDT
     [Issue 1047] Eclipse hangs for minutes opening subclipse disconnected projects markphip Mark Phippard 2010-06-03 06:13:08 PDT
     [Issue 1047] Eclipse hangs for minutes opening subclipse disconnected projects selsemore Stephen Elsemore 2010-06-15 07:40:17 PDT
     [Issue 1047] Eclipse hangs for minutes opening subclipse disconnected projects sxc5678 Christian Sarrasin 2010-06-28 09:13:26 PDT
     [Issue 1047] Eclipse hangs for minutes opening subclipse disconnected projects selsemore Stephen Elsemore 2010-06-28 09:23:50 PDT
     [Issue 1047] Eclipse hangs for minutes opening subclipse disconnected projects sxc5678 Christian Sarrasin 2010-06-29 07:27:43 PDT
     [Issue 1047] Eclipse hangs for minutes opening subclipse disconnected projects sxc5678 Christian Sarrasin 2010-07-05 03:33:26 PDT
     [Issue 1047] Eclipse hangs for minutes opening subclipse disconnected projects selsemore Stephen Elsemore 2010-07-06 06:35:37 PDT
Messages per page: