Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2121

LazyCachedNode exception under heavy concurrent load

    XMLWordPrintable

    Details

      Description

      When running under heavy load with multiple reader/writer threads, the LazyCacheNode#parentReferenceToSelf method throws one of the following flavor of exceptions:

      ava.util.concurrent.ExecutionException: org.modeshape.jcr.cache.NodeNotFoundInParentException: Cannot locate child node: d0150539c98d674408bb53-7405-450e-908b-be0e566ff830 within parent: d0150539c98d67/
      at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232)
      at java.util.concurrent.FutureTask.get(FutureTask.java:91)
      at org.modeshape.jcr.ConcurrentLoadTest.shouldCreateLotsOfCustomersUnderSingleHierarchy(ConcurrentNodeLoadTest.java:130)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:202)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:65)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
      Caused by: org.modeshape.jcr.cache.NodeNotFoundInParentException: Cannot locate child node: d0150539c98d674408bb53-7405-450e-908b-be0e566ff830 within parent: d0150539c98d67/
      at org.modeshape.jcr.cache.document.LazyCachedNode.parentReferenceToSelf(LazyCachedNode.java:212)
      at org.modeshape.jcr.cache.document.LazyCachedNode.getSegment(LazyCachedNode.java:250)
      at org.modeshape.jcr.cache.document.LazyCachedNode.getPath(LazyCachedNode.java:259)
      at org.modeshape.jcr.cache.document.LazyCachedNode.getPath(LazyCachedNode.java:258)
      at org.modeshape.jcr.cache.document.LazyCachedNode.getPath(LazyCachedNode.java:258)
      at org.modeshape.jcr.AbstractJcrNode.path(AbstractJcrNode.java:234)
      at org.modeshape.jcr.AbstractJcrNode.addNode(AbstractJcrNode.java:1063)
      at org.modeshape.jcr.AbstractJcrNode.addNode(AbstractJcrNode.java:980)
      at org.modeshape.jcr.AbstractJcrNode.addNode(AbstractJcrNode.java:108)
      at org.modeshape.jcr.ConcurrentNodeLoadTest.addContentToCustomer(ConcurrentNodeLoadTest.java:228)
      at org.modeshape.jcr.ConcurrentNodeLoadTest$CustomerModifier.call(ConcurrentNodeLoadTest.java:203)
      at org.modeshape.jcr.ConcurrentNodeLoadTest$CustomerModifier.call(ConcurrentNodeLoadTest.java:185)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      at java.lang.Thread.run(Thread.java:662)
      

      or

      java.lang.NullPointerException
      at org.modeshape.jcr.cache.document.LazyCachedNode.getSegment(LazyCachedNode.java:250)
      at org.modeshape.jcr.cache.document.LazyCachedNode.getPath(LazyCachedNode.java:259)
      at org.modeshape.jcr.cache.document.LazyCachedNode.getPath(LazyCachedNode.java:258)
      at org.modeshape.jcr.AbstractJcrNode.path(AbstractJcrNode.java:234)
      at org.modeshape.jcr.AbstractJcrNode.addNode(AbstractJcrNode.java:1063)
      at org.modeshape.jcr.AbstractJcrNode.addNode(AbstractJcrNode.java:980)
      at org.modeshape.jcr.AbstractJcrNode.addNode(AbstractJcrNode.java:108)
      at org.modeshape.jcr.ConcurrentNodeLoadTest.addContentToCustomer(ConcurrentNodeLoadTest.java:235)
      at org.modeshape.jcr.ConcurrentNodeLoadTest$CustomerModifier.call(ConcurrentNodeLoadTest.java:206)
      at org.modeshape.jcr.ConcurrentNodeLoadTest$CustomerModifier.call(ConcurrentNodeLoadTest.java:188)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      at java.lang.Thread.run(Thread.java:662)
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rhauch Randall Hauch
                  Reporter:
                  hchiorean Horia Chiorean
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: