Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-17025

Deadlock during Jena init

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Won't Fix
    • Affects Version/s: 7.2
    • Fix Version/s: 7.4
    • Component/s: Relations

      Description

      Step to reproduce

      • Nuxeo CAP 7.2 + DAM package
        • DAM bring annotations that then uses jena
      • PGSQL DB

      DeadLock at startup

      During server init, we may have 2 threads deadlocking each other in jena init causing the the server to hung indefinitely during startup.

      ApplicationStarted Relation Listener

      "localhost-startStop-1" #12 daemon prio=5 os_prio=0 tid=0x00007fb53d31d800 nid=0x2166 in Object.wait() [0x00007fb576335000]
         java.lang.Thread.State: WAITING (on object monitor)
      	at java.lang.Object.wait(Native Method)
      	at java.lang.Thread.join(Thread.java:1245)
      	- locked <0x00000000fd9bd2c0> (a org.nuxeo.ecm.platform.relations.services.RelationService$1)
      	at java.lang.Thread.join(Thread.java:1319)
      	at org.nuxeo.ecm.platform.relations.services.RelationService.applicationStarted(RelationService.java:529)
      	at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.notifyApplicationStarted(RegistrationInfoImpl.java:323)
      	at org.nuxeo.runtime.osgi.OSGiRuntimeService.notifyComponentsOnStarted(OSGiRuntimeService.java:487)
      	at org.nuxeo.runtime.osgi.OSGiRuntimeService.fireApplicationStarted(OSGiRuntimeService.java:523)
      	at org.nuxeo.runtime.osgi.OSGiRuntimeService.frameworkEvent(OSGiRuntimeService.java:533)
      	at org.nuxeo.osgi.OSGiAdapter.fireFrameworkEvent(OSGiAdapter.java:232)
      	at org.nuxeo.osgi.application.loader.FrameworkLoader.doStart(FrameworkLoader.java:246)
      	at org.nuxeo.osgi.application.loader.FrameworkLoader.start(FrameworkLoader.java:126)
      	- locked <0x00000000c04ac708> (a java.lang.Class for org.nuxeo.osgi.application.loader.FrameworkLoader)
      	at org.nuxeo.runtime.deployment.NuxeoStarter.start(NuxeoStarter.java:114)
      	at org.nuxeo.runtime.deployment.NuxeoStarter.contextInitialized(NuxeoStarter.java:87)
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4994)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5492)
      	- locked <0x00000000c00cb1e8> (a org.apache.catalina.core.StandardContext)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	- locked <0x00000000c00cb1e8> (a org.apache.catalina.core.StandardContext)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
      	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
      	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1861)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      AnnotationListener

      "Nuxeo-Work-default-1" #19 daemon prio=5 os_prio=0 tid=0x00007fb533a77000 nid=0x2185 waiting for monitor entry [0x00007fb574235000]
         java.lang.Thread.State: BLOCKED (on object monitor)
      	at org.nuxeo.ecm.platform.relations.jena.JenaGraph.openGraph(JenaGraph.java:184)
      	- waiting to lock <0x00000000fd61fdf0> (a org.nuxeo.ecm.platform.relations.jena.JenaGraph)
      	at org.nuxeo.ecm.platform.relations.jena.JenaGraph.openGraph(JenaGraph.java:170)
      	at org.nuxeo.ecm.platform.relations.jena.JenaGraph.query(JenaGraph.java:812)
      	at org.nuxeo.ecm.platform.annotations.service.AnnotationQuery.getAnnotationsForURIs(AnnotationQuery.java:64)
      	at org.nuxeo.ecm.platform.annotations.service.AnnotationsServiceImpl.queryAnnotations(AnnotationsServiceImpl.java:166)
      	at org.nuxeo.ecm.platform.annotations.proxy.AnnotationServiceProxy.queryAnnotations(AnnotationServiceProxy.java:170)
      	at org.nuxeo.ecm.platform.annotations.repository.service.DocumentVersionnedGraphManager.removeGraphFor(DocumentVersionnedGraphManager.java:133)
      	at org.nuxeo.ecm.platform.annotations.repository.service.DocumentVersionnedGraphManager.removeGraphFor(DocumentVersionnedGraphManager.java:124)
      	at org.nuxeo.ecm.platform.annotations.repository.service.DocumentVersionnedGraphManager.manage(DocumentVersionnedGraphManager.java:81)
      	at org.nuxeo.ecm.platform.annotations.repository.service.VersionEventListener.handleEvent(VersionEventListener.java:56)
      	at org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$ListenerWork.work(AsyncEventExecutor.java:170)
      	at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:343)
      	at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransactionAndCheckExceptions(AbstractWork.java:304)
      	at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:273)
      	at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:52)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tdelprat Thierry Delprat
                Participants:
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: