Skip to content

net.sqlcipher.database.SQLiteCursor.finalize() timed out after 10 seconds #313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wongk opened this issue Mar 9, 2017 · 5 comments
Closed

Comments

@wongk
Copy link
Contributor

wongk commented Mar 9, 2017

Our cursors are all closed through normal application flow prior to finalize. We have verified this using strict mode.

A pull request has been opened to address this issue: #311.

Fatal Exception: java.util.concurrent.TimeoutException: net.sqlcipher.database.SQLiteCursor.finalize() timed out after 10 seconds
       at java.lang.Object.wait(Object.java)
       at java.lang.Thread.parkFor$(Thread.java:1220)
       at sun.misc.Unsafe.park(Unsafe.java:299)
       at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:810)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:843)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1172)
       at java.util.concurrent.locks.ReentrantLock$FairSync.lock(ReentrantLock.java:196)
       at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:257)
       at net.sqlcipher.database.SQLiteDatabase.lock(SQLiteDatabase.java:505)
       at net.sqlcipher.database.SQLiteProgram.close(SQLiteProgram.java:294)
       at net.sqlcipher.database.SQLiteQuery.close(SQLiteQuery.java:136)
       at net.sqlcipher.database.SQLiteCursor.close(SQLiteCursor.java:510)
       at net.sqlcipher.database.SQLiteCursor.finalize(SQLiteCursor.java:595)
       at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:217)
       at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:200)
       at java.lang.Thread.run(Thread.java:818)
@developernotes
Copy link
Member

Hello @wongk,

Thank you for this report, we have reached out in #311 with additional follow up.

@g123k
Copy link

g123k commented May 3, 2017

With the 3.5.7 version, I have many reports of this crash.
The lines are a bit different, but the consequence is exactly the same.

Fatal Exception: java.util.concurrent.TimeoutException: net.sqlcipher.database.SQLiteCursor.finalize() timed out after 10 seconds
       at java.lang.Object.wait(Object.java)
       at java.lang.Thread.parkFor(Thread.java:1205)
       at sun.misc.Unsafe.park(Unsafe.java:325)
       at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:813)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:846)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1175)
       at java.util.concurrent.locks.ReentrantLock$FairSync.lock(ReentrantLock.java:195)
       at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:256)
       at net.sqlcipher.database.SQLiteDatabase.lock(SQLiteDatabase.java:553)
       at net.sqlcipher.database.SQLiteProgram.close(SQLiteProgram.java:321)
       at net.sqlcipher.database.SQLiteCursor.close(SQLiteCursor.java:519)
       at net.sqlcipher.database.SQLiteCursor.finalize(SQLiteCursor.java:604)
       at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:187)
       at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:170)
       at java.lang.Thread.run(Thread.java:841)

@wongk
Copy link
Contributor Author

wongk commented May 3, 2017

@g123k have you verified that you are closing all cursors when you are done with them? This could happen if you don't close them in a finally block.

@melikeey
Copy link

Still same error? Is there any new update about it? How can I reproduce I do not know.

version 4.5.3..

@developernotes
Copy link
Member

@melikeey the latest release of android-database-sqlcipher was 4.5.4, however, the project has been deprecated in favor sqlcipher-android, the long-term supported replacement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants