Title: Incremental GC does not collect garbage as soon as expected · Issue #142002 · python/cpython · GitHub
Open Graph Title: Incremental GC does not collect garbage as soon as expected · Issue #142002 · python/cpython
X Title: Incremental GC does not collect garbage as soon as expected · Issue #142002 · python/cpython
Description: Bug report Bug description: This was found by @Yhg1s . If you run tests with this command: ./python -m test --randseed=3169227856 --no-randomize --single-process test_pyclbr test_trace test_pdb test_iter test_ordered_dict test_urllib2_lo...
Open Graph Description: Bug report Bug description: This was found by @Yhg1s . If you run tests with this command: ./python -m test --randseed=3169227856 --no-randomize --single-process test_pyclbr test_trace test_pdb tes...
X Description: Bug report Bug description: This was found by @Yhg1s . If you run tests with this command: ./python -m test --randseed=3169227856 --no-randomize --single-process test_pyclbr test_trace test_pdb tes...
Opengraph URL: https://github.com/python/cpython/issues/142002
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incremental GC does not collect garbage as soon as expected","articleBody":"# Bug report\n\n### Bug description:\n\nThis was found by @Yhg1s . If you run tests with this command:\n```\n./python -m test --randseed=3169227856 --no-randomize --single-process test_pyclbr test_trace test_pdb test_iter test_ordered_dict test_urllib2_localnet test_array test_generated_cases test_typing test_fnmatch test_tools test_descr test___all__ test_xml_dom_xmlbuilder test_nturl2path test_hmac test_pickle test_android test_ipaddress test_modulefinder test_interpreters test_zoneinfo test_runpy test_sqlite3 test_bdb test_zipfile test_crossinterp test_pulldom test_pkgutil test_re test_dbm_sqlite3 test_venv test_pyrepl test_xml_etree_c test_gc\n```\n\nThe `test_gc` unit test fails with:\n```test test_gc failed -- Traceback (most recent call last):\n File \"/home/thomas/python/python/main/Lib/contextlib.py\", line 85, in inner\n return func(*args, **kwds)\n File \"/home/thomas/python/python/main/Lib/test/test_gc.py\", line 1573, in test_bug1055820d\n self.fail(\"gc didn't happen after 50000 iterations\")\n ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAssertionError: gc didn't happen after 50000 iterations\n```\n\nReverting GH-140262 seems to fix this. It is possible this is related to GH-141890 as well.\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-142001\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/nascheme","@type":"Person","name":"nascheme"},"datePublished":"2025-11-27T05:05:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/142002/cpython/issues/142002"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:70614c9a-888d-cf43-4005-fe4e36f35912 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D4B8:10252F:6AAA1A:91EEC0:696A7B96 |
| html-safe-nonce | a6a64a113c92345cc26d15f6d1e99b0dcc650695d757d646e0097bb866d66e50 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENEI4OjEwMjUyRjo2QUFBMUE6OTFFRUMwOjY5NkE3Qjk2IiwidmlzaXRvcl9pZCI6IjQ5ODM4MTY2NzEyMTQ1OTkwNjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 825f121da7bc85a99f1f49fec18d6d3c71beacec613ce41185cd3519a413891e |
| hovercard-subject-tag | issue:3669877289 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/142002/issue_layout |
| twitter:image | https://opengraph.githubassets.com/810f879c64c78ca66e1d9fcfe41d36e7c3f863f22609b9d12efc9c8ec4c11cd5/python/cpython/issues/142002 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/810f879c64c78ca66e1d9fcfe41d36e7c3f863f22609b9d12efc9c8ec4c11cd5/python/cpython/issues/142002 |
| og:image:alt | Bug report Bug description: This was found by @Yhg1s . If you run tests with this command: ./python -m test --randseed=3169227856 --no-randomize --single-process test_pyclbr test_trace test_pdb tes... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nascheme |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5b774e44f85c14a75886edd04ddda4e5a25ddebbb241bcbb590b08a3048730e8 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cc5f4eee261b3601c1e98e217ceaf28508b9567e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width