Open gburd opened 14 years ago
Yes, I have seen this problem. It is not specific to IcedTea or Ubuntu, as it occurs on the JDK Apple ships with Mac OS X 10.6.
I suspect that the tests are fundamentally wrong. They rely on a specific ordering of events as two different threads run, a flawed assumption at best. I tried to mitigate the problem by adding fairly long delays between the interleaved events, but it does not seem to work as I expect.
At the moment, I can't think of a good way to test that deadlock detection works properly. Starting up two threads and executing transactions on both of them in a way that guarantees a deadlock seemed workable.
Hello, this is a spectacular combination of Clojure and BDB JE. As the product manager for Oracle Berkeley DB products and a big fan of Clojure I couldn't be happier to see the two combined.
The test.cupboard.core/deadlock test fails due to a lock timeout. I'm trying to sort that out in my fork, but I thought I'd report it to you here in case you have ideas. In my fork I've updated to the later version of BDB JE (.103) but that didn't effect this issue.
Here is the stack:
gburd@monk:~/eng/cupboard$ java -version java version "1.6.0_18" OpenJDK Runtime Environment (IcedTea6 1.8) (6b18-1.8-0ubuntu1) OpenJDK Server VM (build 14.0-b16, mixed mode) gburd@monk:~/eng/cupboard$ uname -a Linux monk 2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 07:54:58 UTC 2010 i686 GNU/Linux gburd@monk:~/eng/cupboard$ lein test
Testing test.cupboard.bdb.je
Ran 12 tests containing 108 assertions. 0 failures, 0 errors.
Testing test.cupboard.bdb.je-marshal
Ran 4 tests containing 32 assertions. 0 failures, 0 errors.
Testing test.cupboard.core Exception in thread "Thread-1" java.lang.RuntimeException: java.lang.RuntimeException: com.sleepycat.je.LockTimeoutException: (JE 4.0.103) Lock expired. Locker 33296132 17_Thread-1_Txn: waited for lock on database=_default LockAddr:9381256 node=47 type=WRITE grant=WAIT_NEW timeoutMillis=500 startTime=1277051991364 endTime=1277051991864 Owners: [ ]
Waiters: []
Transaction 7055953 18_Thread-2_Txn waits for LockAddr:19399826 Owners: Waiters:[ ]
Transaction 33296132 17_Thread-1_Txn owns LockAddr:19399826
Transaction 33296132 17_Thread-1_Txn waits for LockAddr:9381256
Caused by: java.lang.RuntimeException: com.sleepycat.je.LockTimeoutException: (JE 4.0.103) Lock expired. Locker 33296132 17_Thread-1_Txn: waited for lock on database=_default LockAddr:9381256 node=47 type=WRITE grant=WAIT_NEW timeoutMillis=500 startTime=1277051991364 endTime=1277051991864 Owners: [ ]
Waiters: []
Transaction 7055953 18_Thread-2_Txn waits for LockAddr:19399826 Owners: Waiters:[ ]
Transaction 33296132 17_Thread-1_Txn owns LockAddr:19399826
Transaction 33296132 17_Thread-1_Txn waits for LockAddr:9381256
Caused by: com.sleepycat.je.LockTimeoutException: (JE 4.0.103) Lock expired. Locker 33296132 17_Thread-1_Txn: waited for lock on database=_default LockAddr:9381256 node=47 type=WRITE grant=WAIT_NEW timeoutMillis=500 startTime=1277051991364 endTime=1277051991864 Owners: [ ]
Waiters: []
Transaction 7055953 18_Thread-2_Txn waits for LockAddr:19399826 Owners: Waiters:[ ]
Transaction 33296132 17_Thread-1_Txn owns LockAddr:19399826
Transaction 33296132 17_Thread-1_Txn waits for LockAddr:9381256