René's URL Explorer Experiment


Title: v3.13.0rc2 Segmentation Fault in gc.get_referents. PyCapsule->traverse_func is NULL · Issue #124538 · python/cpython · GitHub

Open Graph Title: v3.13.0rc2 Segmentation Fault in gc.get_referents. PyCapsule->traverse_func is NULL · Issue #124538 · python/cpython

X Title: v3.13.0rc2 Segmentation Fault in gc.get_referents. PyCapsule->traverse_func is NULL · Issue #124538 · python/cpython

Description: Crash report What happened? Hello! Thank you for all your work on CPython. Hopefully this crash report is helpful. While working on matplotlib/matplotlib#28861, we noticed that our tests were segfaulting, and only on python3.13. Here is ...

Open Graph Description: Crash report What happened? Hello! Thank you for all your work on CPython. Hopefully this crash report is helpful. While working on matplotlib/matplotlib#28861, we noticed that our tests were segfa...

X Description: Crash report What happened? Hello! Thank you for all your work on CPython. Hopefully this crash report is helpful. While working on matplotlib/matplotlib#28861, we noticed that our tests were segfa...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"v3.13.0rc2 Segmentation Fault in gc.get_referents. PyCapsule-\u003etraverse_func is NULL","articleBody":"# Crash report\r\n\r\n### What happened?\r\n\r\nHello! Thank you for all your work on CPython. Hopefully this crash report is helpful.\r\n\r\nWhile working on https://github.com/matplotlib/matplotlib/pull/28861, we noticed that our tests were segfaulting, and only on python3.13. Here is a minimal reproduction of that crash. I've also run it with python3.13-dbg and `-X dev` to hopefully provide more details.\r\n\r\n**Error Message**\r\n```\r\npython: ../Objects/capsule.c:321: capsule_traverse: Assertion `capsule-\u003etraverse_func != NULL' failed.\r\n```\r\n\r\n**Minimal Reproducible Example:**\r\n```console\r\n$ python3.13 -m venv venv_313\r\n$ source venv_313/bin/activate\r\n$ pip install matplotlib==3.9.2\r\n$ python -X dev test.py\r\n```\r\n\r\n**test.py**\r\n```python\r\nimport gc\r\nfrom collections import deque\r\nfrom matplotlib.figure import Figure\r\nfrom matplotlib.lines import Line2D\r\nfrom matplotlib.collections import PathCollection\r\n\r\ndef get_children(parent):\r\n    if parent.__class__.__qualname__ == \"PyCapsule\":\r\n        print(f\"About to call gc.get_referents on {repr(parent)}\")\r\n    children = gc.get_referents(parent) # gc.get_referrers does not segfault, but gc.get_referents does\r\n    if parent.__class__.__qualname__ == \"PyCapsule\":\r\n        print(f\"There are {len(children)} children\")\r\n    return children\r\n\r\ndef breadth_first_search(start):\r\n    to_visit = deque([start])\r\n    explored = set()\r\n    try:\r\n        gc.disable()  # Can repro without this, but it should make behavior more consistent\r\n        while len(to_visit) \u003e 0:\r\n            parent = to_visit.popleft()\r\n            for child in get_children(parent):\r\n                if id(child) in explored:\r\n                    continue\r\n                explored.add(id(child))\r\n                to_visit.append(child)\r\n    finally:\r\n        gc.enable()\r\n\r\ndef find_reference_cycles():\r\n    fig = Figure()\r\n    ax = fig.add_subplot()\r\n    ax.plot([1])\r\n    fig.clear()\r\n    breadth_first_search(fig)\r\n\r\nif __name__ == \"__main__\":\r\n    find_reference_cycles()\r\n```\r\n\r\nwith python3.13 on Ubuntu 22.04.4\r\n```console\r\n$ python -VV\r\nPython 3.13.0rc2 (main, Sep  9 2024, 22:55:42) [GCC 11.4.0]\r\n$ python -X dev test.py\r\nAbout to call gc.get_referents on \u003ccapsule object \"pybind11_function_record_capsule\" at 0x7f79954f34d0\u003e\r\nFatal Python error: Segmentation fault\r\n\r\nCurrent thread 0x00007f79e687f280 (most recent call first):\r\n  File \"/home/justin/tmp/matplotlib_py313_segfault/test.py\", line 10 in get_children\r\n  File \"/home/justin/tmp/matplotlib_py313_segfault/test.py\", line 22 in breadth_first_search\r\n  File \"/home/justin/tmp/matplotlib_py313_segfault/test.py\", line 35 in find_reference_cycles\r\n  File \"/home/justin/tmp/matplotlib_py313_segfault/test.py\", line 38 in \u003cmodule\u003e\r\n\r\nExtension modules: numpy._core._multiarray_umath, numpy.linalg._umath_linalg, PIL._imaging, kiwisolver._cext (total: 4)\r\nSegmentation fault (core dumped)\r\n```\r\n\r\nwith python3.13-dbg on Ubuntu 22.04.4:\r\n```console\r\n$ python -VV\r\nPython 3.13.0rc2 (main, Sep  9 2024, 22:55:42) [GCC 11.4.0]\r\n$ python -X dev test.py\r\nAbout to call gc.get_referents on \u003ccapsule object \"pybind11_function_record_capsule\" at 0x7f0c31adba80\u003e\r\npython: ../Objects/capsule.c:321: capsule_traverse: Assertion `capsule-\u003etraverse_func != NULL' failed.\r\nFatal Python error: Aborted\r\n\r\nCurrent thread 0x00007f0c82d1a280 (most recent call first):\r\n  File \"/home/justin/tmp/matplotlib_py313_segfault/test.py\", line 10 in get_children\r\n  File \"/home/justin/tmp/matplotlib_py313_segfault/test.py\", line 22 in breadth_first_search\r\n  File \"/home/justin/tmp/matplotlib_py313_segfault/test.py\", line 35 in find_reference_cycles\r\n  File \"/home/justin/tmp/matplotlib_py313_segfault/test.py\", line 38 in \u003cmodule\u003e\r\n\r\nExtension modules: numpy._core._multiarray_umath, numpy.linalg._umath_linalg, PIL._imaging, kiwisolver._cext (total: 4)\r\nAborted (core dumped)\r\n```\r\n\r\nIt does not crash with python3.12 on Ubuntu 22.04.4\r\n```console\r\n$ python -VV\r\nPython 3.12.6 (main, Sep 10 2024, 00:05:17) [GCC 11.4.0]\r\n\r\n$ python -X dev test.py\r\nAbout to call gc.get_referents on \u003ccapsule object \"pybind11_function_record_capsule\" at 0x7f85a852a570\u003e\r\nThere are 0 children\r\n[ ... many similar log lines removed ... ]\r\n```\r\n\r\nSide-note:\r\nI tested this on both python3.12 and 3.13, but not the main branch. The Github Issue dropdown doesn't have a 3.13rc2 option for me to check.\r\n\r\n### CPython versions tested on:\r\n\r\n3.12\r\n\r\n### Operating systems tested on:\r\n\r\nLinux\r\n\r\n### Output from running 'python -VV' on the command line:\r\n\r\nPython 3.13.0rc2 (main, Sep  9 2024, 22:55:42) [GCC 11.4.0]\r\n\r\n\u003c!-- gh-linked-prs --\u003e\r\n### Linked PRs\r\n* gh-124559\r\n* gh-124588\n\u003c!-- /gh-linked-prs --\u003e\r\n","author":{"url":"https://github.com/justinjhendrick","@type":"Person","name":"justinjhendrick"},"datePublished":"2024-09-25T19:29:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/124538/cpython/issues/124538"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c4518937-97da-74c6-2d54-1a2f62ebc3a4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8A88:E1D0E:1204541:17B65D0:696B736A
html-safe-nonce03cd2c8fc283dc2ef0f9e122ea57364c0683d08e9e304f2213af7877f3a510f3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QTg4OkUxRDBFOjEyMDQ1NDE6MTdCNjVEMDo2OTZCNzM2QSIsInZpc2l0b3JfaWQiOiIyOTcxOTE5ODMyMTY5ODA0NjUwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacbce70c9ff8c15c1f8c62b0134d630ef6eb4b91b26edbc860dcfd1a7a31281db6
hovercard-subject-tagissue:2548837823
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/124538/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2ae6b80d1538f22dc14945cc733f5ef669d3316361d0649a257bace05150aa75/python/cpython/issues/124538
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2ae6b80d1538f22dc14945cc733f5ef669d3316361d0649a257bace05150aa75/python/cpython/issues/124538
og:image:altCrash report What happened? Hello! Thank you for all your work on CPython. Hopefully this crash report is helpful. While working on matplotlib/matplotlib#28861, we noticed that our tests were segfa...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejustinjhendrick
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/124538#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F124538
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%2F124538
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/124538
Reloadhttps://github.com/python/cpython/issues/124538
Reloadhttps://github.com/python/cpython/issues/124538
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/124538
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/124538
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/124538
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/124538
v3.13.0rc2 Segmentation Fault in gc.get_referents. PyCapsule->traverse_func is NULLhttps://github.com/python/cpython/issues/124538#top
3.13bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
release-blockerhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22release-blocker%22
type-crashA hard crash of the interpreter, possibly with a core dumphttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-crash%22
https://github.com/justinjhendrick
https://github.com/justinjhendrick
justinjhendrickhttps://github.com/justinjhendrick
on Sep 25, 2024https://github.com/python/cpython/issues/124538#issue-2548837823
matplotlib/matplotlib#28861https://github.com/matplotlib/matplotlib/pull/28861
gh-124538: Fix crash when using gc.get_referents on an untracked capsule object #124559https://github.com/python/cpython/pull/124559
[3.13] gh-124538: Fix crash when using gc.get_referents on an untracked capsule object (GH-124559) #124588https://github.com/python/cpython/pull/124588
3.13bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
release-blockerhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22release-blocker%22
type-crashA hard crash of the interpreter, possibly with a core dumphttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-crash%22
Release and Deferred blockers 🚫https://github.com/orgs/python/projects/2
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.