Skip to content

gh-104454: Fix refleak in AttributeError_reduce - #104455

Merged
gpshead merged 2 commits into
python:mainfrom
csm10495:fix_104454
May 13, 2023
Merged

gh-104454: Fix refleak in AttributeError_reduce#104455
gpshead merged 2 commits into
python:mainfrom
csm10495:fix_104454

Conversation

@csm10495

Copy link
Copy Markdown
Contributor

gh-104454: Fix ref leak introduced by gh-103333

@csm10495

Copy link
Copy Markdown
ContributorAuthor

(i'm not sure how to apply skip-news.. but don't think this needs a news entry)

Comment threadObjects/exceptions.c Outdated
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>

@Eclips4Eclips4 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I rebuilt interpreter with this changes, and refleaks are gone.
Thanks for fix!

@AlexWaygoodAlexWaygood added skip news 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section labels May 13, 2023
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @AlexWaygood for commit 6e4e454 🤖

If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label May 13, 2023

@hauntsaninjahauntsaninja left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, thanks for fixing!

@iritkatrieliritkatriel changed the title gh-104454: Fix ref leakgh-104454: Fix ref leak in AttributeError_reduceMay 13, 2023
@iritkatrieliritkatriel changed the title gh-104454: Fix ref leak in AttributeError_reducegh-104454: Fix refleak in AttributeError_reduceMay 13, 2023
@gpshead
gpshead merged commit 7d2deaf into python:mainMay 13, 2023
@gpshead

Copy link
Copy Markdown
Member

Thanks!

@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot AMD64 Arch Linux TraceRefs 3.x has failed when building commit 7d2deaf.

What do you need to do:

  1. Don't panic.
  2. Check the 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/all/#builders/484/builds/3298) and take a look at the build logs.
  4. Check if the failure is related to this commit (7d2deaf) 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/all/#builders/484/builds/3298

Failed tests:

  • test__xxsubinterpreters

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

==

Click to see traceback logs
remote: Enumerating objects: 4, done. remote: Counting objects: 25% (1/4) remote: Counting objects: 50% (2/4) remote: Counting objects: 75% (3/4) remote: Counting objects: 100% (4/4) remote: Counting objects: 100% (4/4), done. remote: Compressing objects: 25% (1/4) remote: Compressing objects: 50% (2/4) remote: Compressing objects: 75% (3/4) remote: Compressing objects: 100% (4/4) remote: Compressing objects: 100% (4/4), done. remote: Total 4 (delta 0), reused 3 (delta 0), pack-reused 0 
From https://github.com/python/cpython
* branch main -> FETCH_HEAD
Note: switching to '7d2deafb73237a2175971a26cfb544974661de4b'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 7d2deafb73 gh-104454: Fix refleak in AttributeError_reduce (#104455)
Switched to and reset branch 'main'
Objects/object.c:2204: _Py_ForgetReference: Assertion failed: invalid object chain
Enable tracemalloc to get the memory block allocation traceback
object address : 0x7f01b75355b0
object refcount : 0
object type : 0x55a1f229bd00
object type name: generator
object repr : <refcnt 0 at 0x7f01b75355b0>
Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailed
Python runtime state: initialized
Thread 0x00007f01b60856c0 (most recent call first):
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test__xxsubinterpreters.py", line 58 in run
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/threading.py", line 989 in run
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/threading.py", line 1052 in _bootstrap_inner
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/threading.py", line 1009 in _bootstrap
Current thread 0x00007f01b7715740 (most recent call first):
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test__xxsubinterpreters.py", line 49 in _wait_for_interp_to_run
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test__xxsubinterpreters.py", line 66 in _running
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/contextlib.py", line 137 in __enter__
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/test__xxsubinterpreters.py", line 701 in test_already_running
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/unittest/case.py", line 589 in _callTestMethod
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/unittest/case.py", line 634 in run
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/unittest/case.py", line 690 in __call__
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/unittest/suite.py", line 122 in run
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/unittest/suite.py", line 84 in __call__
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/unittest/suite.py", line 122 in run
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/unittest/suite.py", line 84 in __call__
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/unittest/suite.py", line 122 in run
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/unittest/suite.py", line 84 in __call__
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/unittest/runner.py", line 240 in run
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/support/__init__.py", line 1106 in _run_suite
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/support/__init__.py", line 1232 in run_unittest
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/libregrtest/runtest.py", line 294 in _test_module
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/libregrtest/runtest.py", line 330 in _runtest_inner2
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/libregrtest/runtest.py", line 373 in _runtest_inner
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/libregrtest/runtest.py", line 248 in _runtest
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/libregrtest/runtest.py", line 278 in runtest
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/libregrtest/main.py", line 365 in rerun_failed_tests
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/libregrtest/main.py", line 783 in _main
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/libregrtest/main.py", line 738 in main
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/libregrtest/main.py", line 802 in main
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/test/__main__.py", line 2 in <module>
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/runpy.py", line 88 in _run_code
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/Lib/runpy.py", line 198 in _run_module_as_main
Extension modules: _testcapi, _xxsubinterpreters (total: 2)
make: *** [Makefile:1962: buildbottest] Aborted (core dumped)
Cannot open file '/buildbot/buildarea/3.x.pablogsal-arch-x86_64/build/test-results.xml' for upload

@AlexWaygood

Copy link
Copy Markdown
Member

Failed tests:

  • test__xxsubinterpreters

This is tracked by #104341, and is unrelated to this PR.

carljm added a commit to carljm/cpython that referenced this pull request May 15, 2023
* main: (29 commits)
pythongh-101819: Fix _io clinic input for unused base class method stubs (python#104418)
pythongh-101819: Isolate `_io` (python#101948)
Bump mypy from 1.2.0 to 1.3.0 in /Tools/clinic (python#104501)
pythongh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (python#104495)
pythongh-104050: Run mypy on `clinic.py` in CI (python#104421)
pythongh-104490: Consistently define phony make targets (python#104491)
pythongh-67056: document that registering/unregistering an atexit func from within an atexit func is undefined (python#104473)
pythongh-104487: PYTHON_FOR_REGEN must be minimum Python 3.10 (python#104488)
pythongh-101282: move BOLT config after PGO (pythongh-104493)
pythongh-104469 Convert _testcapi/float.c to use AC (pythongh-104470)
pythongh-104456: Fix ref leak in _ctypes.COMError (python#104457)
pythongh-98539: Make _SSLTransportProtocol.abort() safe to call when closed (python#104474)
pythongh-104337: Clarify random.gammavariate doc entry (python#104410)
Minor improvements to typing docs (python#104465)
pythongh-87092: avoid gcc warning on uninitialized struct field in assemble.c (python#104460)
pythonGH-71383: IDLE - Document testing subsets of modules (python#104463)
pythongh-104454: Fix refleak in AttributeError_reduce (python#104455)
pythongh-75710: IDLE - add docstrings and comments to editor module (python#104446)
pythongh-91896: Revert some very noisy DeprecationWarnings for `ByteString` (python#104424)
Add a mention of PYTHONBREAKPOINT to breakpoint() docs (python#104430)
...
carljm added a commit to carljm/cpython that referenced this pull request May 15, 2023
* main: (204 commits)
pythongh-101819: Fix _io clinic input for unused base class method stubs (python#104418)
pythongh-101819: Isolate `_io` (python#101948)
Bump mypy from 1.2.0 to 1.3.0 in /Tools/clinic (python#104501)
pythongh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (python#104495)
pythongh-104050: Run mypy on `clinic.py` in CI (python#104421)
pythongh-104490: Consistently define phony make targets (python#104491)
pythongh-67056: document that registering/unregistering an atexit func from within an atexit func is undefined (python#104473)
pythongh-104487: PYTHON_FOR_REGEN must be minimum Python 3.10 (python#104488)
pythongh-101282: move BOLT config after PGO (pythongh-104493)
pythongh-104469 Convert _testcapi/float.c to use AC (pythongh-104470)
pythongh-104456: Fix ref leak in _ctypes.COMError (python#104457)
pythongh-98539: Make _SSLTransportProtocol.abort() safe to call when closed (python#104474)
pythongh-104337: Clarify random.gammavariate doc entry (python#104410)
Minor improvements to typing docs (python#104465)
pythongh-87092: avoid gcc warning on uninitialized struct field in assemble.c (python#104460)
pythonGH-71383: IDLE - Document testing subsets of modules (python#104463)
pythongh-104454: Fix refleak in AttributeError_reduce (python#104455)
pythongh-75710: IDLE - add docstrings and comments to editor module (python#104446)
pythongh-91896: Revert some very noisy DeprecationWarnings for `ByteString` (python#104424)
Add a mention of PYTHONBREAKPOINT to breakpoint() docs (python#104430)
...
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@csm10495@bedevere-bot@gpshead@AlexWaygood@iritkatriel@hauntsaninja@Eclips4