Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Lock expired in single thread

616991Jan 10 2008 — edited Jan 10 2008
Hi,

Im working on a project here that uses Berkeley Java DB. Amoungst other things, it allows scripts to be invoked, for example to upgrade aspects of the system.

One such script finishes by calling removeDatabase() on an old DB after upgrade to a new DB. This call fails with the following:

Failed to remove database: (JE 3.2.43) Lock expired. Locker -1_InteractiveServerThread_BasicLocker: waited for lock on database=_jeNameMap node=15 type=WRITE grant=WAIT_PROMOTION timeoutMillis=500 startTime=1199810466985 endTime=1199810467489
Owners: [<LockInfo locker="-1_InteractiveServerThread_BasicLocker" type="READ"/>, <LockInfo locker="-1_InteractiveServerThread_BasicLocker" type="READ"/>]
Waiters: []
Transaction -1_InteractiveServerThread_BasicLocker owns 6372170 <LockInfo locker="-1_InteractiveServerThread_BasicLocker" type="READ"/>
Transaction -1_InteractiveServerThread_BasicLocker waits for node 6372170

I have experimented with the code and tracked this down to a Deadlock Exception being thrown near the end of LockManager.lock()

I'm quite new to Berkeley DB, but it does strike me as odd that a single thread (InteractiveServerThread) seems to be blocking itself from acquiring a lock.

Although the above is from 3.2.43, this behavior is exactly the same on 3.2.68.

Although the system is multithreaded, the script making these calls should be a single isolated thread. The DB being removed should not be in use by anything else.

Any suggestions?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 7 2008
Added on Jan 10 2008
2 comments
2,174 views