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

Appearance settings

[3.8] bpo-37788: Fix reference leak when Thread is never joined (GH-26103)#28239

Closed
viktorvorobev wants to merge 1 commit into
python:3.8python/cpython:3.8from
viktorvorobev:backport-c10c2ec-3.8Copy head branch name to clipboard
Closed

[3.8] bpo-37788: Fix reference leak when Thread is never joined (GH-26103)#28239
viktorvorobev wants to merge 1 commit into
python:3.8python/cpython:3.8from
viktorvorobev:backport-c10c2ec-3.8Copy head branch name to clipboard

Conversation

@viktorvorobev

@viktorvorobev viktorvorobev commented Sep 8, 2021

Copy link
Copy Markdown

This is a backport for #26103, automatic backport failed due to conflicts, hopefully I've done everything correctly.

Original PR description:

When a Thread is not joined after it has stopped, its lock may remain in the _shutdown_locks set until interpreter shutdown. If many threads are created this way, the _shutdown_locks set could therefore grow endlessly. To avoid such a situation, purge expired locks each time a new one is added or removed.

Co-authored-by: @pitrou

https://bugs.python.org/issue37788

@the-knights-who-say-ni

Copy link
Copy Markdown

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

CLA Missing

Our records indicate the following people have not signed the CLA:

@victorvorobev

For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

When a Thread is not joined after it has stopped, its lock may remain in the _shutdown_locks set until interpreter shutdown.  If many threads are created this way, the _shutdown_locks set could therefore grow endlessly.  To avoid such a situation, purge expired locks each time a new one is added or removed.
(cherry picked from commit c10c2ec)

Co-authored-by: @pitrou
@ambv

ambv commented Sep 8, 2021

Copy link
Copy Markdown
Contributor

This isn't a security fix and as such we can't accept it. See more: https://devguide.python.org/devcycle/#security-branches

@ambv ambv closed this Sep 8, 2021
@viktorvorobev viktorvorobev deleted the backport-c10c2ec-3.8 branch September 9, 2021 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.