[
https://issues.apache.org/jira/browse/JENA-299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13437011#comment-13437011
]
Simon Helsen commented on JENA-299:
-----------------------------------
as an aside but related: I wonder if the transactional code would benefit from
some additional optional trace logging. E.g. as a client I have no access to a
transaction id. Yesterday, I wanted to actually write some tracing code to
figure out if I accidentally was sharing a transaction over multiple thread,
but I was unable to get the id of a given transaction. But this invariant is
imposed by TDB/Tx, so perhaps the Tx code could trace some of this (checking
would in theory be possible but comes at a performance penalty which should be
avoid IMO)
> LeaveCriticalSection Error
> --------------------------
>
> Key: JENA-299
> URL: https://issues.apache.org/jira/browse/JENA-299
> Project: Apache Jena
> Issue Type: Bug
> Components: TDB
> Affects Versions: TDB 0.9.4
> Environment: windows 64 bit
> Reporter: Simon Helsen
> Priority: Critical
> Attachments: LeaveCriticalSectionTestCase.zip
>
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira