René's URL Explorer Experiment


Title: Parallel mode: 'No status file found' INTERNAL ERROR when loading a plugin holds the GIL for more than 3 s · Issue #22024 · python/mypy · GitHub

Open Graph Title: Parallel mode: 'No status file found' INTERNAL ERROR when loading a plugin holds the GIL for more than 3 s · Issue #22024 · python/mypy

X Title: Parallel mode: 'No status file found' INTERNAL ERROR when loading a plugin holds the GIL for more than 3 s · Issue #22024 · python/mypy

Description: Crash Report With -n 2, mypy fails with "Failed to establish connection with worker: No status file found" although both workers started and wrote their status files in time. build() starts the workers and their connect() threads before ...

Open Graph Description: Crash Report With -n 2, mypy fails with "Failed to establish connection with worker: No status file found" although both workers started and wrote their status files in time. build() starts the wor...

X Description: Crash Report With -n 2, mypy fails with "Failed to establish connection with worker: No status file found" although both workers started and wrote their status files in time. build() star...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Parallel mode: 'No status file found' INTERNAL ERROR when loading a plugin holds the GIL for more than 3 s","articleBody":"**Crash Report**\n\nWith `-n 2`, mypy fails with \"Failed to establish connection with worker: No status file found\" although both workers started and wrote their status files in time. `build()` starts the workers and their `connect()` threads before `build_inner()` loads plugins. If a plugin import holds the GIL past the 3 s `WORKER_START_TIMEOUT`, the threads cannot poll, and when they next run the loop has timed out and exits without reading the status file again.\n\nWe hit this in PyVista, whose plugin imports VTK, on the first run in a new environment. On macOS the first `dlopen()` of a newly installed binary waits for an XProtect scan while holding the GIL, so that import blocks for 12 to 17 s (0.12 s afterwards). In one failing run the workers wrote their status files 1.2 s after spawn, and the coordinator was still in the plugin import 12 s later.\n\nReading the status file once more after the deadline fixes the `ctypes` reproduction below (tested on master):\n\n```diff\n--- a/mypy/build.py\n+++ b/mypy/build.py\n@@ -289,11 +289,13 @@ class WorkerClient:\n     def connect(self) -> None:\n         end_time = time.time() + WORKER_START_TIMEOUT\n         last_exception: Exception | None = None\n-        while time.time() \u003c end_time:\n+        while True:\n             try:\n                 data = read_status(self.status_file)\n             except BadStatus as exc:\n                 last_exception = exc\n+                if time.time() >= end_time:\n+                    break\n                 time.sleep(WORKER_START_INTERVAL)\n                 continue\n             try:\n```\n\nIt does not reliably fix the VTK case: when the stall outlasts the worker's own 10 s `WORKER_CONNECTION_TIMEOUT`, the worker has stopped waiting and the run fails with `Failed to establish connection with worker: [Errno 2] No such file or directory` instead. Starting the workers after plugins are loaded may avoid both. It would also help to report this as an ordinary error rather than an INTERNAL ERROR. #21969 and #21974 look similar but have different causes.\n\n**Traceback**\n\n```python-traceback\nerror: INTERNAL ERROR -- Please try using mypy master on GitHub:\nhttps://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build\nPlease report a bug at https://github.com/python/mypy/issues\nversion: 2.3.1\nnote: use --pdb to drop into pdb\nFailed to establish connection with worker: No status file found\nFailed to establish connection with worker: No status file found\nTraceback (most recent call last):\n  File \".../venv/lib/python3.14/site-packages/mypy/__main__.py\", line 16, in console_entry\n    main()\n    ~~~~^^\n  File \"mypy/main.py\", line 154, in main\n  File \"mypy/main.py\", line 244, in run_build\n  File \"mypy/build.py\", line 422, in build\n  File \"mypy/build.py\", line 537, in build_inner\n  File \"mypy/build.py\", line 4145, in dispatch\nOSError: Cannot connect to build worker(s): 0, 1\n```\n\n**To Reproduce**\n\nA plugin that holds the GIL for 4 s. This fails on every run, with 2.3.1 and with master; `sleep(2)` passes.\n\n```bash\nmkdir pkg && echo 'x: int = 1' > pkg/__init__.py\ncat > gil_plugin.py \u003c\u003c'EOF'\nimport ctypes\n\nfrom mypy.plugin import Plugin\n\n# Hold the GIL for 4 s, as a slow import of a compiled extension can.\nctypes.PyDLL(None).sleep(4)\n\n\ndef plugin(version: str) -> type[Plugin]:\n    return Plugin\nEOF\nprintf '[mypy]\\nplugins = gil_plugin.py\\n' > mypy.ini\nmypy -n 2 --show-traceback pkg\n```\n\nOn macOS, `import vtkmodules.vtkRenderingCore` in place of the `ctypes` lines, in a new venv with `mypy==2.3.1 vtk==9.7.0`, fails on the first run and passes on the second. Precompiling bytecode (`UV_COMPILE_BYTECODE=1`) makes no difference.\n\n**Your Environment**\n\n- Mypy version used: 2.3.1 (compiled: yes), and master at b645e069c (from git, not compiled)\n- Mypy command-line flags: `-n 2 --show-traceback`\n- Mypy configuration options from `mypy.ini` (and other config files): `plugins = gil_plugin.py`\n- Python version used: 3.14.0 and 3.14.5\n- Operating system and version: macOS 26.6.2, arm64 (the `ctypes` reproduction should not be macOS-specific, but I only ran it there)\n\nInvestigated and drafted with Claude Code (Claude Opus 5.5).","author":{"url":"https://github.com/user27182","@type":"Person","name":"user27182"},"datePublished":"2026-09-22T21:12:27Z","url":"https://github.com/python/mypy/issues/22024"}

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:3ab1b592-b939-e63e-8351-91f7d9b3f1e7
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE76C:120A77:22E11F3:2F80E7F:6B002CFC
html-safe-noncee09222ab6003b329478b771e6c652aa25eb48567ae6734826f1b546ce3312eb9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzZDOjEyMEE3NzoyMkUxMUYzOjJGODBFN0Y6NkIwMDJDRkMiLCJ2aXNpdG9yX2lkIjoiMzE0MDczMTU0MTc4NTY4NTI0NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac1647d39d3990f2ffc3bab2a65e58ca26eeed1e39f392d8cae13ad93f6aef8825
hovercard-subject-tagissue:5545314277
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/22024/issue_layout
twitter:imagehttps://opengraph.githubassets.com/801aebe275b0bfe0ab8c208c4e27104e09b44897c10a8c3f23463ac127551782/python/mypy/issues/22024
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/801aebe275b0bfe0ab8c208c4e27104e09b44897c10a8c3f23463ac127551782/python/mypy/issues/22024
og:image:altCrash Report With -n 2, mypy fails with "Failed to establish connection with worker: No status file found" although both workers started and wrote their status files in time. build() starts the wor...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameuser27182
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/22024#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F22024
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%2F22024
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/22024
Reloadhttps://github.com/python/mypy/issues/22024
Reloadhttps://github.com/python/mypy/issues/22024
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/22024
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/22024
#22029https://github.com/python/mypy/pull/22029
Parallel mode: 'No status file found' INTERNAL ERROR when loading a plugin holds the GIL for more than 3 shttps://github.com/python/mypy/issues/22024#top
#22029https://github.com/python/mypy/pull/22029
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
parallel checkinghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22parallel%20checking%22
https://github.com/user27182
user27182https://github.com/user27182
on Sep 22, 2026https://github.com/python/mypy/issues/22024#issue-5545314277
#21969https://github.com/python/mypy/issues/21969
#21974https://github.com/python/mypy/issues/21974
b645e06https://github.com/python/mypy/commit/b645e069c1e7f907205e6cc0eabea5d2b5beeefc
user27182https://github.com/user27182
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
on Sep 22, 2026https://github.com/python/mypy/issues/22024#event-31632044823
ilevkivskyihttps://github.com/ilevkivskyi
parallel checkinghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22parallel%20checking%22
on Sep 22, 2026https://github.com/python/mypy/issues/22024#event-31638600562
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Sep 23, 2026https://github.com/python/mypy/issues/22024#issuecomment-5795194925
@JukkaLhttps://github.com/JukkaL
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Sep 23, 2026https://github.com/python/mypy/issues/22024#issuecomment-5795707146
ilevkivskyihttps://github.com/ilevkivskyi
on Sep 24, 2026https://github.com/python/mypy/issues/22024#event-31797300456
Increase worker connection timeout on Mac (#22029)https://github.com/python/mypy/commit/7571fb2a39feaf1ba5c5f4eeb3cfaf8659842026
#22029https://github.com/python/mypy/pull/22029
7571fb2https://github.com/python/mypy/commit/7571fb2a39feaf1ba5c5f4eeb3cfaf8659842026
ilevkivskyihttps://github.com/ilevkivskyi
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#22029https://github.com/python/mypy/pull/22029
on Sep 24, 2026https://github.com/python/mypy/issues/22024#event-31797300541
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/22024
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/22024
crashhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22crash%22
parallel checkinghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22parallel%20checking%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.