Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324585 - StackOverflowError on delta notification
Summary: StackOverflowError on delta notification
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: All Windows All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Egidijus Vaisnora CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-06 10:16 EDT by Egidijus Vaisnora CLA
Modified: 2012-09-21 06:50 EDT (History)
3 users (show)

See Also:
stepper: review+


Attachments
Test scenario (2.26 KB, patch)
2010-09-06 10:18 EDT, Egidijus Vaisnora CLA
no flags Details | Diff
Test v2 - ready to be committed (3.72 KB, patch)
2010-09-14 02:29 EDT, Eike Stepper CLA
no flags Details | Diff
Patch v3 - fix for notification builder avoiding recursion (1.86 KB, patch)
2011-02-26 06:51 EST, Egidijus Vaisnora CLA
no flags Details | Diff
Patch v4 - ready to be committed (3.25 KB, patch)
2011-03-01 02:01 EST, Eike Stepper CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Egidijus Vaisnora CLA 2010-09-06 10:16:30 EDT
User A adds 5000 - 10000 children, user B refreshes session. This will cause StackOverflowError on Windows (default -Xss256k). Strange, but on Mac I cannot reproduce this, different implementation (?). Thread dump for user B:
...
CDODeltaNotificationImpl(NotificationImpl).add(Notification) line: 1020
CDODeltaNotificationImpl(NotificationImpl).add(Notification) line: 1020
CDODeltaNotificationImpl(NotificationImpl).add(Notification) line: 1020
CDONotificationBuilder.add(CDODeltaNotificationImpl) line: 350
CDONotificationBuilder.visit(CDOAddFeatureDelta) line: 118
CDOAddFeatureDeltaImpl.accept(CDOFeatureDeltaVisitor) line: 55
CDONotificationBuilder.visit(CDOListFeatureDelta) line: 192
CDOListFeatureDeltaImpl.accept(CDOFeatureDeltaVisitor) line: 407
CDORevisionDeltaImpl.accept(CDOFeatureDeltaVisitor) line: 279
CDONotificationBuilder.buildNotification(InternalEObject, InternalCDORevision, CDORevisionDelta, Set<CDOObject>) line: 102
CDOTransactionImpl(CDOViewImpl).sendDeltaNotifications(List<CDORevisionDelta>, Set<CDOObject>, Map<CDOID,InternalCDORevision>) line: 1633
CDOTransactionImpl(CDOViewImpl).invalidate(long, List<CDORevisionKey>, List<CDOIDAndVersion>, Map<CDOID,InternalCDORevision>) line: 1479
CDONet4jSessionImpl(CDOSessionImpl).processRefreshSessionResult(RefreshSessionResult, CDOBranch, List<InternalCDOView>, Map<CDOBranch,Map<CDOID,InternalCDORevision>>) line: 568
CDONet4jSessionImpl(CDOSessionImpl).refresh(boolean) line: 529
Comment 1 Egidijus Vaisnora CLA 2010-09-06 10:18:40 EDT
Created attachment 178270 [details]
Test scenario
Comment 2 Eike Stepper CLA 2010-09-14 02:14:04 EDT
Comment on attachment 178270 [details]
Test scenario

Marking patch
Comment 3 Eike Stepper CLA 2010-09-14 02:29:23 EDT
Created attachment 178790 [details]
Test v2 - ready to be committed

Please don't use abbreviations like "s" for session ;-)
Comment 4 Eike Stepper CLA 2010-09-14 02:31:53 EDT
The test you've provided is passing for me. Perhaps the issue has been fixed with another bugzilla? Closing as WORKSFORME. Please reopen if you can properly reproduce the issue.

Please commit the test case (v2) anyway!
Comment 5 Eike Stepper CLA 2010-09-14 02:32:43 EDT
Note that I've ported the test to HEAD as weell. There it's passing, too.
Comment 6 Eike Stepper CLA 2010-11-16 01:03:22 EST
Changing version to 3.0.

Let's only use major versions to indicate the development stream. If more precise baseline info is needed let's insert a time stamp in a comment.
Comment 7 Egidijus Vaisnora CLA 2011-02-26 06:50:32 EST
We are getting time to time this exception, whenever we attempt to port huge models to server. In attached test make iteration counter to the 10000 and setup default stack -Xss256k size, which is default for Sun java 1.5, 32 bit. With windows I can reproduce this error always. For example with MacOS JVM it is not reproducible (tail-return optimization comes to play(?))
Comment 8 Egidijus Vaisnora CLA 2011-02-26 06:51:27 EST
Created attachment 189881 [details]
Patch v3 - fix for notification builder avoiding recursion
Comment 9 Eike Stepper CLA 2011-03-01 01:22:31 EST
Test v2 patch has been marked "ready to be committed" but it has never been obsoleted and I can not find a "Committed" comment. Applying it now is not possible anymore. What is the status of this patch?
Comment 10 Eike Stepper CLA 2011-03-01 02:01:44 EST
Created attachment 190023 [details]
Patch v4 - ready to be committed
Comment 11 Egidijus Vaisnora CLA 2011-03-01 02:45:35 EST
(In reply to comment #9)
> Test v2 patch has been marked "ready to be committed" but it has never been
> obsoleted and I can not find a "Committed" comment. Applying it now is not
> possible anymore. What is the status of this patch?

Yes, "committed" comment is omitted but if I remember correctly, you have committed test case... Any way, now is newer patch committed
Comment 12 Egidijus Vaisnora CLA 2011-03-01 02:46:09 EST
Committed to head, revision 7309
Comment 13 Eike Stepper CLA 2011-06-23 04:26:58 EDT
Moving all open problem reports to 4.0
Comment 14 Eike Stepper CLA 2012-09-21 06:50:02 EDT
Closing.