sqlite3.OperationalError: disk I/O error
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 20.6k
- Fork
- 3.3k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với mypy/metastore.py, đặc biệt là connect_db và create_metastore, nơi traceback đi tới PRAGMA synchronous=OFF. Tái hiện sự cố bằng Alpine VM được cung cấp và cây mã nguồn được mount qua 9p, sau đó kiểm tra cơ sở dữ liệu siêu dữ liệu hoạt động như thế nào trên mount đó. Được xem là hoàn tất khi kiểm tra cho thấy mypy không còn kết thúc với sqlite3.OperationalError nội bộ này trong môi trường được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python, sqlite
- Lĩnh vực
- databases, tooling
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 52/100