GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-104454: Fix refleak in AttributeError_reduce by csm10495 · Pull Request #104455 · python/cpython

Conversation

@csm10495

@csm10495 csm10495 commented May 13, 2023

Copy link
Copy Markdown
Contributor

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@csm10495
Fix ref leak
efb0c36
@csm10495
csm10495 requested a review from iritkatriel as a code owner May 13, 2023 18:17
@bedevere-bot bedevere-bot added the awaiting review label May 13, 2023
@bedevere-bot bedevere-bot mentioned this pull request May 13, 2023
test_exceptions are leaked #104454
Closed
@csm10495

csm10495 commented May 13, 2023

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Eclips4
Eclips4 reviewed May 13, 2023
View reviewed changes
Comment thread Objects/exceptions.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@csm10495 @Eclips4
Update Objects/exceptions.c
6e4e454
Co-authored-by: Kirill Podoprigora <[email protected]>
Eclips4
Eclips4 approved these changes May 13, 2023
View reviewed changes

@Eclips4 Eclips4 left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

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!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

csm10495 reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@bedevere-bot bedevere-bot added awaiting core review and removed awaiting review labels May 13, 2023
@AlexWaygood AlexWaygood added skip news 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section labels May 13, 2023
@bedevere-bot

bedevere-bot commented May 13, 2023

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label May 13, 2023
hauntsaninja
hauntsaninja approved these changes May 13, 2023
View reviewed changes

@hauntsaninja hauntsaninja left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

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!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels May 13, 2023
iritkatriel
iritkatriel approved these changes May 13, 2023
View reviewed changes
@iritkatriel iritkatriel changed the title gh-104454: Fix ref leak gh-104454: Fix ref leak in AttributeError_reduce May 13, 2023
@iritkatriel iritkatriel changed the title gh-104454: Fix ref leak in AttributeError_reduce gh-104454: Fix refleak in AttributeError_reduce May 13, 2023
@gpshead
gpshead merged commit 7d2deaf into python:main May 13, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label May 13, 2023
@gpshead

gpshead commented May 13, 2023

Copy link
Copy Markdown
Member

Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented May 13, 2023

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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AlexWaygood

AlexWaygood commented May 13, 2023

Copy link
Copy Markdown
Member

Failed tests:

  • test__xxsubinterpreters

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

Eclips4 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

carljm added a commit to carljm/cpython that referenced this pull request May 15, 2023
@carljm
Merge branch 'main' into supermon
343867a
* 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
@carljm
Merge branch 'main' into cached_property_docs
452d9f5
* 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 free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@iritkatriel iritkatriel iritkatriel approved these changes
@hauntsaninja hauntsaninja hauntsaninja approved these changes
@Eclips4 Eclips4 Eclips4 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@csm10495 @bedevere-bot @gpshead @AlexWaygood @iritkatriel @hauntsaninja @Eclips4
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.