René's URL Explorer Experiment


Title: Mypy 1.20 crashes on concurrent runs · Issue #21136 · python/mypy · GitHub

Open Graph Title: Mypy 1.20 crashes on concurrent runs · Issue #21136 · python/mypy

X Title: Mypy 1.20 crashes on concurrent runs · Issue #21136 · python/mypy

Description: Crash Report Mypy 1.20 crashes on concurrent usage because parallel process fight on accessing a sqlite database, at a first glance. Traceback version: 1.20.0 Traceback (most recent call last): File "/opt/hostedtoolcache/Python/3.11.15/x...

Open Graph Description: Crash Report Mypy 1.20 crashes on concurrent usage because parallel process fight on accessing a sqlite database, at a first glance. Traceback version: 1.20.0 Traceback (most recent call last): Fil...

X Description: Crash Report Mypy 1.20 crashes on concurrent usage because parallel process fight on accessing a sqlite database, at a first glance. Traceback version: 1.20.0 Traceback (most recent call last): Fil...

Opengraph URL: https://github.com/python/mypy/issues/21136

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Mypy 1.20 crashes on concurrent runs","articleBody":"**Crash Report**\n\nMypy 1.20 crashes on concurrent usage because parallel process fight on accessing a sqlite database, at a first glance.\n\n**Traceback**\n\n```python-traceback\nversion: 1.20.0\nTraceback (most recent call last):\n  File \"/opt/hostedtoolcache/Python/3.11.15/x64/lib/python3.11/site-packages/mypy/__main__.py\", line 15, in console_entry\n    main()\n  File \"mypy/main.py\", line 141, in main\n  File \"mypy/main.py\", line 225, in run_build\n  File \"mypy/build.py\", line 388, in build\n  File \"mypy/build.py\", line 485, in build_inner\n  File \"mypy/build.py\", line 3664, in dispatch\n  File \"mypy/build.py\", line 3938, in load_graph\n  File \"mypy/build.py\", line 2431, in new_state\n  File \"mypy/build.py\", line 1717, in find_cache_meta\n  File \"mypy/build.py\", line 1527, in _load_ff_file\n  File \"mypy/metastore.py\", line 200, in read\n  File \"mypy/metastore.py\", line 187, in _query\nOperationalError: database is locked\n```\n\n**To Reproduce**\n\nA bit difficult to reproduce: it [fails regularly on github](https://github.com/dvarrazzo/psycopg/actions/workflows/lint.yml).\n\nThe cause of the failure is pre-commit running 4 concurrent runs of mypy each with about 60 input files. Adding a wrapper script in [this run](https://github.com/dvarrazzo/psycopg/actions/runs/23847506664) you can see the timings of the run and the list of files passed. Trying the same on my local machine doesn't reproduce because pre-commit decides to pass 20 files per run and the issue is not triggered. I don't see an easy way to configure the batch size used by pre-commit, but it wouldn't be a reliable test anyway.\n\nLooking at the timing of the concurrent processes in the failed run above:\n\n```\npid: 3032 t0: 1775044872.4642754 started\npid: 3030 t0: 1775044872.4644167 started\npid: 3033 t0: 1775044872.4644256 started\npid: 3034 t0: 1775044872.4649644 started\npid: 3034 tf: 1775044879.1738014 success\npid: 3030 tf: 1775044882.4480267 success\npid: 3032 tf: 1775044884.7451327 failed \npid: 3033 tf: 1775044885.9920673 success\n```\n\n**Your Environment**\n\n- Mypy version used: 1.20\n- Mypy command-line flags: `mypy --pretty --follow-imports=silent --show-traceback file1 file2 ...` for long lists of files and with concurrent runs.\n- Mypy configuration options from `mypy.ini` (and other config files): [here](https://github.com/psycopg/psycopg/blob/eb87f0eb58ee05b7202b7d8835b925b084d32b5c/pyproject.toml)\n- Python version used: 3.11.15\n- Operating system and version: Ubuntu 24.04\n","author":{"url":"https://github.com/dvarrazzo","@type":"Person","name":"dvarrazzo"},"datePublished":"2026-04-01T13:45:52Z","url":"https://github.com/python/mypy/issues/21136"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:a6427956-4b7c-a7e0-095d-4f90a0c51a6f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE6C2:1A1C04:22CF6AB:2F84875:6B002C77
html-safe-noncedae4911f38f0ebf050b08baf5a47db4b443d85e33f3ee0eea41d6770630d976d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNkMyOjFBMUMwNDoyMkNGNkFCOjJGODQ4NzU6NkIwMDJDNzciLCJ2aXNpdG9yX2lkIjoiNjA1NDgxNzg4NTE5OTU0MzQxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac440bacb22b544223e5a88d85b740de2524e9cced7458a1d17696c8090d0af901
hovercard-subject-tagissue:4187077586
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/mypy/21136/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e7239de945f153b96df99636df7dace743d301496b5028a83f45af64606b439b/python/mypy/issues/21136
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e7239de945f153b96df99636df7dace743d301496b5028a83f45af64606b439b/python/mypy/issues/21136
og:image:altCrash Report Mypy 1.20 crashes on concurrent usage because parallel process fight on accessing a sqlite database, at a first glance. Traceback version: 1.20.0 Traceback (most recent call last): Fil...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedvarrazzo
hostnamegithub.com
expected-hostnamegithub.com
None7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0
turbo-cache-controlno-preview
go-importgithub.com/python/mypy git https://github.com/python/mypy.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id7053637
octolytics-dimension-repository_nwopython/mypy
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id7053637
octolytics-dimension-repository_network_root_nwopython/mypy
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef3f3a43ca095cdea3abbb394112e971f9fdb94fa
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/mypy/issues/21136#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F21136
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F21136
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fmypy
Reloadhttps://github.com/python/mypy/issues/21136
Reloadhttps://github.com/python/mypy/issues/21136
Reloadhttps://github.com/python/mypy/issues/21136
pythonhttps://github.com/python
mypyhttps://github.com/python/mypy
Codehttps://github.com/python/mypy
Issues2.7k (2.7k)https://github.com/python/mypy/issues
Pull requests547 (547)https://github.com/python/mypy/pulls
Actionshttps://github.com/python/mypy/actions
Projectshttps://github.com/python/mypy/projects
Wikihttps://github.com/python/mypy/wiki
Security and qualityhttps://github.com/python/mypy/security
Insightshttps://github.com/python/mypy/insights
https://github.com/python/mypy
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/21136
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/21136
#21154https://github.com/python/mypy/pull/21154
Mypy 1.20 crashes on concurrent runshttps://github.com/python/mypy/issues/21136#top
#21154https://github.com/python/mypy/pull/21154
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
topic-incrementalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-incremental%22
https://github.com/dvarrazzo
dvarrazzohttps://github.com/dvarrazzo
on Apr 1, 2026https://github.com/python/mypy/issues/21136#issue-4187077586
fails regularly on githubhttps://github.com/dvarrazzo/psycopg/actions/workflows/lint.yml
this runhttps://github.com/dvarrazzo/psycopg/actions/runs/23847506664
herehttps://github.com/psycopg/psycopg/blob/eb87f0eb58ee05b7202b7d8835b925b084d32b5c/pyproject.toml
dvarrazzohttps://github.com/dvarrazzo
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
on Apr 1, 2026https://github.com/python/mypy/issues/21136#event-24112909654
ilevkivskyihttps://github.com/ilevkivskyi
topic-incrementalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-incremental%22
on Apr 1, 2026https://github.com/python/mypy/issues/21136#event-24113154213
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Apr 1, 2026https://github.com/python/mypy/issues/21136#issuecomment-4170319426
@dvarrazzohttps://github.com/dvarrazzo
@asottilehttps://github.com/asottile
dvarrazzohttps://github.com/dvarrazzo
on Apr 1, 2026https://github.com/python/mypy/issues/21136#event-24113492254
ci: avoid mypy concurrency issuehttps://github.com/dvarrazzo/psycopg/commit/c4602bae7492f1d8512c3b76be9670312e46a461
c4602bahttps://github.com/dvarrazzo/psycopg/commit/c4602bae7492f1d8512c3b76be9670312e46a461
ci: don't use buggy mypy sqlite cachehttps://github.com/dvarrazzo/psycopg/commit/bb76b6ad3698653eb9236c2cf8a0e9ccaabe546c
bb76b6ahttps://github.com/dvarrazzo/psycopg/commit/bb76b6ad3698653eb9236c2cf8a0e9ccaabe546c
https://github.com/dvarrazzo
dvarrazzohttps://github.com/dvarrazzo
on Apr 1, 2026https://github.com/python/mypy/issues/21136#issuecomment-4170413432
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Apr 1, 2026https://github.com/python/mypy/issues/21136#issuecomment-4170429500
https://github.com/dvarrazzo
dvarrazzohttps://github.com/dvarrazzo
on Apr 1, 2026https://github.com/python/mypy/issues/21136#issuecomment-4170493119
the previous runs in our projecthttps://github.com/psycopg/psycopg/actions/workflows/lint.yml?query=branch%3Amaster
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Apr 1, 2026https://github.com/python/mypy/issues/21136#issuecomment-4170531203
https://github.com/brianschubert
brianschuberthttps://github.com/brianschubert
on Apr 1, 2026https://github.com/python/mypy/issues/21136#issuecomment-4170555903
@dvarrazzohttps://github.com/dvarrazzo
https://github.com/pre-commit/mirrors-mypy/blob/8e5c80792e2ec0c87804d8ef915bf35e2caea6da/.pre-commit-hooks.yaml#L8https://github.com/pre-commit/mirrors-mypy/blob/8e5c80792e2ec0c87804d8ef915bf35e2caea6da/.pre-commit-hooks.yaml#L8
https://github.com/dvarrazzo
dvarrazzohttps://github.com/dvarrazzo
on Apr 1, 2026https://github.com/python/mypy/issues/21136#issuecomment-4170575242
@brandtbucherhttps://github.com/brandtbucher
different issueshttps://github.com/dvarrazzo/psycopg/actions/runs/23854172625/job/69542792936#step:5:19
#17362https://github.com/python/mypy/issues/17362
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Apr 1, 2026https://github.com/python/mypy/issues/21136#issuecomment-4170597688
@brianschuberthttps://github.com/brianschubert
https://github.com/dvarrazzo
dvarrazzohttps://github.com/dvarrazzo
on Apr 1, 2026https://github.com/python/mypy/issues/21136#issuecomment-4170670307
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Apr 1, 2026https://github.com/python/mypy/issues/21136#issuecomment-4170680626
#13916https://github.com/python/mypy/issues/13916
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Apr 1, 2026https://github.com/python/mypy/issues/21136#issuecomment-4170697156
@dvarrazzohttps://github.com/dvarrazzo
ilevkivskyihttps://github.com/ilevkivskyi
not plannedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Apr 1, 2026https://github.com/python/mypy/issues/21136#event-24115527510
https://github.com/dvarrazzo
dvarrazzohttps://github.com/dvarrazzo
on Apr 1, 2026https://github.com/python/mypy/issues/21136#issuecomment-4170745977
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Apr 1, 2026https://github.com/python/mypy/issues/21136#issuecomment-4170757001
#13916https://github.com/python/mypy/issues/13916
dvarrazzohttps://github.com/dvarrazzo
on Apr 1, 2026https://github.com/python/mypy/issues/21136#event-24117832482
chore: avoid using SQLite cache in Mypy runshttps://github.com/dvarrazzo/psycopg/commit/eaeb5edeb1f08c6930d5598237136fbe167e0317
eaeb5edhttps://github.com/dvarrazzo/psycopg/commit/eaeb5edeb1f08c6930d5598237136fbe167e0317
https://github.com/asottile
asottilehttps://github.com/asottile
on Apr 2, 2026https://github.com/python/mypy/issues/21136#issuecomment-4178593731
@dvarrazzohttps://github.com/dvarrazzo
@asottilehttps://github.com/asottile
https://github.com/karlicoss
karlicosshttps://github.com/karlicoss
on Apr 6, 2026https://github.com/python/mypy/issues/21136#issuecomment-4193228554
karlicosshttps://github.com/karlicoss
on Apr 6, 2026https://github.com/python/mypy/issues/21136#event-24228381204
tox: disable parallel run for now since it causes mypy issueshttps://github.com/karlicoss/promnesia/commit/7a051880f4e53833a0e2c994309d505efe147823
7a05188https://github.com/karlicoss/promnesia/commit/7a051880f4e53833a0e2c994309d505efe147823
tox: disable parallel run for now since it causes mypy issueshttps://github.com/karlicoss/promnesia/commit/9295ff07f48137a3c018e820e07c3d66e6502591
9295ff0https://github.com/karlicoss/promnesia/commit/9295ff07f48137a3c018e820e07c3d66e6502591
ilevkivskyihttps://github.com/ilevkivskyi
on Apr 13, 2026https://github.com/python/mypy/issues/21136#event-24428510970
Use WAL with SQLite cache, fix close (#21154)https://github.com/python/mypy/commit/5666c91dc1f3458ac61fd5aaad20eaa03f7eeb92
#21154https://github.com/python/mypy/pull/21154
https://docs.github.com/articles/closing-issues-via-commit-messages
5666c91https://github.com/python/mypy/commit/5666c91dc1f3458ac61fd5aaad20eaa03f7eeb92
ilevkivskyihttps://github.com/ilevkivskyi
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#21154https://github.com/python/mypy/pull/21154
on Apr 13, 2026https://github.com/python/mypy/issues/21136#event-24428511015
JukkaLhttps://github.com/JukkaL
on Apr 21, 2026https://github.com/python/mypy/issues/21136#event-24722284279
Use WAL with SQLite cache, fix close (#21154)https://github.com/python/mypy/commit/79a3ec6d01b56a27c00e9b3320c2b1d4d73a77f9
#21154https://github.com/python/mypy/pull/21154
https://docs.github.com/articles/closing-issues-via-commit-messages
79a3ec6https://github.com/python/mypy/commit/79a3ec6d01b56a27c00e9b3320c2b1d4d73a77f9
HennerMhttps://github.com/HennerM
on Apr 27, 2026https://github.com/python/mypy/issues/21136#event-24909282699
ci: fix mypy pre-commit hook (#191)https://github.com/Emmi-AI/noether/commit/5f0ddf7e696d12e0effe29565d3edf79fcf81d80
#191https://github.com/Emmi-AI/noether/pull/191
5f0ddf7https://github.com/Emmi-AI/noether/commit/5f0ddf7e696d12e0effe29565d3edf79fcf81d80
MauritsBleekerhttps://github.com/MauritsBleeker
on May 1, 2026https://github.com/python/mypy/issues/21136#event-25069809916
ci: fix mypy pre-commit hook (#191)https://github.com/Emmi-AI/noether/commit/695062a81d499a08367d444f239379ebd3667555
#191https://github.com/Emmi-AI/noether/pull/191
695062ahttps://github.com/Emmi-AI/noether/commit/695062a81d499a08367d444f239379ebd3667555
fredericks1982https://github.com/fredericks1982
on May 6, 2026https://github.com/python/mypy/issues/21136#event-25209717660
Run mypy serially in pre-commit to avoid SQLite cache crashes (#77)https://github.com/camedomotic-unofficial/came-domotic/commit/4f6d286c62b148fadef0fa8e313b1e11e446c43b
#77https://github.com/camedomotic-unofficial/came-domotic/pull/77
4f6d286https://github.com/camedomotic-unofficial/came-domotic/commit/4f6d286c62b148fadef0fa8e313b1e11e446c43b
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/21136
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/21136
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
topic-incrementalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-incremental%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.