phoney deadlocks after restore from backup

This forum is to report technical problems with Rel.
Post Reply
HughDarwen
Posts: 124
Joined: Sat May 24, 2008 4:49 pm

phoney deadlocks after restore from backup

Post by HughDarwen »

Using Rel Version 0.3.8, I successfully (?) restored my database from the backup taken using Rel Version 0.3.5 Alpha, using the supplied script, DatabaseToScript.d. However, when I subsequently tried the simplest possible query against one of my relvars, I got a deadlock exception (see below). The problem went away when I closed DBrowser and started it up again. The same problem arose yesterday with Rel Version 0.3.7.

Hugh

<from DBrowser output pane>
BirdTrack
ERROR: RelDatabase: openRelvar failed: com.sleepycat.je.DeadlockException: (JE 3.3.62) Lock expired. Locker 7291868 152_SwingWorker-pool-2-thread-3_Txn: waited for lock on database=_Relvars LockAddr:29694734 node=134 type=READ grant=WAIT_NEW timeoutMillis=500 startTime=1216128431465 endTime=1216128431980
Owners: [<LockInfo locker="23322144 149_SwingWorker-pool-2-thread-2_Txn" type="RANGE_WRITE"/>] Waiters: [] Line 1, column 1 near 'BirdTrack' ca.mb.armchair.rel3.exceptions.ExceptionFatal: RelDatabase: openRelvar failed: com.sleepycat.je.DeadlockException: (JE 3.3.62) Lock expired. Locker 7291868 152_SwingWorker-pool-2-thread-3_Txn: waited for lock on database=_Relvars LockAddr:29694734 node=134 type=READ grant=WAIT_NEW timeoutMillis=500 startTime=1216128431465 endTime=1216128431980 Owners: [<LockInfo locker="23322144 149_SwingWorker-pool-2-thread-2_Txn" type="RANGE_WRITE"/>] Waiters: [] Line 1, column 1 near 'BirdTrack' at ca.mb.armchair.rel3.interpreter.Interpreter.evaluate(Interpreter.java:101) at ca.mb.armchair.rel3.interpreter.Interpreter.evaluate(Interpreter.java:197) at ca.mb.armchair.rel3.interpreter.Interpreter.evaluate(Interpreter.java:201) at ca.mb.armchair.rel3.client.stream.ClientLocalConnection.sendEvaluate(ClientLocalConnection.java:36) at ca.mb.armchair.rel3.client.string.ClientLocal.sendEvaluate(ClientLocal.java:52) at ca.mb.armchair.rel3.dbrowser.ui.PanelCommandline$32.doInBackground(PanelCommandline.java:1050) at javax.swing.SwingWorker$1.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at javax.swing.SwingWorker.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
Dave
Site Admin
Posts: 372
Joined: Sun Nov 27, 2005 7:19 pm

Re: phoney deadlocks after restore from backup

Post by Dave »

Unfortunately, I've not yet been able to consistently duplicate this bug. During testing prior to the release of 0.3.7, I encountered it exactly once, but it never occurred again.

The error message indicates a lock is being retained on an internal persistent data structure (implemented via the Berkeley DB Java Edition) used to maintain relvar metadata. It's accessed in only five places within one source file, and only one of those places should be setting a lock. It should be removing the lock almost immediately after setting it. It should only fail to remove the lock if an internal error occurs while the lock is being held, and such an error should be displayed. Since such an error is not being displayed, it *might*, therefore, possibly be a bug (maybe a thread race condition, given it's intermittent for me at least) in the Berkeley DB Java Edition itself.

I'll keep trying to duplicate it.
Post Reply