Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 332238

Summary: [exceptions] OperationCanceledException: Cyclic load attempts for some models
Product: [WebTools] WTP Source Editing Reporter: Nick Sandonato <nsand.dev>
Component: wst.sseAssignee: Nitin Dahyabhai <thatnitind>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P2 CC: cgauss, david_williams, itewksbu, peter.hubbard, sptaszkiewicz, thatnitind
Version: 3.2.2   
Target Milestone: 3.3.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Stack trace for XML file. none

Description Nick Sandonato CLA 2010-12-09 14:13:35 EST
In the test results from the build machine, we're frequently seeing the message (resulting in failure): org.eclipse.core.runtime.OperationCanceledException: Aborted cyclic load attempt for model with id: /FormattingTests/test1.jsp.

I'm leaving this as normal, as it only seems to happen while running the tests and has not been reproduced locally.

Here's the stacktrace:
org.eclipse.core.runtime.OperationCanceledException: Aborted cyclic load attempt for model with id: /FormattingTests/test1.jsp   
 at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl$SharedObject.loop(ModelManagerImpl.java:170)   
 at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl$SharedObject.waitForLoadAttempt(ModelManagerImpl.java:142)   
 at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl.getExistingModel(ModelManagerImpl.java:1137)   
 at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl.getExistingModelForRead(ModelManagerImpl.java:1252)   
 at org.eclipse.wst.jsdt.web.ui.internal.format.FormattingStrategyJSDT.getTranslation(FormattingStrategyJSDT.java:243)   
 at org.eclipse.wst.jsdt.web.ui.internal.format.FormattingStrategyJSDT.format(FormattingStrategyJSDT.java:148)   
 at org.eclipse.jface.text.formatter.MultiPassContentFormatter.formatSlave(MultiPassContentFormatter.java:221)   
 at org.eclipse.wst.sse.ui.StructuredTextMultiPassContentFormatter.formatSlave(StructuredTextMultiPassContentFormatter.java:103)   
 at org.eclipse.jface.text.formatter.MultiPassContentFormatter.formatSlaves(MultiPassContentFormatter.java:268)   
 at org.eclipse.jface.text.formatter.MultiPassContentFormatter.format(MultiPassContentFormatter.java:144)   
 at org.eclipse.wst.jsdt.web.ui.tests.format.FormattingTests.formatAndAssertEquals(FormattingTests.java:199)   
 at org.eclipse.wst.jsdt.web.ui.tests.format.FormattingTests.testFormatHTMLScriptRegionWrappedWithHTMLComment_TextInLeadingComment(FormattingTests.java:144)   
 at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)   
 at junit.extensions.TestSetup$1.protect(TestSetup.java:23)   
 at junit.extensions.TestSetup.run(TestSetup.java:27)   
 at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:376)   
 at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:209)   
 at org.eclipse.test.UITestApplication$3.run(UITestApplication.java:195)   
 at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)   
 at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)   
 at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3515)   
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3164)   
 at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)   
 at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)   
 at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)   
 at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)   
 at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)   
 at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)   
 at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)   
 at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)   
 at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:138)   
 at org.eclipse.test.UITestApplication.run(UITestApplication.java:60)   
 at org.eclipse.test.UITestApplication.start(UITestApplication.java:210)   
 at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)   
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)   
 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)   
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)   
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)   
 at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)   
 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)   
 at org.eclipse.equinox.launcher.Main.run(Main.java:1408)   
 at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
Comment 1 Nick Sandonato CLA 2011-02-04 11:23:29 EST
Talked with Nitin about this and it sounds like JSDT is just holding onto the lock a little too long. Passing to JSDT to investigate.
Comment 2 Szymon Ptaszkiewicz CLA 2011-02-24 07:52:59 EST
Created attachment 189692 [details]
Stack trace for XML file.

This happens also when trying to open XML files. See the attached stack trace.
Comment 3 Nick Sandonato CLA 2011-04-13 10:13:32 EDT
*** Bug 324217 has been marked as a duplicate of this bug. ***
Comment 4 Szymon Ptaszkiewicz CLA 2011-04-13 10:19:00 EDT
(In reply to comment #2)
> Created attachment 189692 [details]
> Stack trace for XML file.
> 
> This happens also when trying to open XML files. See the attached stack trace.

This comment is no longer valid. It was confirmed that our problem was caused by inappropriate Eclipse installation.
Comment 5 Nitin Dahyabhai CLA 2011-12-23 16:30:17 EST
Believed fixed with changes to StructuredRegionProcessor.ModelLifecycleListener#processPreModelEvent(ModelLifecycleEvent) to no longer require a lock.  The indexing thread was attempting to read the same file at the same time as the test itself.