UI locks up when XtextReconciler and Hover run concurrently [message #1759135] |
Thu, 06 April 2017 18:44 |
Mary Komor Messages: 61 Registered: July 2009 |
Member |
|
|
We've had end-users complaining about the UI locking up for 5 to 10 seconds as they are using our Xtext based dsl editor. For some users, it happens often enough that the editing experience becomes very frustrating.
Looking at the javacore dumps, it looks like the UI is locked up by the Hover service waiting to get a read-only lock on the XtextDocument, which the XtextReconciler (running on worker thread Worker-106) has a modify lock on. The user must have been moving the mouse cursor while editing, which resulted in the hover getting triggered to resolve the element that the mouse cursor ended up on, while the XtextReconciler was processing the dirty content of the editor. The cross-reference linking in their case can take a while because of the considerable number of inter-dependent projects/resources in their workspace.
The problem sounds similar to
https://www.eclipse.org/forums/index.php/m/1118475/?srch=xtextdocument+lock#msg_1118475 and
https://www.eclipse.org/forums/index.php/m/553531/?srch=xtextdocument+lock#msg_553531
We are on Xtext version 2.8.4. However, our code may not be using the latest APIs.
How can we get around this problem? Are there new/improved APIs that can help?
Here is the main thread:
3XMTHREADINFO "main" J9VMThread:0x00000000011B4500, j9thread_t:0x00007FF720007720, java/lang/Thread:0x00000007006623E0, state:B, prio=6
3XMJAVALTHREAD (java/lang/Thread getId:0x1, isDaemon:false)
3XMTHREADINFO1 (native thread ID:0xD831, native priority:0x6, native policy:UNKNOWN, vmstate:B, vm thread flags:0x00000201)
3XMTHREADINFO2 (native stack address range from:0x00007FF726590000, to:0x00007FF726D91000, size:0x801000)
3XMCPUTIME CPU usage total: 406.338016912 secs, current category="Application"
3XMTHREADBLOCK Blocked on: com/ibm/streams/studio/spleditor/SPLResource@0x0000000732B25400 Owned by: "Worker-106" (J9VMThread:0x0000000004F02800, java/lang/Thread:0x00000007456CFE90)
3XMHEAPALLOC Heap bytes allocated since last GC cycle=0 (0x0)
3XMTHREADINFO3 Java callstack:
4XESTACKTRACE at org/eclipse/xtext/ui/editor/model/XtextDocument$XtextDocumentLocker.internalReadOnly(XtextDocument.java:507)
4XESTACKTRACE at org/eclipse/xtext/ui/editor/model/XtextDocument$XtextDocumentLocker.readOnly(XtextDocument.java:492)
4XESTACKTRACE at org/eclipse/xtext/ui/editor/model/XtextDocument.readOnly(XtextDocument.java:133)
4XESTACKTRACE at org/eclipse/xtext/ui/editor/hover/AbstractEObjectHover.getHoverRegion(AbstractEObjectHover.java:57)
4XESTACKTRACE at org/eclipse/xtext/ui/editor/hover/AbstractCompositeHover.getHoverRegion(AbstractCompositeHover.java:64)
4XESTACKTRACE at org/eclipse/jface/text/TextViewerHoverManager.computeInformation(TextViewerHoverManager.java:140)
4XESTACKTRACE at org/eclipse/jface/text/AbstractInformationControlManager.doShowInformation(AbstractInformationControlManager.java:1131)
4XESTACKTRACE at org/eclipse/jface/text/AbstractHoverInformationControlManager$MouseTracker.mouseHover(AbstractHoverInformationControlManager.java:519)
4XESTACKTRACE at org/eclipse/swt/widgets/TypedListener.handleEvent(TypedListener.java:208(Compiled Code))
4XESTACKTRACE at org/eclipse/swt/widgets/EventTable.sendEvent(EventTable.java:84(Compiled Code))
4XESTACKTRACE at org/eclipse/swt/widgets/Display.sendEvent(Display.java:4481(Compiled Code))
4XESTACKTRACE at org/eclipse/swt/widgets/Widget.sendEvent(Widget.java:1327(Compiled Code))
4XESTACKTRACE at org/eclipse/swt/widgets/Display.runDeferredEvents(Display.java:3819(Compiled Code))
4XESTACKTRACE at org/eclipse/swt/widgets/Display.readAndDispatch(Display.java:3430(Compiled Code))
4XESTACKTRACE at org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine$4.run(PartRenderingEngine.java:1127(Compiled Code))
4XESTACKTRACE at org/eclipse/core/databinding/observable/Realm.runWithDefault(Realm.java:337)
4XESTACKTRACE at org/eclipse/e4/ui/internal/workbench/swt/PartRenderingEngine.run(PartRenderingEngine.java:1018)
4XESTACKTRACE at org/eclipse/e4/ui/internal/workbench/E4Workbench.createAndRunUI(E4Workbench.java:156)
4XESTACKTRACE at org/eclipse/ui/internal/Workbench$5.run(Workbench.java:654)
4XESTACKTRACE at org/eclipse/core/databinding/observable/Realm.runWithDefault(Realm.java:337)
4XESTACKTRACE at org/eclipse/ui/internal/Workbench.createAndRunWorkbench(Workbench.java:598)
4XESTACKTRACE at org/eclipse/ui/PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
4XESTACKTRACE at org/eclipse/ui/internal/ide/application/IDEApplication.start(IDEApplication.java:139)
4XESTACKTRACE at org/eclipse/equinox/internal/app/EclipseAppHandle.run(EclipseAppHandle.java:196)
4XESTACKTRACE at org/eclipse/core/runtime/internal/adaptor/EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
4XESTACKTRACE at org/eclipse/core/runtime/internal/adaptor/EclipseAppLauncher.start(EclipseAppLauncher.java:104)
4XESTACKTRACE at org/eclipse/core/runtime/adaptor/EclipseStarter.run(EclipseStarter.java:380)
4XESTACKTRACE at org/eclipse/core/runtime/adaptor/EclipseStarter.run(EclipseStarter.java:235)
4XESTACKTRACE at sun/reflect/NativeMethodAccessorImpl.invoke0(Native Method)
4XESTACKTRACE at sun/reflect/NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
4XESTACKTRACE at sun/reflect/DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
4XESTACKTRACE at java/lang/reflect/Method.invoke(Method.java:508)
4XESTACKTRACE at org/eclipse/equinox/launcher/Main.invokeFramework(Main.java:669)
4XESTACKTRACE at org/eclipse/equinox/launcher/Main.basicRun(Main.java:608)
4XESTACKTRACE at org/eclipse/equinox/launcher/Main.run(Main.java:1515)
4XESTACKTRACE at org/eclipse/equinox/launcher/Main.main(Main.java:1488)
Here's Worker-106
3XMTHREADINFO "Worker-106" J9VMThread:0x0000000004F02800, j9thread_t:0x00007FF58401E4F0, java/lang/Thread:0x00000007456CFE90, state:R, prio=5
3XMJAVALTHREAD (java/lang/Thread getId:0xD473, isDaemon:false)
3XMTHREADINFO1 (native thread ID:0x8D36, native priority:0x5, native policy:UNKNOWN, vmstate:CW, vm thread flags:0x00000001)
3XMTHREADINFO2 (native stack address range from:0x00007FF5D70B0000, to:0x00007FF5D70F1000, size:0x41000)
3XMCPUTIME CPU usage total: 99.762830708 secs, current category="Application"
3XMHEAPALLOC Heap bytes allocated since last GC cycle=21330080 (0x14578A0)
3XMTHREADINFO3 Java callstack:
4XESTACKTRACE at org/eclipse/xtext/builder/builderState/impl/EObjectDescriptionImpl.getEObjectURI(EObjectDescriptionImpl.java:240(Compiled Code))
4XESTACKTRACE at org/eclipse/xtext/builder/impl/DirtyStateAwareResourceDescriptions$5.apply(DirtyStateAwareResourceDescriptions.java:169(Compiled Code))
4XESTACKTRACE at org/eclipse/xtext/builder/impl/DirtyStateAwareResourceDescriptions$5.apply(DirtyStateAwareResourceDescriptions.java:1(Compiled Code))
4XESTACKTRACE at com/google/common/collect/Iterators$7.computeNext(Iterators.java:702(Compiled Code))
4XESTACKTRACE at com/google/common/collect/AbstractIterator.tryToComputeNext(AbstractIterator.java:143(Compiled Code))
4XESTACKTRACE at com/google/common/collect/AbstractIterator.hasNext(AbstractIterator.java:138(Compiled Code))
4XESTACKTRACE at com/google/common/collect/Iterators$5.hasNext(Iterators.java:596(Compiled Code))
4XESTACKTRACE at com/google/common/collect/Iterators$7.computeNext(Iterators.java:700(Compiled Code))
4XESTACKTRACE at com/google/common/collect/AbstractIterator.tryToComputeNext(AbstractIterator.java:143(Compiled Code))
4XESTACKTRACE at com/google/common/collect/AbstractIterator.hasNext(AbstractIterator.java:138(Compiled Code))
4XESTACKTRACE at com/google/common/collect/Iterators$5.hasNext(Iterators.java:596(Compiled Code))
4XESTACKTRACE at com/google/common/collect/Iterators$7.computeNext(Iterators.java:700(Compiled Code))
4XESTACKTRACE at com/google/common/collect/AbstractIterator.tryToComputeNext(AbstractIterator.java:143(Compiled Code))
4XESTACKTRACE at com/google/common/collect/AbstractIterator.hasNext(AbstractIterator.java:138(Compiled Code))
4XESTACKTRACE at com/google/common/collect/Iterators$5.hasNext(Iterators.java:596(Compiled Code))
4XESTACKTRACE at com/ibm/streams/studio/spleditor/scoping/AbstractSPLScope.filterByModifier(AbstractSPLScope.java:487(Compiled Code))
4XESTACKTRACE at com/ibm/streams/studio/spleditor/scoping/WorkspaceScope.getAllLocalElements(WorkspaceScope.java:56(Compiled Code))
4XESTACKTRACE at com/ibm/streams/studio/spleditor/scoping/AbstractSPLScope.getLocalElementsByName(AbstractSPLScope.java:1155(Compiled Code))
4XESTACKTRACE at org/eclipse/xtext/scoping/impl/AbstractScope.getSingleLocalElementByName(AbstractScope.java:112(Compiled Code))
4XESTACKTRACE at org/eclipse/xtext/scoping/impl/AbstractScope.getSingleElement(AbstractScope.java:105(Compiled Code))
4XESTACKTRACE at org/eclipse/xtext/linking/impl/ImportedNamesAdapter$WrappingScope.getSingleElement(ImportedNamesAdapter.java:69(Compiled Code))
4XESTACKTRACE at org/eclipse/xtext/scoping/impl/AbstractScope.getSingleElement(AbstractScope.java:108(Compiled Code))
4XESTACKTRACE at com/ibm/streams/studio/spleditor/scoping/SPLMapBasedScope.getSingleElement(SPLMapBasedScope.java:88(Compiled Code))
4XESTACKTRACE at com/ibm/streams/studio/spleditor/scoping/ImportAwareScope.getSingleElement(ImportAwareScope.java:67(Compiled Code))
4XESTACKTRACE at org/eclipse/xtext/scoping/impl/AbstractScope.getSingleElement(AbstractScope.java:108(Compiled Code))
4XESTACKTRACE at com/ibm/streams/studio/spleditor/scoping/SPLMapBasedScope.getSingleElement(SPLMapBasedScope.java:88(Compiled Code))
4XESTACKTRACE at org/eclipse/xtext/scoping/impl/AbstractScope.getSingleElement(AbstractScope.java:108(Compiled Code))
4XESTACKTRACE at org/eclipse/xtext/scoping/impl/AbstractScope.getSingleElement(AbstractScope.java:108(Compiled Code))
4XESTACKTRACE at org/eclipse/xtext/linking/impl/DefaultLinkingService.getLinkedObjects(DefaultLinkingService.java:121(Compiled Code))
4XESTACKTRACE at org/eclipse/xtext/linking/lazy/LazyLinkingResource.getEObject(LazyLinkingResource.java:250(Compiled Code))
4XESTACKTRACE at org/eclipse/xtext/linking/lazy/LazyLinkingResource.getEObject(LazyLinkingResource.java:225(Compiled Code))
5XESTACKTRACE (entered lock: com/ibm/streams/studio/spleditor/SPLResource@0x0000000732B25400, entry count: 2)
4XESTACKTRACE at org/eclipse/xtext/linking/lazy/LazyLinkingResource.doResolveLazyCrossReference(LazyLinkingResource.java:192(Compiled Code))
4XESTACKTRACE at org/eclipse/xtext/linking/lazy/LazyLinkingResource.resolveLazyCrossReference(LazyLinkingResource.java:151(Compiled Code))
4XESTACKTRACE at org/eclipse/xtext/linking/lazy/LazyLinkingResource.resolveLazyCrossReferences(LazyLinkingResource.java:137(Compiled Code))
4XESTACKTRACE at org/eclipse/xtext/EcoreUtil2.resolveLazyCrossReferences(EcoreUtil2.java:528)
4XESTACKTRACE at org/eclipse/xtext/ui/editor/reconciler/XtextDocumentReconcileStrategy.postParse(XtextDocumentReconcileStrategy.java:175)
4XESTACKTRACE at org/eclipse/xtext/ui/editor/reconciler/XtextDocumentReconcileStrategy.doReconcile(XtextDocumentReconcileStrategy.java:153)
4XESTACKTRACE at org/eclipse/xtext/ui/editor/reconciler/XtextDocumentReconcileStrategy.reconcile(XtextDocumentReconcileStrategy.java:67)
4XESTACKTRACE at org/eclipse/xtext/ui/editor/reconciler/XtextReconciler.doRun(XtextReconciler.java:442)
4XESTACKTRACE at org/eclipse/xtext/ui/editor/reconciler/XtextReconciler.access$3(XtextReconciler.java:422)
4XESTACKTRACE at org/eclipse/xtext/ui/editor/reconciler/XtextReconciler$1.process(XtextReconciler.java:363)
4XESTACKTRACE at org/eclipse/xtext/ui/editor/reconciler/XtextReconciler$1.process(XtextReconciler.java:1(Compiled Code))
4XESTACKTRACE at org/eclipse/xtext/util/concurrent/IUnitOfWork$Void.exec(IUnitOfWork.java:37(Compiled Code))
4XESTACKTRACE at org/eclipse/xtext/resource/OutdatedStateManager.exec(OutdatedStateManager.java:121(Compiled Code))
4XESTACKTRACE at org/eclipse/xtext/ui/editor/model/XtextDocument$XtextDocumentLocker.modify(XtextDocument.java:428(Compiled Code))
5XESTACKTRACE (entered lock: com/ibm/streams/studio/spleditor/SPLResource@0x0000000732B25400, entry count: 1)
4XESTACKTRACE at org/eclipse/xtext/ui/editor/model/XtextDocument.internalModify(XtextDocument.java:162)
4XESTACKTRACE at org/eclipse/xtext/ui/editor/reconciler/XtextReconciler.run(XtextReconciler.java:360)
4XESTACKTRACE at org/eclipse/core/internal/jobs/Worker.run(Worker.java:55(Compiled Code))
|
|
|
|
Powered by
FUDForum. Page generated in 0.03619 seconds