[issue31323] test_ssl: reference cycle between ThreadedEchoServer and its ConnectionHandler
STINNER Victor
report at bugs.python.org
Fri Sep 1 10:58:24 EDT 2017
New submission from STINNER Victor:
While testing bpo-31234 fix, I noticed that some test_ssl tests using ThreadedEchoServer create reference cycles with ConnectionHandler: ConnectionHandler fills ThreadedEchoServer.conn_errors with exceptions, but exceptions keep an alive traceback object which contains frame locals.
I tried to use traceback.clear_frames(), but this function is broken: see bpo-31321.
Attached PR works around the issue by storing errors are text rather than objects.
The PR prevents warnings about dangling threads.
----------
components: Tests
messages: 301116
nosy: haypo
priority: normal
severity: normal
status: open
title: test_ssl: reference cycle between ThreadedEchoServer and its ConnectionHandler
type: resource usage
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31323>
_______________________________________
More information about the Python-bugs-list
mailing list