sqlite3.OperationalError: disk I/O error
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 20.6k
- Forks
- 3.3k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
Crash Report
$ mypy . --show-traceback
error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 2.3.1
Traceback (most recent call last):
File "/tmp/py/lib/python3.14/site-packages/mypy/__main__.py", line 16, in console_entry
main()
~~~~^^
File "mypy/main.py", line 154, in main
File "mypy/main.py", line 244, in run_build
res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
File "mypy/build.py", line 385, in build
File "mypy/build.py", line 1908, in create_metastore
mds: MetadataStore = SqliteMetadataStore(
File "mypy/metastore.py", line 200, in __init__
File "mypy/metastore.py", line 172, in connect_db
db.execute("PRAGMA synchronous=OFF")
sqlite3.OperationalError: disk I/O error
note: use --pdb to drop into pdb
To Reproduce
Source files are in a network mount:
$ mount | grep src
src on /home/hugo/src type 9p (rw,relatime,access=client,trans=virtio)
Sources are readable, execute fine, can be checked with ruff, etc.
You can quickly run a VM to reproduce this via:
qemu-system-x86_64 \
--enable-kvm \
-nic user \
-nographic \
-m 4G \
-smp cores=2 \
-drive file=alpine-virt-3.24.1-x86_64.iso,format=raw \
-virtfs local,path=$HOME/src/,mount_tag=src,security_model=mapped-xattr
Then install mypy, mount the shared filesystem, and run it on any code in that fs.
Your Environment
- Mypy version used:
mypy 2.3.1 (compiled: yes) - Mypy command-line flags: (none/any)
- Mypy configuration options from
mypy.ini(and other config files): irrelevant; always happens - Python version used: Python 3.14.7
- Operating system and version: Alpine Linux Edge
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit mypy/metastore.py, insbesondere connect_db und create_metastore, wo der Traceback PRAGMA synchronous=OFF erreicht. Reproduziere das Problem mit der bereitgestellten Alpine-VM und dem per 9p eingebundenen Quellbaum und untersuche anschließend, wie sich die Metadaten-Datenbank auf diesem Mount verhält. Als erledigt gilt die Prüfung, dass mypy in der gemeldeten Umgebung nicht mehr mit diesem internen sqlite3.OperationalError beendet wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python, sqlite
- Bereich
- databases, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 52/100