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-124715: Fix method_dealloc(): use PyObject_GC_UnTrack()#133199

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
vstinner merged 1 commit intopython:mainfromvstinner:method_dealloc
May 1, 2025

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedApr 30, 2025
edited by bedevere-appbot
Loading

Replace _PyObject_GC_UNTRACK() with PyObject_GC_UnTrack() to not fail if the method was already untracked.

Replace _PyObject_GC_UNTRACK() with PyObject_GC_UnTrack() to not failif the method was already untracked.
@vstinnervstinner changed the titlegh-132280: Fix method_dealloc(): use PyObject_GC_UnTrack()gh-124715: Fix method_dealloc(): use PyObject_GC_UnTrack()Apr 30, 2025
@vstinner
Copy link
MemberAuthor

vstinner commentedApr 30, 2025
edited
Loading

This change fix test_functools on s390x:#132280 (comment)

But I'm not sure why "Move trashcan mechanism into Py_Dealloc" requires this change.

cc@iritkatriel@markshannon@nascheme

@markshannon
Copy link
Member

markshannon commentedApr 30, 2025
edited
Loading

But I'm not sure why "Move trashcan mechanism into Py_Dealloc" requires this change.

I don't see any reason either.
Is it just s390x showing this failure?

@vstinner
Copy link
MemberAuthor

Is it just s390x showing this failure?

s390x buildbot is fast. Other buildbots are still running. Maybe test_functools will fail on other buildbots, I don't know so far.

@vstinner
Copy link
MemberAuthor

Oh, I cannot reproduce the issue on s390x RHEL9 (GCC 11.5.0) nor on s390x Fedora Stable (GCC 14.2.1), only on s390x RHEL8 (GCC 8.5.0).

@vstinner
Copy link
MemberAuthor

vstinner commentedMay 1, 2025
edited
Loading

s390x buildbot is fast. Other buildbots are still running. Maybe test_functools will fail on other buildbots, I don't know so far.

test_functools does also crash on:

@vstinner
Copy link
MemberAuthor

AMD64 Fedora Stable Clang 3.x:https://buildbot.python.org/#/builders/441/builds/7851

I confirm that test_functools does crashrandomly when I build Pythonusing clang on my laptop:

$  ./configure --with-pydebug CC=clang LD=clang$  make$  ./python -m test -v test_functools (...)test_recursive_pickle (test.test_functools.TestPartialPy.test_recursive_pickle) ...Objects/classobject.c:247: _PyObject_GC_UNTRACK: Assertion "_PyObject_GC_IS_TRACKED(((PyObject*)(op)))" failed: object not tracked by the garbage collector

@vstinnervstinner merged commit662dd29 intopython:mainMay 1, 2025
43 checks passed
@vstinnervstinner deleted the method_dealloc branchMay 1, 2025 11:42
@vstinner
Copy link
MemberAuthor

It seems like methods are special and can be untracked bysomething that I failed to identify when they enter the trashcan mechanism. I hope that only methods are treated in a special way and that other objects don't have to be modified for the recent trashcan change.

@markshannon
Copy link
Member

markshannon commentedMay 1, 2025
edited
Loading

Does this fix all the buildbots?
If so, let's merge this but keep the issue open so we don't forget to investigate further.

@vstinner
Copy link
MemberAuthor

See also#133261 : test_frame crash randomly on RHEL8, but this time on x86-64.

@vstinner
Copy link
MemberAuthor

Does this fix all the buildbots?

Yes. Buildbots which are back to green:

  • s390x RHEL8 3.x
  • aarch64 Fedora Stable LTO 3.x
  • aarch64 Fedora Stable Clang 3.x
  • aarch64 Fedora Stable Clang Installed 3.x
  • aarch64 RHEL8 LTO + PGO 3.x
  • AMD64 Fedora Stable Clang 3.x

If so, let's merge this but keep the issue open so we don't forget to investigate further.

#124715 is still open.

vstinner added a commit to vstinner/cpython that referenced this pull requestMay 5, 2025
…k() (python#133199)"This reverts commit662dd29.The root issue was fixed by thecommitf554237.
vstinner added a commit that referenced this pull requestMay 5, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@vstinner@markshannon

[8]ページ先頭

©2009-2025 Movatter.jp