René's URL Explorer Experiment


Title: TSAN alarm in `dictobject.c` while using `setattr` · Issue #144774 · python/cpython · GitHub

Open Graph Title: TSAN alarm in `dictobject.c` while using `setattr` · Issue #144774 · python/cpython

X Title: TSAN alarm in `dictobject.c` while using `setattr` · Issue #144774 · python/cpython

Description: Bug report Bug description: While working around with my previous issue, I found another TSAN alarm. from threading import Thread import random import copy E = Exception() def test1(): for _ in range(100): setattr(E, 'x', random.randint(...

Open Graph Description: Bug report Bug description: While working around with my previous issue, I found another TSAN alarm. from threading import Thread import random import copy E = Exception() def test1(): for _ in ran...

X Description: Bug report Bug description: While working around with my previous issue, I found another TSAN alarm. from threading import Thread import random import copy E = Exception() def test1(): for _ in ran...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TSAN alarm in `dictobject.c` while using `setattr`","articleBody":"# Bug report\n\n### Bug description:\nWhile working around with my previous issue, I found another TSAN alarm.\n\n```python\nfrom threading import Thread\nimport random\nimport copy\n\nE = Exception()\n\ndef test1():\n    for _ in range(100):\n        setattr(E, 'x', random.randint(0,1000))\n        copy.copy(E)\n\ndef main():\n    threads = []\n    for _ in range(4):\n        threads.append(Thread(target=test1))\n\n    for t in threads:\n        t.start()\n\n    for t in threads:\n        t.join()\n\nif __name__ == \"__main__\":\n    main()\n```\n\nTSAN report:\n```\nWARNING: ThreadSanitizer: data race (pid=455134)\n  Read of size 8 at 0x7fffb60c01b0 by thread T1:\n    #0 _PyDict_Next /cpython/Objects/dictobject.c:3020:40 (python3.15t+0x291d09) \n    #1 PyDict_Next /cpython/Objects/dictobject.c:3074:12 (python3.15t+0x291d09)\n    #2 BaseException___setstate___impl /cpython/Objects/exceptions.c:245:16 (python3.15t+0x232246) \n    #3 BaseException___setstate__ /cpython/Objects/clinic/exceptions.c.h:48:20 (python3.15t+0x232246)\n    #4 method_vectorcall_O /cpython/Objects/descrobject.c:476:24 (python3.15t+0x2262d5) \n    #5 _PyObject_VectorcallTstate /cpython/./Include/internal/pycore_call.h:136:11 (python3.15t+0x20c593) \n    #6 PyObject_Vectorcall /cpython/Objects/call.c:327:12 (python3.15t+0x20c593)\n    #7 _Py_VectorCallInstrumentation_StackRefSteal /cpython/Python/ceval.c:762:11 (python3.15t+0x422cbc) \n    #8 _PyEval_EvalFrameDefault /cpython/Python/generated_cases.c.h:1817:35 (python3.15t+0x428ce6) \n    #9 _PyEval_EvalFrame /cpython/./Include/internal/pycore_ceval.h:118:16 (python3.15t+0x422090) \n    #10 _PyEval_Vector /cpython/Python/ceval.c:2125:12 (python3.15t+0x422090)\n    #11 _PyFunction_Vectorcall /cpython/Objects/call.c (python3.15t+0x20cc0f) \n    #12 _PyObject_VectorcallTstate /cpython/./Include/internal/pycore_call.h:136:11 (python3.15t+0x2112e6) \n    #13 method_vectorcall /cpython/Objects/classobject.c:74:20 (python3.15t+0x2112e6)\n    #14 _PyObject_VectorcallTstate /cpython/./Include/internal/pycore_call.h:136:11 (python3.15t+0x476281) \n    #15 context_run /cpython/Python/context.c:727:29 (python3.15t+0x476281)\n    #16 method_vectorcall_FASTCALL_KEYWORDS /cpython/Objects/descrobject.c:421:24 (python3.15t+0x226017) \n    #17 _PyObject_VectorcallTstate /cpython/./Include/internal/pycore_call.h:136:11 (python3.15t+0x20c593) \n    #18 PyObject_Vectorcall /cpython/Objects/call.c:327:12 (python3.15t+0x20c593)\n    #19 _Py_VectorCallInstrumentation_StackRefSteal /cpython/Python/ceval.c:762:11 (python3.15t+0x422cbc) \n    #20 _PyEval_EvalFrameDefault /cpython/Python/generated_cases.c.h:1817:35 (python3.15t+0x428ce6) \n    #21 _PyEval_EvalFrame /cpython/./Include/internal/pycore_ceval.h:118:16 (python3.15t+0x422090) \n    #22 _PyEval_Vector /cpython/Python/ceval.c:2125:12 (python3.15t+0x422090)\n    #23 _PyFunction_Vectorcall /cpython/Objects/call.c (python3.15t+0x20cc0f) \n    #24 _PyObject_VectorcallTstate /cpython/./Include/internal/pycore_call.h:136:11 (python3.15t+0x2112e6) \n    #25 method_vectorcall /cpython/Objects/classobject.c:74:20 (python3.15t+0x2112e6)\n    #26 _PyVectorcall_Call /cpython/Objects/call.c:273:16 (python3.15t+0x20c89b) \n    #27 _PyObject_Call /cpython/Objects/call.c:348:16 (python3.15t+0x20c89b)\n    #28 PyObject_Call /cpython/Objects/call.c:373:12 (python3.15t+0x20c905) \n    #29 thread_run /cpython/./Modules/_threadmodule.c:387:21 (python3.15t+0x5f5512) \n    #30 pythread_wrapper /cpython/Python/thread_pthread.h:234:5 (python3.15t+0x526127) \n\n  Previous atomic write of size 8 at 0x7fffb60c01b0 by thread T2:\n    #0 _Py_atomic_store_ptr_release /cpython/./Include/cpython/pyatomic_gcc.h:565:3 (python3.15t+0x29435b) \n    #1 insertdict /cpython/Objects/dictobject.c (python3.15t+0x29435b)\n    #2 setitem_take2_lock_held /cpython/Objects/dictobject.c:2684:12 (python3.15t+0x2936a7) \n    #3 setitem_lock_held /cpython/Objects/dictobject.c:2721:12 (python3.15t+0x29ff83) \n    #4 _PyDict_SetItem_LockHeld /cpython/Objects/dictobject.c:6850:16 (python3.15t+0x29ff83)\n    #5 _PyObjectDict_SetItem /cpython/Objects/dictobject.c:7549:11 (python3.15t+0x2a3d97) \n    #6 _PyObject_GenericSetAttrWithDict /cpython/Objects/object.c:2055:19 (python3.15t+0x2cbf44) \n    #7 PyObject_GenericSetAttr /cpython/Objects/object.c:2083:12 (python3.15t+0x2cc697) \n    #8 PyObject_SetAttr /cpython/Objects/object.c:1528:15 (python3.15t+0x2c8f4f) \n    #9 builtin_setattr_impl /cpython/Python/bltinmodule.c:1744:9 (python3.15t+0x41d2e7) \n    #10 builtin_setattr /cpython/Python/clinic/bltinmodule.c.h:692:20 (python3.15t+0x41d2e7)\n    #11 cfunction_vectorcall_FASTCALL /cpython/Objects/methodobject.c:449:24 (python3.15t+0x2bbb1e) \n    #12 _PyObject_VectorcallTstate /cpython/./Include/internal/pycore_call.h:136:11 (python3.15t+0x20c593) \n    #13 PyObject_Vectorcall /cpython/Objects/call.c:327:12 (python3.15t+0x20c593)\n    #14 _Py_VectorCallInstrumentation_StackRefSteal /cpython/Python/ceval.c:762:11 (python3.15t+0x422cbc) \n    #15 _PyEval_EvalFrameDefault /cpython/Python/generated_cases.c.h:1817:35 (python3.15t+0x428ce6) \n    #16 _PyEval_EvalFrame /cpython/./Include/internal/pycore_ceval.h:118:16 (python3.15t+0x422090) \n    #17 _PyEval_Vector /cpython/Python/ceval.c:2125:12 (python3.15t+0x422090)\n    #18 _PyFunction_Vectorcall /cpython/Objects/call.c (python3.15t+0x20cc0f) \n    #19 _PyObject_VectorcallTstate /cpython/./Include/internal/pycore_call.h:136:11 (python3.15t+0x2112e6) \n    #20 method_vectorcall /cpython/Objects/classobject.c:74:20 (python3.15t+0x2112e6)\n    #21 _PyObject_VectorcallTstate /cpython/./Include/internal/pycore_call.h:136:11 (python3.15t+0x476281) \n    #22 context_run /cpython/Python/context.c:727:29 (python3.15t+0x476281)\n    #23 method_vectorcall_FASTCALL_KEYWORDS /cpython/Objects/descrobject.c:421:24 (python3.15t+0x226017) \n    #24 _PyObject_VectorcallTstate /cpython/./Include/internal/pycore_call.h:136:11 (python3.15t+0x20c593) \n    #25 PyObject_Vectorcall /cpython/Objects/call.c:327:12 (python3.15t+0x20c593)\n    #26 _Py_VectorCallInstrumentation_StackRefSteal /cpython/Python/ceval.c:762:11 (python3.15t+0x422cbc) \n    #27 _PyEval_EvalFrameDefault /cpython/Python/generated_cases.c.h:1817:35 (python3.15t+0x428ce6) \n    #28 _PyEval_EvalFrame /cpython/./Include/internal/pycore_ceval.h:118:16 (python3.15t+0x422090) \n    #29 _PyEval_Vector /cpython/Python/ceval.c:2125:12 (python3.15t+0x422090)\n    #30 _PyFunction_Vectorcall /cpython/Objects/call.c (python3.15t+0x20cc0f) \n    #31 _PyObject_VectorcallTstate /cpython/./Include/internal/pycore_call.h:136:11 (python3.15t+0x2112e6) \n    #32 method_vectorcall /cpython/Objects/classobject.c:74:20 (python3.15t+0x2112e6)\n    #33 _PyVectorcall_Call /cpython/Objects/call.c:273:16 (python3.15t+0x20c89b) \n    #34 _PyObject_Call /cpython/Objects/call.c:348:16 (python3.15t+0x20c89b)\n    #35 PyObject_Call /cpython/Objects/call.c:373:12 (python3.15t+0x20c905) \n    #36 thread_run /cpython/./Modules/_threadmodule.c:387:21 (python3.15t+0x5f5512) \n    #37 pythread_wrapper /cpython/Python/thread_pthread.h:234:5 (python3.15t+0x526127) \n\nSUMMARY: ThreadSanitizer: data race /cpython/Objects/dictobject.c:3020:40 in _PyDict_Next\n```\nVersion: Python 3.15.0a5+ free-threading build (heads/main:d5f96c86653, Feb 11 2026, 04:50:14) [Clang 18.1.3 (1ubuntu1)]\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-144828\n* gh-150578\n* gh-153746\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/Naserume","@type":"Person","name":"Naserume"},"datePublished":"2026-02-13T02:57:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/144774/cpython/issues/144774"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d847d803-1869-8b95-6d0f-d4a8c683ecbd
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9076:13123D:8F488:C1BA2:6A57F325
html-safe-nonce9e89436a58ed9fa79bccf90cde1f7948735d4802f15f7566041bf560f24d3437
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDc2OjEzMTIzRDo4RjQ4ODpDMUJBMjo2QTU3RjMyNSIsInZpc2l0b3JfaWQiOiIzOTY1NDcwNzY0MTgzMzE5MzMzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacdc53bd0ca67f562d376cad1c2dbed69a7ff0df2b06330a38b510be0df4e02f1c
hovercard-subject-tagissue:3935071535
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/144774/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c83e2c7c36747f7609ec519765bec24d0ff5cb8a8b5b4c0d518917e84d9020d5/python/cpython/issues/144774
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c83e2c7c36747f7609ec519765bec24d0ff5cb8a8b5b4c0d518917e84d9020d5/python/cpython/issues/144774
og:image:altBug report Bug description: While working around with my previous issue, I found another TSAN alarm. from threading import Thread import random import copy E = Exception() def test1(): for _ in ran...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameNaserume
hostnamegithub.com
expected-hostnamegithub.com
None49c8c15fabcbf356d607a90ca115c13b273e42ff8b74155de050fd229a9b0121
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
release3fb1f684e7a833eb1b2d01d39875a2b52cb4fe9b
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/144774#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F144774
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
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
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
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/enterprise/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%2F144774
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/144774
Reloadhttps://github.com/python/cpython/issues/144774
Reloadhttps://github.com/python/cpython/issues/144774
Please reload this pagehttps://github.com/python/cpython/issues/144774
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/144774
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.8k 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.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
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 and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
TSAN alarm in dictobject.c while using setattrhttps://github.com/python/cpython/issues/144774#top
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/Naserume
Naserumehttps://github.com/Naserume
on Feb 13, 2026https://github.com/python/cpython/issues/144774#issue-3935071535
gh-144774: Fix data race in BaseException.__setstate__ in free-thread… #144828https://github.com/python/cpython/pull/144828
gh-144774: Add critical section in BaseException.__setstate__ #150578https://github.com/python/cpython/pull/150578
[3.15] gh-144774: Add critical section in BaseException.__setstate__ (GH-150578) #153746https://github.com/python/cpython/pull/153746
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%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.