-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
sqlite3.c:60597: pagerOpenWalIfPresent: Assertion `pPager->eState==PAGER_OPEN' failed. #167
Comments
It was this commit re-enabling sqlicipher that made the assertion failure start happening. |
I will look into this. |
I made a quick test. IMHO the problem has nothing to do with SQLCipher. The reason must be something else. The test crashes already on setting the invalid hexkey. Other tests like the backup test still succeed. So, something seems to go wrong on applying a key for the second time. At the moment I don't know yet, why. |
I used cvise to reduce it. The first
|
Thanks. That shows that the SQLCipher configuration is most likely not involved. AFAICT SQLite deals with the assertion situation correctly later on. For example, the release version of the SQLite shell works as expected and doesn't show any misbehaviour. Of course, this is no excuse for an obvious bug, and it will be fixed. It just will take some time. |
After some hours of debugging I think I found the reason for the assertion. Internally the wrong key was correctly detected, but it was not properly communicated to upper level functions. Actually, the error is detected later in SQLite, but in debug mode the assertion is raised first. Commit utelle/apsw-sqlite3mc@ca146dd includes an updated amalgamation. Hopefully all tests will now run as expected. |
If decrypting a page failed due to a wrong passphrase, the error was detected at VFS level, but not communicated properly to higher level SQLite functions. In debug mode that could lead to raising an assertion, although the error was detected and handled by SQLite later on.
Build apsw-sqlite3mc with --debug so assertions are enabled.
The text was updated successfully, but these errors were encountered: