History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: SES-674
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Arjohn Kampman
Reporter: Brian J. Peterson
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Sesame

Unreleased locks when startTransaction() call fails; potential deadlock

Created: 26/Jun/09 04:23 PM   Updated: 19/Oct/09 12:16 PM
Component/s: RDBMS Sail, Memory Sail, Native Sail
Affects Version/s: 2.2.4
Fix Version/s: 2.3.0

Environment: Windows XP SP2


 Description   
SailConnectionBase.autoStartTransaction calls startTransactionInternal at line 275. If NativeStoreConnection.startTransactionInternal throws an Error from the call to the triple store to start a transaction (NativeStoreConnection: 329), the thread has a transaction lock from the ExclusiveLockManager, but the SailConnectionBase doesn't get to line 276 to set txnActive=true. This means a rollback will not recognize that it has an active transaction and call rollbackInternal at line 314, which means the thread never releases the ExclusiveLockManager.ExclusiveLock. Any attempt to start a transaction will block at ExclusiveLockManager.getExclusiveLock, line 86, waiting for someone to set lockInUse to false. This never happens because no rollback will clear it's lock.

 All   Comments   Change History      Sort Order:
Comment by Arjohn Kampman [30/Jun/09 03:15 PM]
The NativeStore (and MemoryStore too) should release the lock if they fail to start the transaction properly.

Comment by Arjohn Kampman [19/Oct/09 12:16 PM]
Lock that are acquired in startTransactionInternal are now released in case an exception is thrown. This has been fixed in the NativeStore, MemoryStore and RdbmsStore.