-
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
net.sqlcipher.database.SQLiteException: not an error: BEGIN EXCLUSIVE; #602
Comments
Thank you for reaching out and sharing some details of the situation, that is helpful. Can you confirm whether you are using the legacy edition of SQLCipher for Android 1, or the new version of SQLCipher for Android 2? Our initial suggestion would be to set a Footnotes |
Thank you for your reply @developernotes
By the wayAnother question bothers me. When endTransaction may happy COMMIT fail, I don't know if it is necessary to deal with when catch SQLiteException, will sqlite auto rollback when commit fail. crash stack
My Code
In my opinion, this happy nothing to do with lib cipher and sqlite. But about user phone state and system running state. |
Using the following approach is suggested:
The |
Thank you for your reply @developernotes
Which one did you say? |
Are you concerned with the call to |
Hi @developernotes
|
I'm sorry, I misunderstood your follow-up. The disk I/O error on commit is certainly an unexpected behavior. While you might consider the WAL journal mode, because you were unable to commit the transaction due to a disk error, issuing a You may wish to report an error to the user in the event a database transaction cannot complete due to a disk error. |
Thanks for your patient reply! @developernotes |
Hi @developernotes Keep used android-database-sqlcipher(4.5.1) and androidx.room(2.2.0). Set busy_timeout code
Exception Stack Code
Db operation
|
Expected Behavior
Want to known which scenes will occurrenced. So i can do something.
Actual Behavior
My project is an multipule processes application.
Used android-database-sqlcipher(4.5.1) and androidx.room(2.2.0).
Each process open an database on singleInstance.
This crash was occurrenced by stability monkey test, and on firebase also has few this crash.I can't reproduce this crash by normal operation.
Our JournalMode set JournalMode.TRUNCATE forced.
On our code,we retry beginTransaction when accept SQLiteDatabaseException(message is startwith database is locked).
Steps to Reproduce
I query sqlite doc how problem occur.But nothing get.
Also i read sqlite source code, but i can't understander all code. Only i can known is sqlite3_step() return SQLite_OK but not SQLite_Done. I don't known why return SQLite_OK and which scenes occurrence.
SQLCipher version (can be identified by executing
PRAGMA cipher_version;
):4.5.1 community
SQLCipher for Android version:
4.5.1
Crash Stack
MyCode
I can provider all stability log if you need!
The text was updated successfully, but these errors were encountered: