René's URL Explorer Experiment


Title: Various data races in subinterpreter tests under TSAN · Issue #129824 · python/cpython · GitHub

Open Graph Title: Various data races in subinterpreter tests under TSAN · Issue #129824 · python/cpython

X Title: Various data races in subinterpreter tests under TSAN · Issue #129824 · python/cpython

Description: Bug report Thread sanitizer reports a number of data races when running subinterpreter tests InterpreterPoolMixin (test_concurrent_futures) run_eval_code_obj: see #128130 posixmodule_exec modifies globals waitid_result_desc and stat_resu...

Open Graph Description: Bug report Thread sanitizer reports a number of data races when running subinterpreter tests InterpreterPoolMixin (test_concurrent_futures) run_eval_code_obj: see #128130 posixmodule_exec modifies ...

X Description: Bug report Thread sanitizer reports a number of data races when running subinterpreter tests InterpreterPoolMixin (test_concurrent_futures) run_eval_code_obj: see #128130 posixmodule_exec modifies ...

Opengraph URL: https://github.com/python/cpython/issues/129824

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Various data races in subinterpreter tests under TSAN","articleBody":"# Bug report\n\nThread sanitizer reports a number of data races when running subinterpreter tests\n\n### `InterpreterPoolMixin` (`test_concurrent_futures`)\n\n- [ ] `run_eval_code_obj`: see https://github.com/python/cpython/issues/128130\n- [ ] [`posixmodule_exec`](https://github.com/python/cpython/blob/49bd47d5f14993d37b97aa2bbf257f5df16b96a9/Modules/posixmodule.c#L18014) modifies globals `waitid_result_desc` and `stat_result_desc`\n- [x] `_PyBuiltins_AddExceptions`: modifies globals `PyExc_EnvironmentError`, etc. https://github.com/python/cpython/blob/49bd47d5f14993d37b97aa2bbf257f5df16b96a9/Objects/exceptions.c#L4354-L4355\n- [ ] `_PyInterpreterState_FinalizeAllocatedBlocks`: modifies _PyRuntime variable _PyInterpreterState_FinalizeAllocatedBlocks\n- [ ] `_globals_fini` + [`clear_interpreter`](https://github.com/python/cpython/blob/49bd47d5f14993d37b97aa2bbf257f5df16b96a9/Modules/_interpqueuesmodule.c#L1454-L1456): data race on `_globals.module_count` (the read in `clear_interpreter` happens outside of a lock)\n- [ ] `init_static_exctypes`: modifies globals `_PyExc_InterpreterError`, etc.\n- [ ] `_structmodule_exec`: data race reported on [`ptr-\u003eunpack = native-\u003eunpack`](https://github.com/python/cpython/blob/49bd47d5f14993d37b97aa2bbf257f5df16b96a9/Modules/_struct.c#L2815)\n\nI think for now it would make sense to skip the `InterpreterPoolMixin` tests when running with TSAN.\n\n### `test__interpchannels`\n\n- [ ] [`find_name_in_mro`](https://github.com/python/cpython/blob/7b2e01bb555359913939d7ff168363f1760d3f8e/Objects/typeobject.c#L5415) and [`_waiting_release`](https://github.com/python/cpython/blob/7b2e01bb555359913939d7ff168363f1760d3f8e/Modules/_interpchannelsmodule.c#L497): I don't understand this one, but it happens during `test_send_recv_different_interpreters_and_threads`\n\n### `test__interpreters` and `test_interpreters`\n\n- [ ] `type_ready_set_new`: https://github.com/python/cpython/blob/7b2e01bb555359913939d7ff168363f1760d3f8e/Objects/typeobject.c#L8509\n- [ ] `type_ready`: (see https://github.com/python/cpython/issues/129817)\n- [ ] File descriptor race in `test_api.LowLevelTests.test_is_running` and `test_running`: `close()` concurrent with `read()` on the same file descriptor.\n- [ ] `managed_static_type_state_init` in `test.test_interpreters.test_stress.StressTests.test_create_many_threaded`: data race on the non-atomic read of `interp_count`.\n- [x] pegen [`memo_statistics`](https://github.com/python/cpython/blob/5fa7e1b7fd57e8c6297e9eb79d79cede42e5ce0f/Parser/pegen.c#L367) mutex is currently only used in free threading build (seen in test_create_many_threaded) \n- [x] version tags on static types: `NEXT_GLOBAL_VERSION_TAG`, `type-\u003etp_versions_used`, and `tp-\u003etp_version_tag` modifications are not thread-safe (seen in test_create_many_threaded)\n\n### `test_capi.test_misc.assign_version_tag`\n\n- [x]  race on `NEXT_GLOBAL_VERSION_TAG` in `assign_version_tag` (see above)\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-129826\n* gh-129829\n* gh-135794\n* gh-136266\n* gh-143446\n* gh-143530\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/colesbury","@type":"Person","name":"colesbury"},"datePublished":"2025-02-07T18:44:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/129824/cpython/issues/129824"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ee7b0e37-a284-5e3d-7a04-aa2d242e6827
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idED98:D9031:FDA2C:146B94:696B350C
html-safe-nonce4aaf0309754eee6d38a6800ba8d78e8045c33e9458cd042380882392d4997da5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDk4OkQ5MDMxOkZEQTJDOjE0NkI5NDo2OTZCMzUwQyIsInZpc2l0b3JfaWQiOiI1OTk0ODA2NzA4MDMyNzEzOTk2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacc46d5177c6166b0d04709218eb05d2f28e8527a4e70b703bf94a1e58a9e19bc4
hovercard-subject-tagissue:2838846879
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/cpython/129824/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c879869259fa784d5836e1e26cede19206f72b3f6a066a5cfd2e94c4493ef331/python/cpython/issues/129824
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c879869259fa784d5836e1e26cede19206f72b3f6a066a5cfd2e94c4493ef331/python/cpython/issues/129824
og:image:altBug report Thread sanitizer reports a number of data races when running subinterpreter tests InterpreterPoolMixin (test_concurrent_futures) run_eval_code_obj: see #128130 posixmodule_exec modifies ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecolesbury
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
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
release82560a55c6b2054555076f46e683151ee28a19bc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/129824#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F129824
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F129824
Sign up https://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%2Fcpython
Reloadhttps://github.com/python/cpython/issues/129824
Reloadhttps://github.com/python/cpython/issues/129824
Reloadhttps://github.com/python/cpython/issues/129824
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/129824
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/issues/129824
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/129824
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/129824
Various data races in subinterpreter tests under TSANhttps://github.com/python/cpython/issues/129824#top
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
topic-subinterpretershttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-subinterpreters%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/colesbury
https://github.com/colesbury
colesburyhttps://github.com/colesbury
on Feb 7, 2025https://github.com/python/cpython/issues/129824#issue-2838846879
Race on _PyRuntime.signals.unhandled_keyboard_interrupt when calling eval() concurrently in free-threading mode #128130https://github.com/python/cpython/issues/128130
posixmodule_exechttps://github.com/python/cpython/blob/49bd47d5f14993d37b97aa2bbf257f5df16b96a9/Modules/posixmodule.c#L18014
cpython/Objects/exceptions.chttps://github.com/python/cpython/blob/49bd47d5f14993d37b97aa2bbf257f5df16b96a9/Objects/exceptions.c#L4354-L4355
49bd47dhttps://github.com/python/cpython/commit/49bd47d5f14993d37b97aa2bbf257f5df16b96a9
clear_interpreterhttps://github.com/python/cpython/blob/49bd47d5f14993d37b97aa2bbf257f5df16b96a9/Modules/_interpqueuesmodule.c#L1454-L1456
ptr->unpack = native->unpackhttps://github.com/python/cpython/blob/49bd47d5f14993d37b97aa2bbf257f5df16b96a9/Modules/_struct.c#L2815
find_name_in_mrohttps://github.com/python/cpython/blob/7b2e01bb555359913939d7ff168363f1760d3f8e/Objects/typeobject.c#L5415
_waiting_releasehttps://github.com/python/cpython/blob/7b2e01bb555359913939d7ff168363f1760d3f8e/Modules/_interpchannelsmodule.c#L497
cpython/Objects/typeobject.chttps://github.com/python/cpython/blob/7b2e01bb555359913939d7ff168363f1760d3f8e/Objects/typeobject.c#L8509
7b2e01bhttps://github.com/python/cpython/commit/7b2e01bb555359913939d7ff168363f1760d3f8e
Data race on tp_flags with subinterpreters and static types #129817https://github.com/python/cpython/issues/129817
memo_statisticshttps://github.com/python/cpython/blob/5fa7e1b7fd57e8c6297e9eb79d79cede42e5ce0f/Parser/pegen.c#L367
gh-129824: Temporarily skip InterpreterPoolMixin tests under TSAN #129826https://github.com/python/cpython/pull/129826
gh-129824: Fix some data races with types in subinterpreters #129829https://github.com/python/cpython/pull/129829
gh-129824: fix data races in subinterpreters under TSAN #135794https://github.com/python/cpython/pull/135794
[3.14] gh-129824: fix data races in subinterpreters under TSAN (GH-135794) #136266https://github.com/python/cpython/pull/136266
gh-129824: Fix data race in _PyBuiltins_AddExceptions with subinterpreters #143446https://github.com/python/cpython/pull/143446
gh-129824: Fix data race on runtime->gilstate.check_enabled #143530https://github.com/python/cpython/pull/143530
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
topic-subinterpretershttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-subinterpreters%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
Subinterpretershttps://github.com/orgs/python/projects/3
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.