Title: Incremental GC double-counts work done during the marking phase · Issue #141890 · python/cpython · GitHub
Open Graph Title: Incremental GC double-counts work done during the marking phase · Issue #141890 · python/cpython
X Title: Incremental GC double-counts work done during the marking phase · Issue #141890 · python/cpython
Description: Bug report Both mark_at_start and gc_collect_increment (its caller) decrement work_to_do by the number of objects marked. This can result in incremental collections being delayed longer than expected... I think in extreme situations, col...
Open Graph Description: Bug report Both mark_at_start and gc_collect_increment (its caller) decrement work_to_do by the number of objects marked. This can result in incremental collections being delayed longer than expect...
X Description: Bug report Both mark_at_start and gc_collect_increment (its caller) decrement work_to_do by the number of objects marked. This can result in incremental collections being delayed longer than expect...
Opengraph URL: https://github.com/python/cpython/issues/141890
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incremental GC double-counts work done during the marking phase","articleBody":"# Bug report\n\nBoth `mark_at_start` and `gc_collect_increment` (its caller) decrement `work_to_do` by the number of objects marked. This can result in incremental collections being delayed longer than expected... I *think* in extreme situations, collection could be delayed indefinitely, resulting in leaks.\n\nThe fix is simple, just remove one of the decrements.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-141891\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/brandtbucher","@type":"Person","name":"brandtbucher"},"datePublished":"2025-11-24T03:42:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/141890/cpython/issues/141890"}
| 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:49be605e-f740-3186-8901-7180c9364e56 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C220:64491:167298B:1F040BC:696A9B08 |
| html-safe-nonce | 5a8cb74f98acf1a0095e6a57a303ff70ad558e22a55fbd324f99dee83493793d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjIwOjY0NDkxOjE2NzI5OEI6MUYwNDBCQzo2OTZBOUIwOCIsInZpc2l0b3JfaWQiOiI2Mjg0NzU1ODkxNDQxNTM5ODQ4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7c6389f7f7dd802171c893209be23f12def25bb6bc97269a243e0787d9344def |
| hovercard-subject-tag | issue:3656954740 |
| 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/141890/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8ce57005c359c1048fad6f7a5e24c856888e658965886278c9510b9f0d628255/python/cpython/issues/141890 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8ce57005c359c1048fad6f7a5e24c856888e658965886278c9510b9f0d628255/python/cpython/issues/141890 |
| og:image:alt | Bug report Both mark_at_start and gc_collect_increment (its caller) decrement work_to_do by the number of objects marked. This can result in incremental collections being delayed longer than expect... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | brandtbucher |
| hostname | github.com |
| expected-hostname | github.com |
| None | c0d8175e41e0e55b9e984c935b24b808cabab919dd3174aa45dac3ef503ed1af |
| 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 | 99aab454e5ddc8df30805fb76c114c3008a15842 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width