Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-133261: Make sure that the GC doesn't untrack objects in trashcan#133431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
markshannon merged 5 commits intopython:mainfromfaster-cpython:fix-133261
May 5, 2025

Conversation

markshannon
Copy link
Member

@markshannonmarkshannon commentedMay 5, 2025
edited by bedevere-appbot
Loading

The trashcan stores pointers in the reference count field. This could make the object appear immortal causing the GC to untrack it.
This PR makes sure that those pointers are stored in such a way as to never appear immortal.

chris-eibl reacted with rocket emoji
Copy link
Member

@vstinnervstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM.

This change can explain a lot of very weird bugs and crashes that I saw last days on buildbots and GitHub CIs.

chris-eibl reacted with rocket emoji
@vstinner
Copy link
Member

Tests / Hypothesis tests on Ubuntu (pull_request)Failing after 7m

test_external_inspection failed:

FAIL: test_async_remote_stack_trace (test.test_external_inspection.TestGetStackTrace.test_async_remote_stack_trace) (task_factory_variant='asyncio.new_event_loop')

I wrote a fix for this one:#133433.

@vstinner
Copy link
Member

Without this change, test_frame crash after a few attempts (between 1 and 3).

With this change, test_frame does no longer crash. I ran./python -u -m test -j2 -F test_frame for 3 minutes:

0:03:46 load avg: 3.06 [211] test_frame passed0:03:47 load avg: 3.06 [212] test_frame passed...

@markshannonmarkshannon merged commitf554237 intopython:mainMay 5, 2025
42 of 43 checks passed
@vstinner
Copy link
Member

With this change,#133199 (gh-124715: Fix method_dealloc(): use PyObject_GC_UnTrack()) can also be reverted: test_functools no longer crash.

efimov-mikhail reacted with thumbs up emoji

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotx86 Debian Non-Debug with X 3.x (no tier) has failed when building commitf554237.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1245/builds/5317) and take a look at the build logs.
  4. Check if the failure is related to this commit (f554237) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1245/builds/5317

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (test.test_exceptions.ExceptionTests.testInvalidTraceback) ... �[32mok�[0mTraceback (most recent call last):  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/test/support/__init__.py"�[0m, line �[35m2876�[0m, in �[35mwrapper�[0mreturn func(*args,**kwargs)  File �[35m"/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/test/test_exceptions.py"�[0m, line �[35m1518�[0m, in �[35mtest_recursion_normalizing_infinite_exception�[0m    �[31mself.assertEqual�[0m�[1;31m(rc,1)�[0m    �[31m~~~~~~~~~~~~~~~~�[0m�[1;31m^^^^^^^�[0m�[1;35mAssertionError�[0m:�[35m-6 != 1�[0mTraceback (test.test_exceptions.ExceptionTests.testWithTraceback) ... �[32mok�[0mTracebackAttr (test.test_exceptions.ExceptionTests.testNoneClearsTracebackAttr) ... �[32mok�[0m

@vstinner
Copy link
Member

Hi! The buildbot x86 Debian Non-Debug with X 3.x (no tier) has failed when building commitf554237.

That's not good, many tests failed withAssertion '!_Py_IsImmortal(op)' failed:

13 tests failed:    test_call test_capi test_ctypes test_descr test_dict    test_dictviews test_exception_group test_exceptions test_frame    test_functools test_isinstance test_json test_list

@markshannon
Copy link
MemberAuthor

That's a 32 bit machine, right?
I'll take a look.

@markshannonmarkshannon deleted the fix-133261 branchMay 6, 2025 08:21
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@vstinnervstinnervstinner approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@markshannon@vstinner@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp