Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355287 - Error in LockingNotificationsTest.testSameBranchDifferentSession [Combined, MEM-branching, JVM, Native]
Summary: Error in LockingNotificationsTest.testSameBranchDifferentSession [Combined, M...
Status: NEW
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.13   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Caspar D. CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
: 358603 (view as bug list)
Depends on: 353691
Blocks:
  Show dependency tree
 
Reported: 2011-08-20 00:33 EDT by Eike Stepper CLA
Modified: 2020-12-11 10:44 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Stepper CLA 2011-08-20 00:33:05 EDT
Stacktrace

org.eclipse.emf.cdo.tests.config.impl.ConfigTestException: Error in LockingNotificationsTest.testSameBranchDifferentSession [Combined, MEM-branching, JVM, Native]
	at org.eclipse.emf.cdo.tests.config.impl.ConfigTest.runBare(ConfigTest.java:516)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at org.eclipse.net4j.util.tests.AbstractOMTest.run(AbstractOMTest.java:260)
	at junit.framework.TestSuite.runTest(TestSuite.java:243)
	at org.eclipse.emf.cdo.tests.config.impl.ConfigTestSuite$TestWrapper.runTest(ConfigTestSuite.java:126)
	at junit.framework.TestSuite.run(TestSuite.java:238)
	at junit.framework.TestSuite.runTest(TestSuite.java:243)
	at junit.framework.TestSuite.run(TestSuite.java:238)
	at junit.framework.TestSuite.runTest(TestSuite.java:243)
	at junit.framework.TestSuite.run(TestSuite.java:238)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.IllegalStateException: Package not found: http://www.eclipse.org/emf/CDO/tests/model1/1.0.0
	at org.eclipse.emf.cdo.common.model.CDOClassifierRef.resolve(CDOClassifierRef.java:113)
	at org.eclipse.emf.cdo.internal.common.protocol.CDODataInputImpl.readCDOClassifierRefAndResolve(CDODataInputImpl.java:161)
	at org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.readSystemValues(BaseCDORevision.java:145)
	at org.eclipse.emf.cdo.spi.common.revision.BaseCDORevision.read(BaseCDORevision.java:131)
	at org.eclipse.emf.cdo.internal.common.protocol.CDODataInputImpl.readCDORevision(CDODataInputImpl.java:447)
	at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.readRevision(RevisionInfo.java:193)
	at org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.readResult(RevisionInfo.java:145)
	at org.eclipse.emf.cdo.internal.net4j.protocol.LoadRevisionsRequest.confirming(LoadRevisionsRequest.java:143)
	at org.eclipse.emf.cdo.internal.net4j.protocol.LoadRevisionsRequest.confirming(LoadRevisionsRequest.java:1)
	at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientRequest.confirming(CDOClientRequest.java:90)
	at org.eclipse.net4j.signal.RequestWithConfirmation.doExtendedInput(RequestWithConfirmation.java:123)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:326)
	at org.eclipse.net4j.signal.RequestWithConfirmation.doExecute(RequestWithConfirmation.java:103)
	at org.eclipse.net4j.signal.SignalActor.execute(SignalActor.java:51)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:251)
	at org.eclipse.net4j.signal.SignalProtocol.startSignal(SignalProtocol.java:433)
	at org.eclipse.net4j.signal.RequestWithConfirmation.doSend(RequestWithConfirmation.java:87)
	at org.eclipse.net4j.signal.RequestWithConfirmation.send(RequestWithConfirmation.java:73)
	at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:476)
	at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.send(CDOClientProtocol.java:509)
	at org.eclipse.emf.cdo.internal.net4j.protocol.CDOClientProtocol.loadRevisions(CDOClientProtocol.java:164)
	at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.loadRevisions(CDORevisionManagerImpl.java:365)
	at org.eclipse.emf.cdo.tests.util.TestRevisionManager.loadRevisions(TestRevisionManager.java:116)
	at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevisions(CDORevisionManagerImpl.java:276)
	at org.eclipse.emf.cdo.tests.util.TestRevisionManager.getRevisions(TestRevisionManager.java:71)
	at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevision(CDORevisionManagerImpl.java:259)
	at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevision(CDORevisionManagerImpl.java:252)
	at org.eclipse.emf.internal.cdo.view.CDOViewImpl.getRevision(CDOViewImpl.java:484)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.createObject(AbstractCDOView.java:782)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:692)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:661)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getObject(AbstractCDOView.java:1)
	at org.eclipse.emf.cdo.tests.LockingNotificationsTest.test(LockingNotificationsTest.java:104)
	at org.eclipse.emf.cdo.tests.LockingNotificationsTest.testSameBranchDifferentSession(LockingNotificationsTest.java:48)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at junit.framework.TestCase.runTest(TestCase.java:168)
	at org.eclipse.net4j.util.tests.AbstractOMTest.runBare(AbstractOMTest.java:214)
	at org.eclipse.emf.cdo.tests.config.impl.ConfigTest.runBare(ConfigTest.java:507)
	... 18 more
Comment 2 Caspar D. CLA 2011-08-22 01:44:39 EDT
I've seen this happen too, but rarely.

It's the controlView's session (session2) that doesn't know the
model1 ePackage. It's registry is always an instance of
CDOPackageRegistryImpl, and apparently it's this registry that
returns null on CDOClassifierRef.java:110. 

When I debug from there, I end up at:

CDOPackageUnitImpl.loadPackageFromGlobalRegistry(String) line: 391	
CDOPackageUnitImpl.loadPackagesFromGlobalRegistry() line: 379	
CDOPackageUnitImpl.load(InternalCDOPackageRegistry$PackageLoader, boolean) line: 247	
CDOPackageUnitImpl.load(boolean) line: 239	
CDOPackageInfoImpl.doGetEPackage(boolean) line: 123	
CDOPackageInfoImpl.getEPackage(boolean) line: 110	
CDOPackageInfoImpl.getEPackage() line: 105	
CDOPackageRegistryImpl(EPackageRegistryImpl).getEPackage(String) line: 133	
CDOClassifierRef.resolve(EPackage$Registry) line: 110	

That's where the matter is delegated to EPackage.Registry.INSTANCE, which
I thought was always a simple singleton. But it's not. In fact it's
an instance of EPackageRegistryImpl.Delegator, which looks up a ClassLoader
for the current thread, and then uses that as a key into a classloader-
to-registry map...... and if there's no registry for the classloader,
then it creates a registry that delegates to the registry of the parent
classloader....... :-S

This is all waaaaay over my head. I'm at a loss to understand why
the global registry works this way, under what circumstances this 
would fail, and how our test code causes such a failure.

Any comments welcome.
Comment 3 Eike Stepper CLA 2011-09-22 10:56:23 EDT
I'm going to disable LockingNotificationsTest.testSameBranchDifferentSession_explicitRelease() because it's failing all too often and it *seems* to be an issue with the test framework.
Comment 4 Eike Stepper CLA 2011-09-22 10:56:54 EDT
*** Bug 358603 has been marked as a duplicate of this bug. ***
Comment 5 Eike Stepper CLA 2011-09-22 11:01:13 EDT
Committed revision 9203
Comment 6 Eike Stepper CLA 2012-08-14 22:56:26 EDT
Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master.
Comment 7 Eike Stepper CLA 2013-06-29 12:17:50 EDT
We'll try to address open problems in 4.3 (master) first and then port fixes back to 4.2.
Comment 8 Eike Stepper CLA 2015-07-14 02:19:21 EDT
Moving all open bugzillas to 4.5.
Comment 9 Eike Stepper CLA 2016-07-31 01:02:07 EDT
Moving all unaddressed bugzillas to 4.6.
Comment 10 Eike Stepper CLA 2017-12-28 01:13:18 EST
Moving all open bugs to 4.7
Comment 11 Eike Stepper CLA 2019-11-08 02:10:49 EST
Moving all unresolved issues to version 4.8-
Comment 12 Eike Stepper CLA 2019-12-13 12:45:59 EST
Moving all unresolved issues to version 4.9
Comment 13 Eike Stepper CLA 2020-12-11 10:44:31 EST
Moving to 4.13.