Bug 475652 - Data races inside org.eclipse.jface.text.GapTextStore
Summary: Data races inside org.eclipse.jface.text.GapTextStore
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.6   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2015-08-23 02:11 EDT by Yilong Li CLA
Modified: 2020-05-15 13:12 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yilong Li CLA 2015-08-23 02:11:36 EDT
Two race reports given by a dynamic race detector:
Data race on field org.eclipse.jface.text.GapTextStore.fGapEnd: {{{
    Concurrent write in thread T1 (locks held: {Monitor@573aeb9d, Monitor@7515b3ff})
 ---->  at org.eclipse.jface.text.GapTextStore.adjustGap(GapTextStore.java:226)
        at org.eclipse.jface.text.GapTextStore.replace(GapTextStore.java:196)
        at org.eclipse.jface.text.GapTextStore.set(GapTextStore.java:185)
        at org.eclipse.jface.text.CopyOnWriteTextStore.replace(CopyOnWriteTextStore.java:156)
        at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1184)
        at org.eclipse.core.internal.filebuffers.SynchronizableDocument.replace(SynchronizableDocument.java:194)
        at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1210)
        at org.eclipse.core.internal.filebuffers.SynchronizableDocument.replace(SynchronizableDocument.java:180)
        - locked Monitor@7515b3ff at org.eclipse.core.internal.filebuffers.SynchronizableDocument.replace(SynchronizableDocument.java:179) 
        at org.eclipse.search.tests.filesearch.PositionTrackerTest.checkInsertInsideMatch(PositionTrackerTest.java:105)
        at org.eclipse.search.tests.filesearch.PositionTrackerTest.testInsertInsideMatch(PositionTrackerTest.java:87)
        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.extensions.TestDecorator.basicRun(TestDecorator.java:23)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
        at junit.framework.TestResult.runProtected(TestResult.java:142)
        at junit.extensions.TestSetup.run(TestSetup.java:27)
        at junit.framework.TestSuite.runTest(TestSuite.java:252)
        at junit.framework.TestSuite.run(TestSuite.java:247)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
        at junit.framework.TestResult.runProtected(TestResult.java:142)
        at junit.extensions.TestSetup.run(TestSetup.java:27)
        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.UITestApplication$2.run(UITestApplication.java:197)
        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
        - locked Monitor@573aeb9d at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:131) 
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3794)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3433)
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
        at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:157)
        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
        at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:140)
        at org.eclipse.test.UITestApplication.run(UITestApplication.java:62)
        at org.eclipse.test.UITestApplication.start(UITestApplication.java:212)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        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 read in thread T293 (locks held: {})
 ---->  at org.eclipse.jface.text.GapTextStore.gapSize(GapTextStore.java:359)
        at org.eclipse.jface.text.GapTextStore.getLength(GapTextStore.java:172)
        at org.eclipse.jface.text.CopyOnWriteTextStore.getLength(CopyOnWriteTextStore.java:146)
        at org.eclipse.jface.text.AbstractDocument.getLength(AbstractDocument.java:842)
        at org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy.initialReconcile(SpellingReconcileStrategy.java:169)
        at org.eclipse.jface.text.reconciler.MonoReconciler.initialProcess(MonoReconciler.java:105)
        at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:173)
    T293 is created by T1
        at org.eclipse.jface.text.reconciler.AbstractReconciler.startReconciling(AbstractReconciler.java:577)
}}}

Data race on field org.eclipse.jface.text.GapTextStore.fContent: {{{
    Concurrent read in thread T293 (locks held: {})
 ---->  at org.eclipse.jface.text.GapTextStore.getLength(GapTextStore.java:172)
        at org.eclipse.jface.text.CopyOnWriteTextStore.getLength(CopyOnWriteTextStore.java:146)
        at org.eclipse.jface.text.AbstractDocument.getLength(AbstractDocument.java:842)
        at org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy.initialReconcile(SpellingReconcileStrategy.java:169)
        at org.eclipse.jface.text.reconciler.MonoReconciler.initialProcess(MonoReconciler.java:105)
        at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:173)
    T293 is created by T1
        at org.eclipse.jface.text.reconciler.AbstractReconciler.startReconciling(AbstractReconciler.java:577)

    Concurrent write in thread T1 (locks held: {Monitor@573aeb9d, Monitor@7515b3ff})
 ---->  at org.eclipse.jface.text.GapTextStore.reallocate(GapTextStore.java:327)
        at org.eclipse.jface.text.GapTextStore.adjustGap(GapTextStore.java:223)
        at org.eclipse.jface.text.GapTextStore.replace(GapTextStore.java:196)
        at org.eclipse.jface.text.GapTextStore.set(GapTextStore.java:185)
        at org.eclipse.jface.text.CopyOnWriteTextStore.replace(CopyOnWriteTextStore.java:156)
        at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1184)
        at org.eclipse.core.internal.filebuffers.SynchronizableDocument.replace(SynchronizableDocument.java:194)
        at org.eclipse.jface.text.AbstractDocument.replace(AbstractDocument.java:1210)
        at org.eclipse.core.internal.filebuffers.SynchronizableDocument.replace(SynchronizableDocument.java:180)
        - locked Monitor@7515b3ff at org.eclipse.core.internal.filebuffers.SynchronizableDocument.replace(SynchronizableDocument.java:179) 
        at org.eclipse.search.tests.filesearch.PositionTrackerTest.checkInsertInsideMatch(PositionTrackerTest.java:105)
        at org.eclipse.search.tests.filesearch.PositionTrackerTest.testInsertInsideMatch(PositionTrackerTest.java:87)
        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.extensions.TestDecorator.basicRun(TestDecorator.java:23)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
        at junit.framework.TestResult.runProtected(TestResult.java:142)
        at junit.extensions.TestSetup.run(TestSetup.java:27)
        at junit.framework.TestSuite.runTest(TestSuite.java:252)
        at junit.framework.TestSuite.run(TestSuite.java:247)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:23)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
        at junit.framework.TestResult.runProtected(TestResult.java:142)
        at junit.extensions.TestSetup.run(TestSetup.java:27)
        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.UITestApplication$2.run(UITestApplication.java:197)
        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
        - locked Monitor@573aeb9d at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:131) 
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3794)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3433)
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
        at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:157)
        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
        at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:140)
        at org.eclipse.test.UITestApplication.run(UITestApplication.java:62)
        at org.eclipse.test.UITestApplication.start(UITestApplication.java:212)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        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
}}}
Comment 1 Eclipse Genie CLA 2020-05-15 13:12:04 EDT
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.