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

LeaveCriticalSection Error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • TDB 0.9.4
    • TDB 0.9.4
    • TDB
    • None
    • windows 64 bit

    Description

      I have attached a standalone test case, which, when run with the latest snapshot produces the following exception:

      Exception in thread "main" com.hp.hpl.jena.shared.JenaException: leaveCriticalSection: No lock held (main) Thread R/W: 0/0 :: Model R/W: 0/0 (thread: main)
      at com.hp.hpl.jena.shared.LockMRSW.leaveCriticalSection(LockMRSW.java:175)
      at com.hp.hpl.jena.tdb.transaction.TransactionManager$TSM_WriteBackEndTxn.readerFinishes(TransactionManager.java:210)
      at com.hp.hpl.jena.tdb.transaction.TransactionManager.readerFinishes(TransactionManager.java:723)
      at com.hp.hpl.jena.tdb.transaction.TransactionManager.noteTxnAbort(TransactionManager.java:587)
      at com.hp.hpl.jena.tdb.transaction.TransactionManager.notifyAbort(TransactionManager.java:445)
      at com.hp.hpl.jena.tdb.transaction.Transaction.abort(Transaction.java:162)
      at com.hp.hpl.jena.tdb.transaction.DatasetGraphTxn.abort(DatasetGraphTxn.java:45)
      at com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction._abort(DatasetGraphTransaction.java:156)
      at com.hp.hpl.jena.tdb.migrate.DatasetGraphTrackActive.abort(DatasetGraphTrackActive.java:68)
      at com.hp.hpl.jena.sparql.core.DatasetImpl.abort(DatasetImpl.java:149)
      at com.ibm.jena.test.LeaveCriticalSectionErrorTest.storeOperation(LeaveCriticalSectionErrorTest.java:57)
      at com.ibm.jena.test.LeaveCriticalSectionErrorTest.query1(LeaveCriticalSectionErrorTest.java:105)
      at com.ibm.jena.test.LeaveCriticalSectionErrorTest.main(LeaveCriticalSectionErrorTest.java:156)

      The sequence in the test case is to run 2 queries, 1 write and then again 2 queries:

      test.query1();
      test.query1();
      test.write1();
      test.query1();
      test.query1();

      Somehow, the following sequence did not produce the exception:

      test.query1();
      test.query1();
      test.write1();
      test.query1();

      Note that the test case does not check the correctness of any results.

      Attachments

        1. LeaveCriticalSectionTestCase.zip
          2.28 MB
          Simon Helsen

        Activity

          People

            andy Andy Seaborne
            shelsen Simon Helsen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: