Community
Participate
Working Groups
I am seeing a test appear to hang in the 1204 build when I close a project. The project close eventually invokes discardJobs which sits in a tight loop calling Thread.sleep(50) with no apparent guarantee that the loop will ever exit. The close operation is occurring on the UI (main) thread.
Any steps to reproduce the problem. Also a thread dump (of the Java Indexing thread) would help.
The problem occurs in JUnit tests that create, test and then close a significant (over 400 but the problem manifests after less than half that) number of Dynamic Web Project, which in this case are Java 5 projects create using the WTP facet mechanism. Below is stack trace copied from the debugger Thread [main] (Suspended) Thread.sleep(long) line: not available [native method] IndexManager(JobManager).discardJobs(String) line: 95 DeltaProcessor.updateCurrentDeltaAndIndex(IResourceDelta, int, DeltaProcessor$RootInfo) line: 2371 DeltaProcessor.traverseDelta(IResourceDelta, int, DeltaProcessor$RootInfo, DeltaProcessor$OutputsInfo) line: 2041 DeltaProcessor.processResourceDelta(IResourceDelta) line: 1779 DeltaProcessor.resourceChanged(IResourceChangeEvent) line: 1923 DeltaProcessingState.resourceChanged(IResourceChangeEvent) line: 389 NotificationManager$2.run() line: 282 SafeRunner.run(ISafeRunnable) line: 37 NotificationManager.notify(ResourceChangeListenerList$ListenerEntry[], IResourceChangeEvent, boolean) line: 276 NotificationManager.broadcastChanges(ElementTree, ResourceChangeEvent, boolean) line: 148 Workspace.broadcastPostChange() line: 313 Workspace.endOperation(ISchedulingRule, boolean, IProgressMonitor) line: 1022 Project.close(IProgressMonitor) line: 179 PropertiesOfMapsTestCase(BaseTestCase).tearDown() line: 218 PropertiesOfMapsTestCase(SingleJSPTestCase).tearDown() line: 73 PropertiesOfMapsTestCase(TestCase).runBare() line: 136 TestResult$1.protect() line: 106 TestResult.runProtected(Test, Protectable) line: 124 TestResult.run(TestCase) line: 109 PropertiesOfMapsTestCase(TestCase).run(TestResult) line: 120 ConfigurableTestSuite(TestSuite).runTest(Test, TestResult) line: 230 ConfigurableTestSuite.runTest(Test, TestResult) line: 56 ConfigurableTestSuite(TestSuite).run(TestResult) line: 225 ConfigurableTestSuite(TestSuite).runTest(Test, TestResult) line: 230 ConfigurableTestSuite.runTest(Test, TestResult) line: 56 ConfigurableTestSuite(TestSuite).run(TestResult) line: 225 TestSuite.runTest(Test, TestResult) line: 230 TestSuite.run(TestResult) line: 225 JUnit3TestReference.run(TestExecution) line: 130 TestExecution.run(ITestReference[]) line: 38 RemotePluginTestRunner(RemoteTestRunner).runTests(String[], String, TestExecution) line: 460 RemotePluginTestRunner(RemoteTestRunner).runTests(TestExecution) line: 673 RemotePluginTestRunner(RemoteTestRunner).run() line: 386 RemotePluginTestRunner.main(String[]) line: 58 UITestApplication$1.run() line: 122 RunnableLock.run() line: 35 UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 130 Display.runAsyncMessages(boolean) line: 3727 Display.readAndDispatch() line: 3364 Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2381 Workbench.runUI() line: 2345 Workbench.access$4(Workbench) line: 2211 Workbench$4.run() line: 473 Realm.runWithDefault(Realm, Runnable) line: 288 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 468 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149 IDEApplication.start(IApplicationContext) line: 106 UITestApplication.start(IApplicationContext) line: 52 EclipseAppHandle.run(Object) line: 193 EclipseAppLauncher.runApplication(Object) line: 106 EclipseAppLauncher.start(Object) line: 76 EclipseStarter.run(Object) line: 362 EclipseStarter.run(String[], Runnable) line: 175 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 585 Main.invokeFramework(String[], URL[]) line: 561 Main.basicRun(String[]) line: 501 Main.run(String[]) line: 1239 Main.main(String[]) line: 1215 Thread [main] (Suspended) Thread.sleep(long) line: not available [native method] IndexManager(JobManager).discardJobs(String) line: 95 DeltaProcessor.updateCurrentDeltaAndIndex(IResourceDelta, int, DeltaProcessor$RootInfo) line: 2371 DeltaProcessor.traverseDelta(IResourceDelta, int, DeltaProcessor$RootInfo, DeltaProcessor$OutputsInfo) line: 2041 DeltaProcessor.processResourceDelta(IResourceDelta) line: 1779 DeltaProcessor.resourceChanged(IResourceChangeEvent) line: 1923 DeltaProcessingState.resourceChanged(IResourceChangeEvent) line: 389 NotificationManager$2.run() line: 282 SafeRunner.run(ISafeRunnable) line: 37 NotificationManager.notify(ResourceChangeListenerList$ListenerEntry[], IResourceChangeEvent, boolean) line: 276 NotificationManager.broadcastChanges(ElementTree, ResourceChangeEvent, boolean) line: 148 Workspace.broadcastPostChange() line: 313 Workspace.endOperation(ISchedulingRule, boolean, IProgressMonitor) line: 1022 Project.close(IProgressMonitor) line: 179 PropertiesOfMapsTestCase(BaseTestCase).tearDown() line: 218 PropertiesOfMapsTestCase(SingleJSPTestCase).tearDown() line: 73 PropertiesOfMapsTestCase(TestCase).runBare() line: 136 TestResult$1.protect() line: 106 TestResult.runProtected(Test, Protectable) line: 124 TestResult.run(TestCase) line: 109 PropertiesOfMapsTestCase(TestCase).run(TestResult) line: 120 ConfigurableTestSuite(TestSuite).runTest(Test, TestResult) line: 230 ConfigurableTestSuite.runTest(Test, TestResult) line: 56 ConfigurableTestSuite(TestSuite).run(TestResult) line: 225 ConfigurableTestSuite(TestSuite).runTest(Test, TestResult) line: 230 ConfigurableTestSuite.runTest(Test, TestResult) line: 56 ConfigurableTestSuite(TestSuite).run(TestResult) line: 225 TestSuite.runTest(Test, TestResult) line: 230 TestSuite.run(TestResult) line: 225 JUnit3TestReference.run(TestExecution) line: 130 TestExecution.run(ITestReference[]) line: 38 RemotePluginTestRunner(RemoteTestRunner).runTests(String[], String, TestExecution) line: 460 RemotePluginTestRunner(RemoteTestRunner).runTests(TestExecution) line: 673 RemotePluginTestRunner(RemoteTestRunner).run() line: 386 RemotePluginTestRunner.main(String[]) line: 58 UITestApplication$1.run() line: 122 RunnableLock.run() line: 35 UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 130 Display.runAsyncMessages(boolean) line: 3727 Display.readAndDispatch() line: 3364 Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2381 Workbench.runUI() line: 2345 Workbench.access$4(Workbench) line: 2211 Workbench$4.run() line: 473 Realm.runWithDefault(Realm, Runnable) line: 288 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 468 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149 IDEApplication.start(IApplicationContext) line: 106 UITestApplication.start(IApplicationContext) line: 52 EclipseAppHandle.run(Object) line: 193 EclipseAppLauncher.runApplication(Object) line: 106 EclipseAppLauncher.start(Object) line: 76 EclipseStarter.run(Object) line: 362 EclipseStarter.run(String[], Runnable) line: 175 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object...) line: 585 Main.invokeFramework(String[], URL[]) line: 561 Main.basicRun(String[]) line: 501 Main.run(String[]) line: 1239 Main.main(String[]) line: 1215
It would be also helpful to activate the IndexManager trace to give us some more clues and have a chance to figure out what happens there. Could you use '-consoleLog -debug <dir>/.options' arguments in your eclipse command line after having added/modified the following lines in the .options file: # Turn on debug tracing for org.eclipse.jdt.core plugin org.eclipse.jdt.core/debug=true # Reports background indexer activity: indexing, saving index file, index queries org.eclipse.jdt.core/debug/indexmanager=true Then, in the DOS Command windows, copy the console outputs, paste them in a file and attach this file to this bug. TIA
(In reply to comment #2) This is a thread dump of the 'main' thread. I would need a thread dump of the 'Java indexing' thread.
Created attachment 84999 [details] Result of enabling debug tracing on the index manager when reproducing the (apparent) deadlock on the UI thread.
Created attachment 85000 [details] Traces of UI and both IndexManager threads from the debugger.
It looks like the code you are running has been modified: it calls JavaProject.getJSDTScopeFile() which doesn't exist in the 1204 build. Closing as invalid. Please reopen if you reproduce with a pure Eclipse build.
Closing as INVALID
Verified for 3.4M4