-
Notifications
You must be signed in to change notification settings - Fork 565
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
java.util.concurrent.TimeoutException: net.sqlcipher.database.SQLiteCompiledSql.finalize() timed out after 10 seconds #537
Comments
Thanks for sharing this. By chance have you tried to integrate this scenario within the SQLCipher for Android test suite? It might streamline both verification and testing of any changes made to address the issue. Thanks! |
Hi @developernotes will try doing that. Should I open PR with the test? |
Excellent, that would be great. Thanks! |
Now I know how to reproduce this using Room. Requirements: Steps:
Seems that this query doesn't work with Cursor. Hence,
Make X times calls of this function(X >= 2). Right after execution in another thread/method run transaction that runs > 10 sec and do memory intensive job. What happens:
I'll try to add this to your test suite, not sure if I need this whole test or just emulating available for GC |
That is a great find! Having this within the test suite would be excellent, please let us know if you run into any troubles. |
@developernotes I've created PR sqlcipher/sqlcipher-android-tests#38 |
We will look into the reported issue, thank you! |
I see this crash issue happening, when inserting 15000 rows CSV files data. It worked fine with inserting 500 rows in a CSV file. Thanks |
@developernotes
This crash I also see in Android 10 devices |
@developernotes Is there any updates on this issue ? Because of this issue now our app user facing usability issues. |
Hello, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug", "enhancement", or "security" and I will leave it open. Thank you for your contributions. |
Hi @developernotes |
Hello @oleksandr-semenov Unfortunately, I have still been unable to reproduce this in any emulator on my host machine. Since you are able to reproduce it, would you try a modification to your test scenario to see if the same or different behavior is observed? In your test scenario where you are able to reproduce the issue, after constructing the |
Ok I will try doing that and will let you know. |
@developernotes I've updated my test PR. Please take a look. |
Hello, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug", "enhancement", or "security" and I will leave it open. Thank you for your contributions. |
hi, the issue is not fixed, it still requires the attention. |
Hello, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug", "enhancement", or "security" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to reopen with up-to-date information. |
This issue seems to be closed due to inactivity but issue still persist for us. @developernotes can you please provide update here? |
Hi @lalchand92, A change was pushed to |
@developernotes I am still seeing this issue in 4.5.2 version. Looks like still issue exist. |
Hello @parasgupta93, Would you open a new ticket with specific details about what your application is doing which causes the error? Additionally, please review the questions in the template as that will help diagnose the issue. |
Expected Behavior
App doesn't crash
Actual Behavior
App crashes due to SQLiteCipher on Android API 24-25
Steps to Reproduce
App uses Room + SQLCipher.
WAL is enabled.
The only synthetic case how I can emulate crash is accessing
SQLiteCompiledSql
(Use API 24-25 Android emulator):SQLiteCompiledSql
object, setnStatement
so thatfinalize
can runreleaseSqlStatement
, block A, unblock BAndroid test Kotlin code(if required I can convert to Java):
SQLCipher version (can be identified by executing
PRAGMA cipher_version;
):4.4.2 community
SQLCipher for Android version:
4.4.2
Room version:
2.3.0-beta01
My guess would be how Android handles GC and especially
finalize()
on version API 24-25.Since there is DB lock() call that blocks/await thread this causes watchdog to throw exception.
I've checked generated Room code and I don't see where the cursor can be not closed.
Not sure when the compiled statement is not cached to emulate the scenario.
However, it happens in normal code execution with extensive concurrent work and multiple transactions.
Can
releaseSqlStatement
be removed fromfinalize
or handled in a different way?The text was updated successfully, but these errors were encountered: