[issue40727] SSLContext.load_verify_locations leaks memory on Linux in async code

2020-05-22 Thread Recursing
Recursing added the comment: > Without asyncio memory consumption stays low and stable for me Same for me > RSS jumps from 20 MB to about 1,600 MB. That is the memory consumption I observe as well, the issue is that it doesn't get freed on Linux > There is almost no increase when I run the

[issue40727] SSLContext.load_verify_locations leaks memory on Linux in async code

2020-05-22 Thread Christian Heimes
Christian Heimes added the comment: When I run your example, RSS jumps from 20 MB to about 1,600 MB. There is almost no increase when I run the look several more times. >>> p.memory_info() pmem(rss=19902464, vms=240513024, shared=10014720, text=2125824, lib=0, data=9887744, dirty=0) >>> asyn

[issue40727] SSLContext.load_verify_locations leaks memory on Linux in async code

2020-05-22 Thread Christian Heimes
Christian Heimes added the comment: Without asyncio memory consumption stays low and stable for me: $ ./python -m venv venv $ ./venv/bin/pip install psutil $ ./venv/bin/python >>> ssl.OPENSSL_VERSION 'OpenSSL 1.1.1g FIPS 21 Apr 2020' >>> import psutil, ssl, os >>> p = psutil.Process(os.getpid

[issue40727] SSLContext.load_verify_locations leaks memory on Linux in async code

2020-05-22 Thread Recursing
Recursing added the comment: Removing the `await asyncio.sleep(1)` removes the leak, while changing it to `await asyncio.sleep(0)` seems to keep it -- ___ Python tracker ___

[issue40727] SSLContext.load_verify_locations leaks memory on Linux in async code

2020-05-22 Thread Christian Heimes
Christian Heimes added the comment: Does it also leak without asyncio? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40727] SSLContext.load_verify_locations leaks memory on Linux in async code

2020-05-22 Thread Recursing
New submission from Recursing : Minimal code to reproduce: ``` import ssl import certifi import gc import asyncio ca_path = certifi.where() async def make_async_context() -> None: context = ssl.SSLContext(ssl.PROTOCOL_TLS) context.load_verify_locations(ca_path) await asyncio.sleep(