Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

getting ssl.SSLSocket.session brings to memory leak #116810

Closed
Assignees
gpsheadsethmlarson
Labels
topic-SSLtype-bugAn unexpected behavior, bug, or error
@vetonyx

Description

@vetonyx

Bug report

Bug description:

Ubuntu 22.04
python 3.12, python3.11

importsslimportsocketimporttimehost='192.168.16.66'# some server we can connect with https as exampleport=443session=Nonecontext=ssl._create_unverified_context(protocol=ssl.PROTOCOL_TLSv1_2)withsocket.create_connection((host,port))assock:withcontext.wrap_socket(sock,server_hostname=host,session=session)asssock:foriinrange(300000):session=ssock.sessionprint('Sleeping')time.sleep(200)

Here is part of script that is used for "ssl reuse" session during connection to server
Running this script brings to memory leak (process memory increased from 322Mb to 2.5Gb).
Memory is not freed on "time.sleep" instruction
Not reproduced on python 3.8

CPython versions tested on:

3.11, 3.12

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Labels

topic-SSLtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp