This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: memory leak in ssl certification
Type: resource usage Stage: resolved
Components: SSL, Windows Versions: Python 3.9, Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: christian.heimes Nosy List: christian.heimes, miss-islington, neonene, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2019-07-29 07:45 by neonene, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 14999 closed python-dev, 2019-07-29 09:12
PR 15632 merged neonene, 2019-08-31 19:39
PR 15770 merged miss-islington, 2019-09-09 12:34
PR 15771 merged steve.dower, 2019-09-09 12:35
Messages (7)
msg348600 - (view) Author: neonene (neonene) * Date: 2019-07-29 07:45
Windows10/7(x86/x64)
After issue35941 (any PR merged)

In https-access, memory usage increases by about 200KB per urlopen()
and easily reach to giga bytes.

I found out leak of certificate-store-handles in _ssl.c and made patch,
which works fine for my pc.

I guess some users are in trouble with this leak.
I'm about to raise PR, so please review. Thanks!
msg350927 - (view) Author: neonene (neonene) * Date: 2019-08-31 19:43
I raised another PR(15632), which keeps the changes to a minimum.
I hope either PR would be in the 3.7.5 / 3.8.0 official.
msg351441 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-09-09 12:33
Thanks for the simpler patch. I'm happier taking that one, given we know the rest of the code already works.
msg351442 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-09-09 12:33
New changeset ed70129e15ea028469145111044a4349960a4e6f by Steve Dower (neonene) in branch 'master':
bpo-37702: Fix SSL's certificate-store leak on Windows (GH-15632)
https://github.com/python/cpython/commit/ed70129e15ea028469145111044a4349960a4e6f
msg351463 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-09-09 13:39
Closing now, as we're just waiting on the backports to clear CI.

Thanks for your contributions!
msg351464 - (view) Author: miss-islington (miss-islington) Date: 2019-09-09 13:40
New changeset 472f37ab9a33050d7d50d1ebe33ba324a51c52c2 by Miss Islington (bot) in branch '3.7':
bpo-37702: Fix SSL's certificate-store leak on Windows (GH-15632)
https://github.com/python/cpython/commit/472f37ab9a33050d7d50d1ebe33ba324a51c52c2
msg351467 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-09-09 13:48
New changeset 5d695b6b7bcccf5f028cdacd986096de15bc0ca6 by Steve Dower in branch '3.8':
bpo-37702: Fix SSL's certificate-store leak on Windows (GH-15632)
https://github.com/python/cpython/commit/5d695b6b7bcccf5f028cdacd986096de15bc0ca6
History
Date User Action Args
2022-04-11 14:59:18adminsetgithub: 81883
2019-09-09 13:48:27steve.dowersetmessages: + msg351467
2019-09-09 13:40:47miss-islingtonsetnosy: + miss-islington
messages: + msg351464
2019-09-09 13:39:06steve.dowersetstatus: open -> closed
resolution: fixed
messages: + msg351463

stage: patch review -> resolved
2019-09-09 12:35:22steve.dowersetpull_requests: + pull_request15425
2019-09-09 12:34:02miss-islingtonsetpull_requests: + pull_request15424
2019-09-09 12:33:46steve.dowersetmessages: + msg351442
2019-09-09 12:33:14steve.dowersetmessages: + msg351441
2019-08-31 19:43:00neonenesetmessages: + msg350927
2019-08-31 19:39:28neonenesetpull_requests: + pull_request15300
2019-07-29 09:12:27python-devsetkeywords: + patch
stage: patch review
pull_requests: + pull_request14765
2019-07-29 07:45:29neonenecreate