Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_exceptions are leaked #104454

Closed
Eclips4 opened this issue May 13, 2023 · 4 comments
Closed

test_exceptions are leaked #104454

Eclips4 opened this issue May 13, 2023 · 4 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@Eclips4
Copy link
Member

Eclips4 commented May 13, 2023

Tried on last commit

PS C:\Users\KIRILL-1\CLionProjects\cpython> ./python -m test -R 3:3 test_exceptions
Running Debug|x64 interpreter...
0:00:00 Run tests sequentially
0:00:00 [1/1] test_exceptions
beginning 6 repetitions
123456
......
test_exceptions leaked [18, 18, 18] references, sum=54
test_exceptions leaked [12, 12, 12] memory blocks, sum=36
test_exceptions failed (reference leak) in 38.1 sec

== Tests result: FAILURE ==

1 test failed:
    test_exceptions

Total duration: 38.2 sec
Tests result: FAILURE

OS: Windows 10

Linked PRs

@Eclips4 Eclips4 added the type-bug An unexpected behavior, bug, or error label May 13, 2023
@iritkatriel
Copy link
Member

More specifically:

% ./python.exe -m test -R3:3 test_exceptions -m testAttributes 
Raised RLIMIT_NOFILE: 256 -> 1024
0:00:00 load avg: 3.46 Run tests sequentially
0:00:00 load avg: 3.46 [1/1] test_exceptions
beginning 6 repetitions
123456
......
test_exceptions leaked [18, 18, 18] references, sum=54
test_exceptions leaked [12, 12, 12] memory blocks, sum=36
test_exceptions failed (reference leak)

== Tests result: FAILURE ==

1 test failed:
    test_exceptions

Total duration: 256 ms
Tests result: FAILURE

@csm10495
Copy link
Contributor

PR opened to fix. Thanks folks. For my benefit: Why doesn't this test run on PRs?

@AlexWaygood
Copy link
Member

PR opened to fix. Thanks folks. For my benefit: Why doesn't this test run on PRs?

Running the refleak tests generally takes a while, and isn't necessary for most PRs to CPython. We have a label we can add to PRs to trigger the test being run; in this case, looks like we just forgot to add that label to this PR. It's not a big issue; happens quite often around here :-)

gpshead pushed a commit that referenced this issue May 13, 2023
* Fix the reference leak introduced by #103333

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
@gpshead
Copy link
Member

gpshead commented May 13, 2023

thanks for the fix. I missed this leak in review (easy for anyone to miss - our C API is full of sharp edges) and didn't think to trigger the refleaks buildbots on the original PR. it happens, no worries.

@gpshead gpshead closed this as completed May 13, 2023
carljm added a commit to carljm/cpython that referenced this issue 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 issue 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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

5 participants