sqlcipher / android-database-sqlcipher

Android SQLite API based on SQLCipher
https://www.zetetic.net/sqlcipher/sqlcipher-for-android/
Other
2.73k stars 564 forks source link

java.util.concurrent.TimeoutException: net.sqlcipher.database.SQLiteCursor.finalize() timed out after 10 seconds #633

Open mehdi-salehi opened 9 months ago

mehdi-salehi commented 9 months ago

Expected Behavior

Actual Behavior

sun.misc.Unsafe.park
Unsafe.java, line 299
java.util.concurrent.TimeoutException: net.sqlcipher.database.SQLiteCursor.finalize() timed out after 10 seconds

Steps to Reproduce

Its happen on Android 6.0.1 and lower.

java.lang.Object.wait Object.java
java.lang.Thread.parkFor$ Thread.java:1220
sun.misc.Unsafe.park Unsafe.java:299
java.util.concurrent.locks.LockSupport.park LockSupport.java:158
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt AbstractQueuedSynchronizer.java:810
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued AbstractQueuedSynchronizer.java:843
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire AbstractQueuedSynchronizer.java:1172
java.util.concurrent.locks.ReentrantLock$FairSync.lock ReentrantLock.java:196
java.util.concurrent.locks.ReentrantLock.lock ReentrantLock.java:257
net.sqlcipher.database.SQLiteDatabase.lock SQLiteDatabase.java:570
net.sqlcipher.database.SQLiteProgram.close SQLiteProgram.java:329
net.sqlcipher.database.SQLiteCursor.close SQLiteCursor.java:553
net.sqlcipher.database.SQLiteCursor.finalize SQLiteCursor.java:640
java.lang.Daemons$FinalizerDaemon.doFinalize Daemons.java:217
java.lang.Daemons$FinalizerDaemon.run Daemons.java:200
java.lang.Thread.run Thread.java:818

SQLCipher version (can be identified by executing PRAGMA cipher_version;): 4.5.2 community SQLCipher for Android version: 4.5.2

Are you able to reproduce this issue within the SQLCipher for Android test suite? We can not reproduce it in the test project.

Note: If you are not posting a specific issue for the SQLCipher library, please post your question to the SQLCipher discuss site. Thanks!

developernotes commented 9 months ago

Hi @mehdi-salehi,

Can you share what Java code is executed which produces this behavior? While there may not be an existing test case within the test suite, if you are able to assemble an example which produces the behavior that would be helpful in debugging this situation.