Skip to content
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

SQLite Threadsafety exception #728

Open
yloiseau opened this issue Jan 6, 2023 · 0 comments
Open

SQLite Threadsafety exception #728

yloiseau opened this issue Jan 6, 2023 · 0 comments

Comments

@yloiseau
Copy link

yloiseau commented Jan 6, 2023

General informations

  • system/distribution (with version): Debian 6.0.6-2 (2022-11-01) x86_64 GNU/Linux
  • offlineimap version (offlineimap -V): offlineimap v8.0.0, imaplib2 v3.05, Python v3.11.1, OpenSSL 3.0.7 1 Nov 2022
  • Python version: Python 3.11.1

Logs, error

Establishing connection to ...
ERROR: ERROR in syncfolder for ... folder ...: Traceback (most recent call last):
  File "/usr/share/offlineimap3/offlineimap/accounts.py", line 610, in syncfolder
    statusfolder.openfiles()
  File "/usr/share/offlineimap3/offlineimap/folder/LocalStatusSQLite.py", line 107, in openfiles
    assert sqlite.threadsafety == 1, 'Your sqlite is not multithreading safe.'
           ^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Your sqlite is not multithreading safe.

  Your sqlite is not multithreading safe.

Steps to reproduce the error

try to sync.

According to documentation, since python 3.11, the sqlite3.threadsafety property is defined "dynamically instead of hard-coding it to 1".
On the other hand, the SQLite default for thread safety is SERIALIZED ( see https://www.sqlite.org/threadsafe.html).
The sqlite3.threadsafety is therefore 3 by default (at least in my distribution).
However, the assertion is for a value of 1, whereas the comment state that it should be SERIALIZED (i.e. 3).
Changed the assert to > 0 and the sync works fine, but the fix is probably more subtle.

@yloiseau yloiseau changed the title SQL Threadsafety exception SQLite Threadsafety exception Jan 6, 2023
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

1 participant