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

Bug 353448

Summary: Attempt to Modify Historical Revision
Product: [Modeling] EMF Reporter: kaab <kaabab>
Component: cdo.coreAssignee: Eike Stepper <stepper>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3    
Version: 4.2   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 353246    
Bug Blocks:    
Attachments:
Description Flags
Re-posting of the test case reproducing the issue
none
New test case none

Description kaab CLA 2011-07-29 18:04:33 EDT
Build Identifier:  I20110613-1736

+ In our product we would like to use CDO in a multithreaded fashion (read/write) and have been faced with a number of bugs, one of which has been reported here :https://bugs.eclipse.org/bugs/show_bug.cgi?id=353246. This bug entry is based on the same test as the previous one, but is possibly revealing a different issue. Using the same test provided in the previous bug multiple times might cause a different exception.

+ The locking strategy used here is not a tree locking strategy as I said in the previous bug report, we simply lock every resource node in which we will need to add a new resource node, the lock is released right after the node has been added (commit with autorelease). In order to do that we start by bootstrapping default prefix paths that we define for our models, and we incrementally build the resource path by locking the resource node (path segment) at each level in order to add a new one.

+ When the tests is run multiple times in a test suite, it might cause the exception (instead of the one logged in the previous bug report) :
java.util.ConcurrentModificationException: Attempt by Transaction[2:2] to modify historical revision: CDOResourceFolder@OID9:0v1
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.computeDirtyObject(TransactionCommitContext.java:922)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.computeDirtyObjects(TransactionCommitContext.java:894)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:414)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:42)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
	at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:244)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:92)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:109)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:84)
	at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:90)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:326)
	at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:63)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:63)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:251)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:147)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:679)


+ I could not find a deterministic way to reproduce the issue, just running the test multiple times until the exception appears.

+ I am not sure if this is caused by our implementation of locking or if it's revealing an issue in CDO, so I would like your insight on this, and will be ready to provide any additional details.



Reproducible: Sometimes

Steps to Reproduce:
1. Run the test provided in a test suite multiple times (added multiple times to the list of tests in initTestClasses method)
2. At some point the exception thrown will be different than the one reported in my previous bug report (usually happen at the 6th run) :
java.util.ConcurrentModificationException: Attempt by Transaction[2:2] to modify historical revision: CDOResourceFolder@OID9:0v1
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.computeDirtyObject(TransactionCommitContext.java:922)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.computeDirtyObjects(TransactionCommitContext.java:894)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:414)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:42)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
	at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:244)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:92)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:109)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:84)
	at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:90)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:326)
	at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:63)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:63)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:251)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:147)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:679)
Comment 1 kaab CLA 2011-07-29 18:15:43 EDT
Created attachment 200617 [details]
Re-posting of the test case reproducing the issue
Comment 2 Eike Stepper CLA 2011-08-04 02:11:07 EDT
Now that bug 353246 is resolved, can you please retest this problem?
Comment 3 kaab CLA 2011-08-05 13:36:30 EDT
(In reply to comment #2)
> Now that bug 353246 is resolved, can you please retest this problem?

Could not reproduce the same exception but running the same test multiple time would sometimes produce the following exception :

java.lang.NullPointerException
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.invalidate(AbstractCDOView.java:1160)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.invalidate(CDOTransactionImpl.java:2126)
	at org.eclipse.emf.internal.cdo.view.CDOViewImpl.doInvalidate(CDOViewImpl.java:504)
	at org.eclipse.emf.internal.cdo.view.CDOViewImpl$InvalidationRunnable.run(CDOViewImpl.java:1241)
	at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:26)
	at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:1)
	at org.eclipse.net4j.util.concurrent.QueueWorker.doWork(QueueWorker.java:81)
	at org.eclipse.net4j.util.concurrent.QueueWorker.work(QueueWorker.java:72)
	at org.eclipse.net4j.util.concurrent.Worker$WorkerThread.run(Worker.java:206)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.invalidate(CDOTransactionImpl.java:2126)
	at org.eclipse.emf.internal.cdo.view.CDOViewImpl.doInvalidate(CDOViewImpl.java:504)
	at org.eclipse.emf.internal.cdo.view.CDOViewImpl$InvalidationRunnable.run(CDOViewImpl.java:1241)
	at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:26)
	at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:1)
	at org.eclipse.net4j.util.concurrent.QueueWorker.doWork(QueueWorker.java:81)
	at org.eclipse.net4j.util.concurrent.QueueWorker.work(QueueWorker.java:72)
	at org.eclipse.net4j.util.concurrent.Worker$WorkerThread.run(Worker.java:206)
[ERROR] NullPointerException
java.lang.NullPointerException
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.invalidate(AbstractCDOView.java:1160)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.invalidate(CDOTransactionImpl.java:2126)
	at org.eclipse.emf.internal.cdo.view.CDOViewImpl.doInvalidate(CDOViewImpl.java:504)
	at org.eclipse.emf.internal.cdo.view.CDOViewImpl$InvalidationRunnable.run(CDOViewImpl.java:1241)
	at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:26)
	at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:1)
	at org.eclipse.net4j.util.concurrent.QueueWorker.doWork(QueueWorker.java:81)
	at org.eclipse.net4j.util.concurrent.QueueWorker.work(QueueWorker.java:72)
	at org.eclipse.net4j.util.concurrent.Worker$WorkerThread.run(Worker.java:206)
Comment 4 kaab CLA 2011-08-05 13:42:49 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > Now that bug 353246 is resolved, can you please retest this problem?
> 
> Could not reproduce the same exception but running the same test multiple time
> would sometimes produce the following exception :
> 
> java.lang.NullPointerException
>     at
> org.eclipse.emf.internal.cdo.view.AbstractCDOView.invalidate(AbstractCDOView.java:1160)
>     at
> org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.invalidate(CDOTransactionImpl.java:2126)
>     at
> org.eclipse.emf.internal.cdo.view.CDOViewImpl.doInvalidate(CDOViewImpl.java:504)
>     at
> org.eclipse.emf.internal.cdo.view.CDOViewImpl$InvalidationRunnable.run(CDOViewImpl.java:1241)
>     at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:26)
>     at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:1)
>     at
> org.eclipse.net4j.util.concurrent.QueueWorker.doWork(QueueWorker.java:81)
>     at org.eclipse.net4j.util.concurrent.QueueWorker.work(QueueWorker.java:72)
>     at
> org.eclipse.net4j.util.concurrent.Worker$WorkerThread.run(Worker.java:206)
>     at
> org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.invalidate(CDOTransactionImpl.java:2126)
>     at
> org.eclipse.emf.internal.cdo.view.CDOViewImpl.doInvalidate(CDOViewImpl.java:504)
>     at
> org.eclipse.emf.internal.cdo.view.CDOViewImpl$InvalidationRunnable.run(CDOViewImpl.java:1241)
>     at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:26)
>     at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:1)
>     at
> org.eclipse.net4j.util.concurrent.QueueWorker.doWork(QueueWorker.java:81)
>     at org.eclipse.net4j.util.concurrent.QueueWorker.work(QueueWorker.java:72)
>     at
> org.eclipse.net4j.util.concurrent.Worker$WorkerThread.run(Worker.java:206)
> [ERROR] NullPointerException
> java.lang.NullPointerException
>     at
> org.eclipse.emf.internal.cdo.view.AbstractCDOView.invalidate(AbstractCDOView.java:1160)
>     at
> org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.invalidate(CDOTransactionImpl.java:2126)
>     at
> org.eclipse.emf.internal.cdo.view.CDOViewImpl.doInvalidate(CDOViewImpl.java:504)
>     at
> org.eclipse.emf.internal.cdo.view.CDOViewImpl$InvalidationRunnable.run(CDOViewImpl.java:1241)
>     at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:26)
>     at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:1)
>     at
> org.eclipse.net4j.util.concurrent.QueueWorker.doWork(QueueWorker.java:81)
>     at org.eclipse.net4j.util.concurrent.QueueWorker.work(QueueWorker.java:72)
>     at
> org.eclipse.net4j.util.concurrent.Worker$WorkerThread.run(Worker.java:206)

I as I said this exception is not always reproducible, and I was just not able to reproduce when I posted my last log, but after doing so I was able to by running a last test, the conditions in which the problem occur are completly unknown to me, so I can only test multiple times hoping that it will occur, and it did again after your changes :

Here's the full stack : 

java.util.ConcurrentModificationException: Attempt by Transaction[2:4] to modify historical revision: CDOResourceFolder@OID6:0v2
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.computeDirtyObject(TransactionCommitContext.java:953)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.computeDirtyObjects(TransactionCommitContext.java:925)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:442)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:42)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
	at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:244)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:92)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:109)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:84)
	at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:90)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:326)
	at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:63)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:63)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:251)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:147)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
[ERROR] Rollback in DBStore: java.util.ConcurrentModificationException: Attempt by Transaction[2:4] to modify historical revision: CDOResourceFolder@OID6:0v2
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.computeDirtyObject(TransactionCommitContext.java:953)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.computeDirtyObjects(TransactionCommitContext.java:925)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:442)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:42)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
	at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:244)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:92)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:109)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:84)
	at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:90)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:326)
	at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:63)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:63)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:251)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:147)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)


!ENTRY org.eclipse.emf.cdo.net4j 4 0 2011-08-05 13:37:04.442
!MESSAGE Rollback in DBStore: java.util.ConcurrentModificationException: Attempt by Transaction[2:4] to modify historical revision: CDOResourceFolder@OID6:0v2
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.computeDirtyObject(TransactionCommitContext.java:953)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.computeDirtyObjects(TransactionCommitContext.java:925)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:442)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:42)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
	at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:244)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:92)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:109)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:84)
	at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:90)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:326)
	at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:63)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:63)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:251)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:147)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)

Thread Thread[Worker-1,5,main] caused an exception : [org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.commit(CDOSingleTransactionStrategyImpl.java:94), org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1069), org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1089), org.eclipse.emf.cdo.tests.DuplicateEntryTest$IrisTransactionDelegateMock.getResource(DuplicateEntryTest.java:229), org.eclipse.emf.cdo.tests.DuplicateEntryTest$IrisTransactionDelegateMock.<init>(DuplicateEntryTest.java:196), org.eclipse.emf.cdo.tests.DuplicateEntryTest$CreateResourceJob.run(DuplicateEntryTest.java:168), org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)]
[ERROR] Invalid URI "cdo://repo1/baseFolder/company1Models/Project1/SubProject1/0/0": org.eclipse.emf.cdo.common.util.CDOException: Node 0 not found
org.eclipse.emf.cdo.util.InvalidURIException: Invalid URI "cdo://repo1/baseFolder/company1Models/Project1/SubProject1/0/0": org.eclipse.emf.cdo.common.util.CDOException: Node 0 not found
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.registerProxyResource(AbstractCDOView.java:1053)
	at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.registerProxy(CDOResourceImpl.java:902)
	at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.load(CDOResourceImpl.java:826)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResource(AbstractCDOView.java:486)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResource(AbstractCDOView.java:477)
	at org.eclipse.emf.cdo.tests.DuplicateEntryTest$IrisTransactionDelegateMock.getResource(DuplicateEntryTest.java:278)
	at org.eclipse.emf.cdo.tests.DuplicateEntryTest$IrisTransactionDelegateMock.<init>(DuplicateEntryTest.java:196)
	at org.eclipse.emf.cdo.tests.DuplicateEntryTest$CreateResourceJob.run(DuplicateEntryTest.java:168)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.emf.cdo.common.util.CDOException: Node 0 not found
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResourceNodeID(AbstractCDOView.java:421)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResourceNodeIDChecked(AbstractCDOView.java:358)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResourceNodeID(AbstractCDOView.java:346)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.registerProxyResource(AbstractCDOView.java:1042)
	... 11 more

!ENTRY org.eclipse.emf.cdo 4 0 2011-08-05 13:37:04.446
!MESSAGE Invalid URI "cdo://repo1/baseFolder/company1Models/Project1/SubProject1/0/0": org.eclipse.emf.cdo.common.util.CDOException: Node 0 not found
!STACK 0
org.eclipse.emf.cdo.util.InvalidURIException: Invalid URI "cdo://repo1/baseFolder/company1Models/Project1/SubProject1/0/0": org.eclipse.emf.cdo.common.util.CDOException: Node 0 not found
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.registerProxyResource(AbstractCDOView.java:1053)
	at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.registerProxy(CDOResourceImpl.java:902)
	at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.load(CDOResourceImpl.java:826)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResource(AbstractCDOView.java:486)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResource(AbstractCDOView.java:477)
	at org.eclipse.emf.cdo.tests.DuplicateEntryTest$IrisTransactionDelegateMock.getResource(DuplicateEntryTest.java:278)
	at org.eclipse.emf.cdo.tests.DuplicateEntryTest$IrisTransactionDelegateMock.<init>(DuplicateEntryTest.java:196)
	at org.eclipse.emf.cdo.tests.DuplicateEntryTest$CreateResourceJob.run(DuplicateEntryTest.java:168)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.emf.cdo.common.util.CDOException: Node 0 not found
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResourceNodeID(AbstractCDOView.java:421)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResourceNodeIDChecked(AbstractCDOView.java:358)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResourceNodeID(AbstractCDOView.java:346)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.registerProxyResource(AbstractCDOView.java:1042)
	... 11 more

!ENTRY org.eclipse.core.jobs 4 2 2011-08-05 13:37:04.450
!MESSAGE An internal error occurred during: "Create Resource Job".
!STACK 0
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.cdo.util.InvalidURIException: Invalid URI "cdo://repo1/baseFolder/company1Models/Project1/SubProject1/0/0": org.eclipse.emf.cdo.common.util.CDOException: Node 0 not found
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:315)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResource(AbstractCDOView.java:486)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResource(AbstractCDOView.java:477)
	at org.eclipse.emf.cdo.tests.DuplicateEntryTest$IrisTransactionDelegateMock.getResource(DuplicateEntryTest.java:278)
	at org.eclipse.emf.cdo.tests.DuplicateEntryTest$IrisTransactionDelegateMock.<init>(DuplicateEntryTest.java:196)
	at org.eclipse.emf.cdo.tests.DuplicateEntryTest$CreateResourceJob.run(DuplicateEntryTest.java:168)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.emf.cdo.util.InvalidURIException: Invalid URI "cdo://repo1/baseFolder/company1Models/Project1/SubProject1/0/0": org.eclipse.emf.cdo.common.util.CDOException: Node 0 not found
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.registerProxyResource(AbstractCDOView.java:1053)
	at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.registerProxy(CDOResourceImpl.java:902)
	at org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.load(CDOResourceImpl.java:826)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270)
	... 7 more
Caused by: org.eclipse.emf.cdo.common.util.CDOException: Node 0 not found
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResourceNodeID(AbstractCDOView.java:421)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResourceNodeIDChecked(AbstractCDOView.java:358)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResourceNodeID(AbstractCDOView.java:346)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.registerProxyResource(AbstractCDOView.java:1042)
	... 11 more
END OF COMMIT baseFolder/company1Models/Project1/SubProject1/3/3
[ERROR] NullPointerException
java.lang.NullPointerException
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.invalidate(AbstractCDOView.java:1160)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.invalidate(CDOTransactionImpl.java:2126)
	at org.eclipse.emf.internal.cdo.view.CDOViewImpl.doInvalidate(CDOViewImpl.java:504)
	at org.eclipse.emf.internal.cdo.view.CDOViewImpl$InvalidationRunnable.run(CDOViewImpl.java:1241)
	at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:26)
END OF COMMIT baseFolder/company1Models/Project1/SubProject1/1/1
	at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:1)
	at org.eclipse.net4j.util.concurrent.QueueWorker.doWork(QueueWorker.java:81)
	at org.eclipse.net4j.util.concurrent.QueueWorker.work(QueueWorker.java:72)
	at org.eclipse.net4j.util.concurrent.Worker$WorkerThread.run(Worker.java:206)

!ENTRY org.eclipse.net4j.util 4 0 2011-08-05 13:37:04.460
!MESSAGE NullPointerException
!STACK 0
java.lang.NullPointerException
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.invalidate(AbstractCDOView.java:1160)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.invalidate(CDOTransactionImpl.java:2126)
	at org.eclipse.emf.internal.cdo.view.CDOViewImpl.doInvalidate(CDOViewImpl.java:504)
	at org.eclipse.emf.internal.cdo.view.CDOViewImpl$InvalidationRunnable.run(CDOViewImpl.java:1241)
	at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:26)
	at org.eclipse.net4j.util.concurrent.QueueRunner.work(QueueRunner.java:1)
	at org.eclipse.net4j.util.concurrent.QueueWorker.doWork(QueueWorker.java:81)
	at org.eclipse.net4j.util.concurrent.QueueWorker.work(QueueWorker.java:72)
	at org.eclipse.net4j.util.concurrent.Worker$WorkerThread.run(Worker.java:206)
Acquiring lock on : /baseFolder/company1Models to add: /baseFolder/company1Models/Project1/SubProject1 curThread Thread[Worker-4,5,main]
Path Exists /baseFolder/company1Models/Project1/SubProject1 OID OID6
Acquiring lock on : /baseFolder/company1Models/Project1/SubProject1 to add: /baseFolder/company1Models/Project1/SubProject1/2 curThread Thread[Worker-5,5,main]

!ENTRY org.eclipse.core.jobs 4 2 2011-08-05 13:37:14.414
!MESSAGE An internal error occurred during: "Create Resource Job".
!STACK 0
org.eclipse.emf.cdo.common.util.CDOException: Node 2 not found
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResourceNodeID(AbstractCDOView.java:421)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResourceNodeIDChecked(AbstractCDOView.java:358)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResourceNodeID(AbstractCDOView.java:346)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResourceNode(AbstractCDOView.java:312)
	at org.eclipse.emf.cdo.tests.DuplicateEntryTest$IrisTransactionDelegateMock.getResource(DuplicateEntryTest.java:260)
	at org.eclipse.emf.cdo.tests.DuplicateEntryTest$IrisTransactionDelegateMock.<init>(DuplicateEntryTest.java:196)
	at org.eclipse.emf.cdo.tests.DuplicateEntryTest$CreateResourceJob.run(DuplicateEntryTest.java:168)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Acquiring lock on : /baseFolder/company1Models to add: /baseFolder/company1Models/Project1/SubProject1/0 curThread Thread[Worker-4,5,main]

!ENTRY org.eclipse.core.jobs 4 2 2011-08-05 13:37:19.420
!MESSAGE An internal error occurred during: "Create Resource Job".
!STACK 0
org.eclipse.emf.cdo.common.util.CDOException: Node 0 not found
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResourceNodeID(AbstractCDOView.java:421)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResourceNodeIDChecked(AbstractCDOView.java:358)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResourceNodeID(AbstractCDOView.java:346)
	at org.eclipse.emf.internal.cdo.view.AbstractCDOView.getResourceNode(AbstractCDOView.java:312)
	at org.eclipse.emf.cdo.tests.DuplicateEntryTest$IrisTransactionDelegateMock.getResource(DuplicateEntryTest.java:260)
	at org.eclipse.emf.cdo.tests.DuplicateEntryTest$IrisTransactionDelegateMock.<init>(DuplicateEntryTest.java:196)
	at org.eclipse.emf.cdo.tests.DuplicateEntryTest$CreateResourceJob.run(DuplicateEntryTest.java:168)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)




Rmq : I am fully synchronized with Trunk and have applied the patch you provided for : https://bugs.eclipse.org/bugs/show_bug.cgi?id=354009
Comment 5 Eike Stepper CLA 2012-08-14 22:56:17 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 6 Eike Stepper CLA 2012-09-21 05:07:39 EDT
Created attachment 221337 [details]
New test case

I've made a new test case and it does not fail anymore with the exceptions you've reported. I does fail though with a "Node Project1 not found" message. I belive that this is caused by the complicated logic in the test itself.
Comment 7 Eike Stepper CLA 2012-09-21 06:55:52 EDT
I've fixed the test logic problem and now it passes.

Many things have changed both in the locking/lock notification area and the invalidation area. It's likely that this problem has disappeared on that way. Is it possible that you retest and reopen if you still encounter the problem?

commit dabe8f109238937b2ba15b593fcd38a39bb8386c
Comment 8 Eike Stepper CLA 2013-06-27 03:31:22 EDT
Available in R20130613-1157 (4.2)