| Summary: | Data race on org.eclipse.jdt.internal.core.search.processing.JobManager.jobStart | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Yilong Li <yilong.li> |
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | stephan.herrmann |
| Version: | 4.6 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | stalebug | ||
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. If the data race caused bad behavior then this report would be very valuable. So far, however, I see no indication of any bad consequences, neither from observed behavior nor from a quick inspection of the code. In particular all writers of the field are already protected by synchronized. The report seems to point towards indexSourceFolder as a potential risk, but even there, after reading this.jobStart, the subsequent call isJobWaiting() is properly synchronized and again reads this.jobStart, which now will be stable. |
Here is the race report given by a dynamic race detector: Data race on field org.eclipse.jdt.internal.core.search.processing.JobManager.jobStart: {{{ Concurrent read in thread T1 (locks held: {}) ----> at org.eclipse.jdt.internal.core.search.indexing.IndexManager.indexSourceFolder(IndexManager.java:614) at org.eclipse.jdt.internal.core.ClasspathChange.requestIndexing(ClasspathChange.java:566) at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:2039) at org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged(DeltaProcessingState.java:477) at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:299) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:289) at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:152) at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:374) at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1471) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2251) at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:794) at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3097) at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3059) at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:3112) at org.eclipse.jdt.core.tests.builder.TestingEnvironment.setClasspath(TestingEnvironment.java:1048) at org.eclipse.jdt.core.tests.builder.TestingEnvironment.addEntry(TestingEnvironment.java:285) at org.eclipse.jdt.core.tests.builder.TestingEnvironment.addPackageFragmentRoot(TestingEnvironment.java:167) at org.eclipse.jdt.core.tests.builder.TestingEnvironment.addPackageFragmentRoot(TestingEnvironment.java:145) at org.eclipse.jdt.core.tests.builder.TestingEnvironment.addPackageFragmentRoot(TestingEnvironment.java:136) at org.eclipse.jdt.core.tests.builder.IncrementalTests.testMemberTypeOfOtherProject(IncrementalTests.java:607) at junit.framework.TestCase.runTest(TestCase.java:176) at junit.framework.TestCase.runBare(TestCase.java:141) at junit.framework.TestResult$1.protect(TestResult.java:122) at junit.framework.TestResult.runProtected(TestResult.java:142) at junit.framework.TestResult.run(TestResult.java:125) at junit.framework.TestCase.run(TestCase.java:129) at junit.framework.TestSuite.runTest(TestSuite.java:252) at junit.framework.TestSuite.run(TestSuite.java:247) at junit.framework.TestSuite.runTest(TestSuite.java:252) at junit.framework.TestSuite.run(TestSuite.java:247) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:692) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:319) at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:36) at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:32) at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608) at org.eclipse.equinox.launcher.Main.run(Main.java:1515) at org.eclipse.equinox.launcher.Main.main(Main.java:1488) at org.eclipse.core.launcher.Main.main(Main.java:34) T1 is the main thread Concurrent write in thread T29 (locks held: {Monitor@e919628}) ----> at org.eclipse.jdt.internal.core.search.processing.JobManager.moveToNextJob(JobManager.java:142) at org.eclipse.jdt.internal.core.search.indexing.IndexManager.moveToNextJob(IndexManager.java:638) - locked Monitor@e919628 at org.eclipse.jdt.internal.core.search.indexing.IndexManager.moveToNextJob(IndexManager.java:n/a) at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:411) T29 is created by T1 at org.eclipse.jdt.internal.core.search.processing.JobManager.reset(JobManager.java:331) }}} I think this class really needs some rework given its importance.