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 — Fix memory leaks in test_capi by carljm · Pull Request #98017 · python/cpython

Conversation

@carljm

@carljm carljm commented Oct 7, 2022

Copy link
Copy Markdown
Member

These memory leaks were recently introduced in #31787. Not sure if this fix qualifies as "trivial" or requires an issue also.

Before this fix, ./python -m test test_capi -R 3:3 reports a memory leak; after this fix it passes.

Sorry, something went wrong.

Uh oh!

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

All reactions
@carljm
Fix memory leaks in test_capi
364a6da
@bedevere-bot bedevere-bot added the awaiting review label Oct 7, 2022
@carljm carljm added the skip news label Oct 7, 2022
@carljm
carljm requested a review from markshannon October 7, 2022 06:17
@kumaraditya303

kumaraditya303 commented Oct 7, 2022

Copy link
Copy Markdown
Contributor
@kumaraditya303 ➜ /workspaces/cpython (fixleak) $ ./python -m test test_capi -R 3:3
0:00:00 load avg: 0.98 Run tests sequentially
0:00:00 load avg: 0.98 [1/1] test_capi
beginning 6 repetitions
123456
......
test_capi passed in 38.6 sec

== Tests result: SUCCESS ==

1 test OK.

Total duration: 38.6 sec
Tests result: SUCCESS
All reactions

Sorry, something went wrong.

Uh oh!

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

@kumaraditya303 kumaraditya303 added the skip issue label Oct 7, 2022
kumaraditya303
kumaraditya303 approved these changes Oct 7, 2022
View reviewed changes
@bedevere-bot bedevere-bot added awaiting core review and removed awaiting review labels Oct 7, 2022
@kumaraditya303
kumaraditya303 requested a review from vstinner October 7, 2022 10:11
@kumaraditya303

kumaraditya303 commented Oct 7, 2022

Copy link
Copy Markdown
Contributor

@vstinner: This PR fixes ref leak on main. Currently all refleak buildbots are failing. See https://buildbot.python.org/all/#/release_status

All reactions

Sorry, something went wrong.

Uh oh!

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

@iritkatriel iritkatriel mentioned this pull request Oct 7, 2022
gh-91052: Add C API for watching dictionaries #31787
Merged
@JelleZijlstra
JelleZijlstra merged commit be4099e into python:main Oct 7, 2022
@bedevere-bot bedevere-bot removed the awaiting core review label Oct 7, 2022
@vstinner

vstinner commented Oct 7, 2022

Copy link
Copy Markdown
Member

You may want to use test.support.catch_unraisable_exception context manager, but it only stores the latest unraisable exception.

carljm 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

carljm commented Oct 7, 2022

Copy link
Copy Markdown
Member Author

Thanks @vstinner, included the switch to catch_unraisable_exception in #98055

All reactions

Sorry, something went wrong.

Uh oh!

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

@carljm
carljm deleted the fixleak branch October 7, 2022 19:35
@vstinner

vstinner commented Oct 8, 2022

Copy link
Copy Markdown
Member

Thanks @vstinner, included the switch to catch_unraisable_exception in #98055

Thanks! I like the new test code.

All reactions

Sorry, something went wrong.

Uh oh!

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

mpage pushed a commit to mpage/cpython that referenced this pull request Oct 11, 2022
@carljm @mpage
Fix memory leaks in test_capi (python#98017)
43583f7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kumaraditya303 kumaraditya303 kumaraditya303 approved these changes
@markshannon markshannon Awaiting requested review from markshannon
@vstinner vstinner Awaiting requested review from vstinner

Uh oh!

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

Assignees

No one assigned

Labels

skip issue 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.

5 participants

@carljm @kumaraditya303 @vstinner @JelleZijlstra @bedevere-bot
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 01402503 — 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.