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

Bug 340457

Summary: stack overflow in XSDSchemaImpl.computeSchemasToPatch
Product: [Modeling] EMF Reporter: Randall Theobald <rstheo>
Component: XSDAssignee: Ed Merks <Ed.Merks>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: ahunter.eclipse, edwinc, Kenn.Hussey, remy.suen
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch to remove recursive call. rstheo: review?

Description Randall Theobald CLA 2011-03-18 12:27:16 EDT
Build Identifier: org.eclipse.xsd(2.6.0.v20100914-1218)

I am a performance analyst for an adopting product. We are working on a customer issue where opening a WSDL file takes minutes instead of seconds and can produce stack overflow errors with default settings. The WSDL in question includes almost 400 xsd files.

I narrowed the problem down to the method:

    org.eclipse.xsd.impl.XSDSchemaImpl.computeSchemasToPatch

which has an unnecessary recursive call. Recursive calls in this method got to be almost 19,000 calls deep with this workload. I contacted Ed Merks and he suggested the following patch might be a solution. I could not find the unit tests in CVS, but interacting with the customer workload was much quicker and some instrumentation showed that the execution results of this method were identical.



Reproducible: Always
Comment 1 Randall Theobald CLA 2011-03-18 12:28:00 EDT
Created attachment 191523 [details]
Proposed patch to remove recursive call.
Comment 2 Ed Merks CLA 2011-03-18 12:50:52 EDT
Sadly there aren't extensive tests.  The only ones we have are part of "Test EMF XML".

I can't think of any reason for having to call patch repeatedly on the same schema, so avoiding the recursive call seems like a very good thing.

The change has been committed to CVS for 2.7.
Comment 3 Randall Theobald CLA 2011-03-18 12:58:33 EDT
There will likely be requests forthcoming to get this backported at least to
2.6 maintenance branch.
Comment 4 Ed Merks CLA 2011-03-18 13:01:24 EDT
Randall,

Sorry the 2.6.2 release is out the door.  The next scheduled release is 2.7.0.  There is no resource for producing additional maintenance streams and their associated builds.
Comment 5 Anthony Hunter CLA 2011-04-13 16:54:50 EDT
(In reply to comment #4)
> Randall,
> 
> Sorry the 2.6.2 release is out the door.  The next scheduled release is 2.7.0. 
> There is no resource for producing additional maintenance streams and their
> associated builds.

Hi Ed,

There is no long term support agreement at Eclipse past SR2 (2.6.2). I agree we have discussed in the past that there is no obligation on the Eclipse committers part to do this work for one company. If there was a long term support agreement at Eclipse, it would be clear what our options were.

An IBM product requires this patch back ported to an earlier release of EMF. Would you be willing to commit the patch to a maintenance branch and produce a build of that branch? Would you at least be willing to commit the patch to a maintenance branch?

Kenn, I CCed you since you actually were responsible for the 3.6.x builds.
Comment 6 Ed Merks CLA 2011-04-13 19:59:04 EDT
Which release are we talking about?  Private notes suggest it might be 2.4.x.  I'm not sure we'd know how to build that...
Comment 7 Edwin Chan CLA 2011-04-14 10:45:22 EDT
(In reply to comment #6)
> Which release are we talking about?  Private notes suggest it might be 2.4.x. 
> I'm not sure we'd know how to build that...

To confirm, this is EMF 2.4.x (which is picked up by IES 3.4.2)
Comment 8 Ed Merks CLA 2011-04-14 11:10:19 EDT
The skills to build the 2.4.x stream have evaporated.
Comment 9 Ed Merks CLA 2011-05-08 03:57:05 EDT
The fix is available in 2.7M7 or earlier.