The Wayback Machine - https://web.archive.org/web/20221223163905/https://github.com/python/cpython/pull/20684
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

bpo-40882: Fix a memory leak in SharedMemory on Windows #20684

Merged
merged 3 commits into from Nov 25, 2022

Conversation

ZackerySpytz
Copy link
Contributor

@ZackerySpytz ZackerySpytz commented Jun 6, 2020

In multiprocessing.shared_memory.SharedMemory(), the temporary view
returned by MapViewOfFile() should be unmapped when it is no longer
needed.

https://bugs.python.org/issue40882

In multiprocessing.shared_memory.SharedMemory(), the temporary view
returned by MapViewOfFile() should be unmapped when it is no longer
needed.
zooba
zooba approved these changes Jun 10, 2020
@csabella
Copy link
Contributor

csabella commented Jun 12, 2020

@zooba, should this be merged? Thanks!

@tiran tiran removed their request for review Apr 18, 2021
@lukegarland
Copy link

lukegarland commented Aug 27, 2021

@zooba
Hi there, are there any plans to have this merged in with the main branch, and be available in a stable version of Python? Would like to know the timeline if possible.

Thanks,
Luke Garland

@iritkatriel
Copy link
Member

iritkatriel commented Nov 25, 2022

@ZackerySpytz This has merge conflicts now.

@kumaraditya303
Copy link
Contributor

kumaraditya303 commented Nov 25, 2022

I fixed the merge conflicts.

@zooba zooba merged commit 85c128e into python:main Nov 25, 2022
15 checks passed
@miss-islington
Copy link
Contributor

miss-islington commented Nov 25, 2022

Thanks @ZackerySpytz for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒🤖

@miss-islington
Copy link
Contributor

miss-islington commented Nov 25, 2022

Thanks @ZackerySpytz for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒🤖

@miss-islington
Copy link
Contributor

miss-islington commented Nov 25, 2022

Sorry, @ZackerySpytz and @zooba, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 85c128e34daec7625b74746e127afa25888ccde1 3.10

@miss-islington
Copy link
Contributor

miss-islington commented Nov 25, 2022

Sorry @ZackerySpytz and @zooba, I had trouble checking out the 3.11 backport branch.
Please retry by removing and re-adding the "needs backport to 3.11" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker 85c128e34daec7625b74746e127afa25888ccde1 3.11

@miss-islington
Copy link
Contributor

miss-islington commented Nov 25, 2022

Thanks @ZackerySpytz for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒🤖

@miss-islington
Copy link
Contributor

miss-islington commented Nov 25, 2022

Sorry, @ZackerySpytz and @zooba, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 85c128e34daec7625b74746e127afa25888ccde1 3.11

@zooba
Copy link
Member

zooba commented Nov 25, 2022

Any volunteers to do the backport? I've got too many other things checked out right now to do it

lukegarland added a commit to lukegarland/cpython that referenced this pull request Nov 30, 2022
…nGH-20684)

In multiprocessing.shared_memory.SharedMemory(), the temporary view
returned by MapViewOfFile() should be unmapped when it is no longer
needed..
(cherry picked from commit 85c128e)

Co-authored-by: Zackery Spytz <[email protected]>
@lukegarland
Copy link

lukegarland commented Nov 30, 2022

Here it is for Python 3.10 #99911

@bedevere-bot
Copy link

bedevere-bot commented Dec 1, 2022

GH-99911 is a backport of this pull request to the 3.10 branch.

lukegarland added a commit to lukegarland/cpython that referenced this pull request Dec 1, 2022
…nGH-20684)

In multiprocessing.shared_memory.SharedMemory(), the temporary view
returned by MapViewOfFile() should be unmapped when it is no longer
needed..
(cherry picked from commit 85c128e)

Co-authored-by: Zackery Spytz <[email protected]>
lukegarland added a commit to lukegarland/cpython that referenced this pull request Dec 1, 2022
…nGH-20684)

In multiprocessing.shared_memory.SharedMemory(), the temporary view
returned by MapViewOfFile() should be unmapped when it is no longer
needed..
(cherry picked from commit 85c128e)

Co-authored-by: Zackery Spytz <[email protected]>
lukegarland added a commit to lukegarland/cpython that referenced this pull request Dec 1, 2022
…nGH-20684)

In multiprocessing.shared_memory.SharedMemory(), the temporary view
returned by MapViewOfFile() should be unmapped when it is no longer
needed.
(cherry picked from commit 85c128e)

Co-authored-by: Zackery Spytz <[email protected]>
zooba pushed a commit that referenced this pull request Dec 2, 2022
In multiprocessing.shared_memory.SharedMemory(), the temporary view
returned by MapViewOfFile() should be unmapped when it is no longer
needed.
(cherry picked from commit 85c128e)

Co-authored-by: Zackery Spytz <[email protected]>
lukegarland pushed a commit to lukegarland/cpython that referenced this pull request Dec 3, 2022
In multiprocessing.shared_memory.SharedMemory(), the temporary view
returned by MapViewOfFile() should be unmapped when it is no longer
needed.

(cherry picked from commit 85c128e)
@bedevere-bot
Copy link

bedevere-bot commented Dec 3, 2022

GH-99973 is a backport of this pull request to the 3.11 branch.

@lukegarland
Copy link

lukegarland commented Dec 3, 2022

Backport for 3.11 is here: #99973

ambv pushed a commit that referenced this pull request Dec 5, 2022
) (#99973)

bpo-40882: Fix a memory leak in SharedMemory on Windows (GH-20684)

In multiprocessing.shared_memory.SharedMemory(), the temporary view
returned by MapViewOfFile() should be unmapped when it is no longer
needed.

(cherry picked from commit 85c128e)

Co-authored-by: Zackery Spytz <[email protected]>
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.

None yet

10 participants