René's URL Explorer Experiment


Title: Deadlock in test_opcache with gh-131174 applied · Issue #133130 · python/cpython · GitHub

Open Graph Title: Deadlock in test_opcache with gh-131174 applied · Issue #133130 · python/cpython

X Title: Deadlock in test_opcache with gh-131174 applied · Issue #133130 · python/cpython

Description: Bug report This is to document the deadlock that occurs with gh-131174 applied. It seems a bit hard to reproduce and I had to repeatedly run the tests. When I got it to finally deadlock, the stack-trace for the three threads are as follo...

Open Graph Description: Bug report This is to document the deadlock that occurs with gh-131174 applied. It seems a bit hard to reproduce and I had to repeatedly run the tests. When I got it to finally deadlock, the stack-...

X Description: Bug report This is to document the deadlock that occurs with gh-131174 applied. It seems a bit hard to reproduce and I had to repeatedly run the tests. When I got it to finally deadlock, the stack-...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Deadlock in test_opcache with gh-131174 applied","articleBody":"# Bug report\n\nThis is to document the deadlock that occurs with gh-131174 applied.  It seems a bit hard to reproduce and I had to repeatedly run the tests.  When I got it to finally deadlock, the stack-trace for the three threads are as follows.  Note that `update_slots_callback()` runs with the world stopped.\n\nThread 1:\n```\n[...]\n#6  0x000055e8fa1ab214 in _PySemaphore_PlatformWait (sema=sema@entry=0x7ffefa17dda0, timeout=timeout@entry=-1)\n    at Python/parking_lot.c:162\n#7  0x000055e8fa1ab55c in _PySemaphore_Wait (sema=sema@entry=0x7ffefa17dda0, timeout=timeout@entry=-1,\n    detach=detach@entry=0) at Python/parking_lot.c:232\n#8  0x000055e8fa1ab6e1 in _PyParkingLot_Park (addr=addr@entry=0x55e8fa5a186c \u003c_PyRuntime+361772\u003e,\n    expected=expected@entry=0x7ffefa17de24, size=size@entry=4, timeout_ns=timeout_ns@entry=-1,\n    park_arg=park_arg@entry=0x0, detach=detach@entry=0) at Python/parking_lot.c:335\n#9  0x000055e8fa1c1c43 in tstate_wait_attach (tstate=tstate@entry=0x55e8fa5a1840 \u003c_PyRuntime+361728\u003e)\n    at Python/pystate.c:2145\n#10 0x000055e8fa1c1df0 in _PyThreadState_Attach (tstate=tstate@entry=0x55e8fa5a1840 \u003c_PyRuntime+361728\u003e)\n    at Python/pystate.c:2180\n#11 0x000055e8fa17048f in PyEval_AcquireThread (tstate=tstate@entry=0x55e8fa5a1840 \u003c_PyRuntime+361728\u003e)\n    at Python/ceval_gil.c:605\n#12 0x000055e8fa1ab56b in _PySemaphore_Wait (sema=sema@entry=0x7ffefa17df00, timeout=timeout@entry=-1,\n    detach=detach@entry=1) at Python/parking_lot.c:234\n#13 0x000055e8fa1ab6e1 in _PyParkingLot_Park (addr=addr@entry=0x55e8fa599160 \u003c_PyRuntime+327200\u003e,\n    expected=expected@entry=0x7ffefa17df97, size=size@entry=1, timeout_ns=timeout_ns@entry=-1,\n    park_arg=park_arg@entry=0x7ffefa17dfa0, detach=detach@entry=1) at Python/parking_lot.c:335\n#14 0x000055e8fa19fb6a in _PyMutex_LockTimed (m=m@entry=0x55e8fa599160 \u003c_PyRuntime+327200\u003e, timeout=timeout@entry=-1,\n    flags=flags@entry=_PY_LOCK_DETACH) at Python/lock.c:108\n#15 0x000055e8fa1a0970 in PyMutex_Lock (m=m@entry=0x55e8fa599160 \u003c_PyRuntime+327200\u003e) at Python/lock.c:611\n#16 0x000055e8fa1435c6 in _PyMutex_Lock (m=m@entry=0x55e8fa599160 \u003c_PyRuntime+327200\u003e) at ./Include/cpython/lock.h:49\n#17 0x000055e8fa14378f in _PyCriticalSection_BeginSlow (c=c@entry=0x7ffefa17e110,\n    m=m@entry=0x55e8fa599160 \u003c_PyRuntime+327200\u003e) at Python/critical_section.c:37\n#18 0x000055e8f9fe8918 in _PyCriticalSection_BeginMutex (c=c@entry=0x7ffefa17e110,\n    m=0x55e8fa599160 \u003c_PyRuntime+327200\u003e) at ./Include/internal/pycore_critical_section.h:119\n#19 0x000055e8fa000264 in _PyType_LookupStackRefAndVersion (type=0x7f06d8afc810,\n    name=name@entry=0x55e8fa558f28 \u003c_PyRuntime+64488\u003e, out=out@entry=0x7f071b60d190) at Objects/typeobject.c:5891\n[...]\n```\n\nThread 2:\n```\n[...]\n#6  0x000055e8fa1ab214 in _PySemaphore_PlatformWait (sema=sema@entry=0x7f06cc4fd500, timeout=timeout@entry=-1)\n    at Python/parking_lot.c:162\n#7  0x000055e8fa1ab55c in _PySemaphore_Wait (sema=sema@entry=0x7f06cc4fd500, timeout=timeout@entry=-1,\n    detach=detach@entry=0) at Python/parking_lot.c:232\n#8  0x000055e8fa1ab6e1 in _PyParkingLot_Park (addr=addr@entry=0x72a40000f03c, expected=expected@entry=0x7f06cc4fd584,\n    size=size@entry=4, timeout_ns=timeout_ns@entry=-1, park_arg=park_arg@entry=0x0, detach=detach@entry=0)\n    at Python/parking_lot.c:335\n#9  0x000055e8fa1c1c43 in tstate_wait_attach (tstate=tstate@entry=0x72a40000f010) at Python/pystate.c:2145\n#10 0x000055e8fa1c1df0 in _PyThreadState_Attach (tstate=tstate@entry=0x72a40000f010) at Python/pystate.c:2180\n#11 0x000055e8fa17048f in PyEval_AcquireThread (tstate=tstate@entry=0x72a40000f010) at Python/ceval_gil.c:605\n#12 0x000055e8fa290c0f in thread_run (boot_raw=boot_raw@entry=0x7214000012d0) at ./Modules/_threadmodule.c:350\n#13 0x000055e8fa1e682d in pythread_wrapper (arg=0x720c00000b80) at Python/thread_pthread.h:242\n#14 0x00007f071c601def in __tsan_thread_start_func (arg=0x7ffefa17dd60)\n    at ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:1012\n#15 0x00007f071c354aa4 in start_thread (arg=\u003coptimized out\u003e) at ./nptl/pthread_create.c:447\n#16 0x00007f071c3e1c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78\n[...]\n```\n\nThread 3\n```\n[...]\n#6  0x000055e8fa1ab214 in _PySemaphore_PlatformWait (sema=sema@entry=0x7f06cbcfb4a0, timeout=timeout@entry=-1)\n    at Python/parking_lot.c:162\n#7  0x000055e8fa1ab55c in _PySemaphore_Wait (sema=sema@entry=0x7f06cbcfb4a0, timeout=timeout@entry=-1,\n    detach=detach@entry=1) at Python/parking_lot.c:232\n#8  0x000055e8fa1ab6e1 in _PyParkingLot_Park (addr=addr@entry=0x55e8fa599160 \u003c_PyRuntime+327200\u003e,\n    expected=expected@entry=0x7f06cbcfb537, size=size@entry=1, timeout_ns=timeout_ns@entry=-1,\n    park_arg=park_arg@entry=0x7f06cbcfb540, detach=detach@entry=1) at Python/parking_lot.c:335\n#9  0x000055e8fa19fb6a in _PyMutex_LockTimed (m=m@entry=0x55e8fa599160 \u003c_PyRuntime+327200\u003e, timeout=timeout@entry=-1,\n    flags=flags@entry=_PY_LOCK_DETACH) at Python/lock.c:108\n#10 0x000055e8fa1a0970 in PyMutex_Lock (m=m@entry=0x55e8fa599160 \u003c_PyRuntime+327200\u003e) at Python/lock.c:611\n#11 0x000055e8fa1435c6 in _PyMutex_Lock (m=m@entry=0x55e8fa599160 \u003c_PyRuntime+327200\u003e) at ./Include/cpython/lock.h:49\n#12 0x000055e8fa143bf5 in _PyCriticalSection_Resume (tstate=tstate@entry=0x72a400019010)\n    at Python/critical_section.c:109\n#13 0x000055e8f9f805e2 in _PyCriticalSection_Pop (c=c@entry=0x7f06cbcfb670)\n    at ./Include/internal/pycore_critical_section.h:141\n#14 0x000055e8f9f80618 in _PyCriticalSection_End (c=c@entry=0x7f06cbcfb670)\n    at ./Include/internal/pycore_critical_section.h:155\n#15 0x000055e8f9f806c7 in ensure_shared_on_read (mp=mp@entry=0x7f06d94e1030) at Objects/dictobject.c:1326\n#16 0x000055e8f9f860a4 in _Py_dict_lookup_threadsafe (mp=mp@entry=0x7f06d94e1030,\n    key=key@entry=0x55e8fa5592b8 \u003c_PyRuntime+65400\u003e, hash=hash@entry=5605474849373301295,\n    value_addr=value_addr@entry=0x7f06cbcfb740) at Objects/dictobject.c:1497\n#17 0x000055e8f9f86e3f in _PyDict_GetItemRef_KnownHash (op=op@entry=0x7f06d94e1030,\n    key=key@entry=0x55e8fa5592b8 \u003c_PyRuntime+65400\u003e, hash=hash@entry=5605474849373301295,\n    result=result@entry=0x7f06cbcfb7a0) at Objects/dictobject.c:2370\n#18 0x000055e8f9ffff81 in find_name_in_mro (type=type@entry=0x7f06d9691410, name=0x55e8fa5592b8 \u003c_PyRuntime+65400\u003e,\n    error=error@entry=0x7f06cbcfb824) at Objects/typeobject.c:5721\n#19 0x000055e8fa007d9b in update_one_slot (type=type@entry=0x7f06d9691410, p=0x55e8fa5259a0 \u003cslotdefs\u003e)\n    at Objects/typeobject.c:11292\n#20 0x000055e8fa007f9b in update_slots_callback (type=type@entry=0x7f06d9691410, data=data@entry=0x7f06cbcfb8c0)\n    at Objects/typeobject.c:11390\n[...]\n```\n\nInside the `_PyCriticalSection_Resume` of the 3rd thread, it's waiting on `m1`:\n```\n#12 0x000055e8fa143bf5 in _PyCriticalSection_Resume (tstate=tstate@entry=0x72a400019010)\n    at Python/critical_section.c:109\n109             PyMutex_Lock(m1);\n(gdb) l\n104             m2 = c2-\u003e_cs_mutex2;\n105             c2-\u003e_cs_mutex2 = NULL;\n106         }\n107\n108         if (m1) {\n109             PyMutex_Lock(m1);\n110         }\n111         if (m2) {\n112             PyMutex_Lock(m2);\n113         }\n(gdb) p *m1\n$9 = {_bits = 3 '\\003'}\n(gdb) p *m2\n$10 = {_bits = 0 '\\000'}\n```","author":{"url":"https://github.com/nascheme","@type":"Person","name":"nascheme"},"datePublished":"2025-04-29T06:35:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/133130/cpython/issues/133130"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:bedb31d6-413f-edd9-ed32-22c07d13572f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAD30:36844C:1ACC21D:2533A2F:6A55EA17
html-safe-nonce8ee70af8d94a9d48d0f838ee7415c8ac99c635df6edf4e1b7b6f76cfcdf1921d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRDMwOjM2ODQ0QzoxQUNDMjFEOjI1MzNBMkY6NkE1NUVBMTciLCJ2aXNpdG9yX2lkIjoiNzMyNDYzMzY2MzU1OTU1OTcwMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac36588afe5006bac90ecb275d5a2e40e1b52c73acf8845753575b6023177883d2
hovercard-subject-tagissue:3027225519
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/133130/issue_layout
twitter:imagehttps://opengraph.githubassets.com/cd5c98ced94c9d30b8bd1ff014aac414b2f26390c489aa8350eb47284ca4bec2/python/cpython/issues/133130
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/cd5c98ced94c9d30b8bd1ff014aac414b2f26390c489aa8350eb47284ca4bec2/python/cpython/issues/133130
og:image:altBug report This is to document the deadlock that occurs with gh-131174 applied. It seems a bit hard to reproduce and I had to repeatedly run the tests. When I got it to finally deadlock, the stack-...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamenascheme
hostnamegithub.com
expected-hostnamegithub.com
Noneb5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e
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
release3725c7f9b2a6e3a27ef57c5aed13428c0f65e045
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/133130#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F133130
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%2F133130
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/133130
Reloadhttps://github.com/python/cpython/issues/133130
Reloadhttps://github.com/python/cpython/issues/133130
Please reload this pagehttps://github.com/python/cpython/issues/133130
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/133130
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
Deadlock in test_opcache with gh-131174 appliedhttps://github.com/python/cpython/issues/133130#top
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
topic-free-threadinghttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-free-threading%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/nascheme
naschemehttps://github.com/nascheme
on Apr 29, 2025https://github.com/python/cpython/issues/133130#issue-3027225519
gh-131174https://github.com/python/cpython/pull/131174
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
topic-free-threadinghttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-free-threading%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.