Bug 38901 - IndexManager hangs in end-less loop
Summary: IndexManager hangs in end-less loop
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: 3.0 M2   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 38977 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-06-13 13:27 EDT by Martin Aeschlimann CLA
Modified: 2003-07-17 06:17 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Aeschlimann CLA 2003-06-13 13:27:20 EDT
Build M1+
VM: Sun 1.4.1 B1.4

While running the JDT/UI test cases the VM running the tests ended up in an end-
less loop in the IndexManager. The stack trace looks as follows:

EclipseRuntimeLauncher at localhost:11146
	System Thread [Finalizer] (Running)
	System Thread [Reference Handler] (Running)
	Thread [main] (Suspended)
		IndexManager(JobManager).performConcurrentJob(IJob, int, 
IProgressMonitor) line: 251
		SearchEngine.searchAllTypeNames(IWorkspace, char[], char[], 
int, boolean, int, IJavaSearchScope, ITypeNameRequestor, int, IProgressMonitor) 
line: 592
		JavaProjectHelper.performDummySearch() line: 130
		JavaProjectHelper.delete(IJavaProject) line: 110
		ClassPathDetectorTest.tearDown() line: 90
		ClassPathDetectorTest(TestCase).runBare() line: 130
		TestResult$1.protect() line: 106
		TestResult.runProtected(Test, Protectable) line: 124
		TestResult.run(TestCase) line: 109
		ClassPathDetectorTest(TestCase).run(TestResult) line: 118
		TestSuite.runTest(Test, TestResult) line: 208
		TestSuite.run(TestResult) line: 203
		ProjectTestSetup(TestDecorator).basicRun(TestResult) line: 22
		TestSetup$1.protect() line: 19
		TestResult.runProtected(Test, Protectable) line: 124
		ProjectTestSetup(TestSetup).run(TestResult) line: 23
		TestSuite.runTest(Test, TestResult) line: 208
		TestSuite.run(TestResult) line: 203
		ProjectTestSetup(TestDecorator).basicRun(TestResult) line: 22
		TestSetup$1.protect() line: 19
		TestResult.runProtected(Test, Protectable) line: 124
		ProjectTestSetup(TestSetup).run(TestResult) line: 23
		AutomatedSuite(TestSuite).runTest(Test, TestResult) line: 208
		AutomatedSuite(TestSuite).run(TestResult) line: 203
		RemotePluginTestRunner(RemoteTestRunner).runTests(String[], 
String) line: 393
		RemotePluginTestRunner(RemoteTestRunner).run() line: 277
		RemotePluginTestRunner.main(String[]) line: 30
		UITestApplication.runEventLoop(Window$IExceptionHandler) line: 
35
		UITestApplication(Workbench).run(Object) line: 1382
		InternalBootLoader.run(String, URL, String, String[], Runnable) 
line: 858
		BootLoader.run(String, URL, String, String[]) line: 431
		EclipseRuntimeLauncher.main(String[]) line: 24
	System Thread [Signal Dispatcher] (Running)
	Thread [Java indexing] (Suspended)
		Object.wait(long) line: not available [native method]
		IndexManager(Object).wait() line: 426
		IndexManager(JobManager).run() line: 350
		Thread.run() line: 536
	Thread [ReaderThread] (Running)
	Thread [Decoration] (Running)

It seems that the Index Manager has stopped, but the the method 
IndexManager.currentJob() always returns the same job. In our case it was 
indexing /TestProject1/cf/mylib/Foo$FooInner$FooInnerInner.class

Philippe, can you have a look at this. It might cause the DNF in JDT/UI tests 
we are faced with when executing the tests on the build machine.
Comment 1 Martin Aeschlimann CLA 2003-06-13 13:29:55 EDT
To clarify: the end-less loops happens in the main thread in method 
IndexManager.performConcurrentJob
Comment 2 Martin Aeschlimann CLA 2003-06-13 13:32:04 EDT
The test that hangs is 
org.eclipse.jdt.ui.tests.core.ClassPathDetectorTest.testClassFolder.
Comment 3 Philipe Mulet CLA 2003-06-14 06:58:36 EDT
Kent - pls investigate

There seems to be quite a few of these recently...
Comment 4 Philipe Mulet CLA 2003-06-16 08:07:32 EDT
Reassigning. Jerome reproduced it in debugger.
Regression added when converted to wait/notify model. When enabling the 
JobManager, it should notify all since it could have been set into #wait mode 
as soon as disabled (currentJob() answering null).
Comment 5 Philipe Mulet CLA 2003-06-16 08:10:04 EDT
Fix released for integration.
Comment 6 Dirk Baeumer CLA 2003-06-16 08:18:19 EDT
Philippe, wil this be in tomorrows integration build ?
Comment 7 Jerome Lanneluc CLA 2003-06-16 08:47:21 EDT
Yes, if all goes well, this should be in tomorrow's integration build.
Comment 8 Philipe Mulet CLA 2003-06-16 09:15:51 EDT
Issue did not exist in 2.1 stream, since JobManager's implementation was only 
sleeping (vs. waiting).
Comment 9 Philipe Mulet CLA 2003-06-16 16:23:41 EDT
*** Bug 38977 has been marked as a duplicate of this bug. ***
Comment 10 Jerome Lanneluc CLA 2003-06-18 08:59:40 EDT
Dirk, note that because of bug 38951, we reverted our build contribution for 
today's build to last week contribution. So you might see the problem in 
today's build.
Comment 11 Dirk Baeumer CLA 2003-06-18 09:03:21 EDT
Thanks for pointing this out.
Comment 12 David Audel CLA 2003-07-17 06:17:57 EDT
Verified