Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-1873

Deadlock issue

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: Jena 3.14.0
    • Fix Version/s: None
    • Component/s: Jena, TDB
    • Labels:
      None

      Description

      It is possible to face a deadlock issue when 3 threads are running in parallel. It is possible to face a deadlock issue when 3 threads are running in parallel.

      One of the threads is creating a new TDB dataset. The other two are deleting existing ones. It's resulting in the 3 thread cycle deadlock.

      Here are the stacktraces of 3 threads that are causing the problem.

      "qtp1726434078-492": 
      at org.apache.jena.tdb.sys.TDBInternal.releaseDSG(TDBInternal.java:194) - waiting to lock <0x000000069a6524a0> (a java.lang.Class for org.apache.jena.tdb.sys.TDBInternal) 
      at org.apache.jena.tdb.StoreConnection.expel(StoreConnection.java:214) - locked <0x000000069a4568c0> (a java.lang.Class for org.apache.jena.tdb.StoreConnection) 
      at org.apache.jena.tdb.StoreConnection.release(StoreConnection.java:202) - locked <0x000000069a4568c0> (a java.lang.Class for org.apache.jena.tdb.StoreConnection) 
      at org.topbraid.tdb.TDBGraphs.removeSingleTDB(TDBGraphs.java:167) at org.topbraid.tdb.TDBGraphs.lambda$5(TDBGraphs.java:152) at org.topbraid.tdb.TDBGraphs$$Lambda$677/0x00000008010e2840.run(Unknown Source) 
      at org.topbraid.tdb.TDBGraphs.destroy(TDBGraphs.java:92)
      "qtp1726434078-151": 
      at org.apache.jena.tdb.StoreConnection.make(StoreConnection.java:240) - waiting to lock <0x000000069a4568c0> (a java.lang.Class for org.apache.jena.tdb.StoreConnection) 
      at org.apache.jena.tdb.StoreConnection.make(StoreConnection.java:258) at org.apache.jena.tdb.transaction.DatasetGraphTransaction.<init>(DatasetGraphTransaction.java:69) 
      at org.apache.jena.tdb.sys.TDBMaker.createDirect(TDBMaker.java:126) at org.apache.jena.tdb.sys.TDBMaker$$Lambda$682/0x0000000801117840.apply(Unknown Source) 
      at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(java.base@11.0.4/ConcurrentHashMap.java:1737) - locked <0x00000006a5cdc880> (a java.util.concurrent.ConcurrentHashMap$Node) 
      at org.apache.jena.tdb.sys.TDBMaker._create(TDBMaker.java:112) at org.apache.jena.tdb.sys.TDBMaker.createDatasetGraphTransaction(TDBMaker.java:43)
      "qtp1726434078-95": 
      at java.util.concurrent.ConcurrentHashMap.replaceNode(java.base@11.0.4/ConcurrentHashMap.java:1122) - waiting to lock <0x00000006a5cdc880> (a java.util.concurrent.ConcurrentHashMap$Node) 
      at java.util.concurrent.ConcurrentHashMap.remove(java.base@11.0.4/ConcurrentHashMap.java:1102) at org.apache.jena.tdb.sys.TDBMaker.uncache(TDBMaker.java:88) 
      at org.apache.jena.tdb.sys.TDBInternal.releaseDSG(TDBInternal.java:194) - locked <0x000000069a6524a0> (a java.lang.Class for org.apache.jena.tdb.sys.TDBInternal) 
      at org.topbraid.tdb.TDBGraphs.removeSingleTDB(TDBGraphs.java:166) at org.topbraid.tdb.TDBGraphs.lambda$5(TDBGraphs.java:152) at org.topbraid.tdb.TDBGraphs$$Lambda$677/0x00000008010e2840.run(Unknown Source) 
      at org.topbraid.tdb.TDBGraphs.destroy(TDBGraphs.java:92)

        Attachments

          Activity

            People

            • Assignee:
              andy Andy Seaborne
              Reporter:
              fabianpol Fabian Polkosnik
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: