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: test_xmlrpc leaks dangling threads
Type: resource usage Stage: resolved
Components: Tests Versions: Python 3.7, Python 3.6, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: vstinner
Priority: normal Keywords:

Created on 2017-08-21 15:48 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 3166 merged vstinner, 2017-08-21 15:51
PR 3168 merged vstinner, 2017-08-21 16:14
Messages (4)
msg300630 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-08-21 15:48
Using PR 3138 of bpo-31234, I noticed that test_xmlrpc leaks dangling threads. Example:

haypo@selma$ ./python -m test -v test_xmlrpc --fail-env-changed -m test.test_xmlrpc.MultiPathServerTestCase.test_path1
== CPython 3.7.0a0 (heads/master:0267128, Aug 21 2017, 17:23:11) [GCC 6.4.1 20170727 (Red Hat 6.4.1-1)]
(...)
Warning -- threading_cleanup() detected 0 leaked threads (count: 0, dangling: 2)
test_xmlrpc failed (env changed)
(...)

It seems like xmlrpc error handling creates reference leaks. Attached PR fixes the issue.
msg300635 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-08-21 16:13
New changeset 84524454d0ba77d299741c47bd0f5841ac3f66ce by Victor Stinner in branch 'master':
bpo-31247: xmlrpc.server: break reference cycle (#3166)
https://github.com/python/cpython/commit/84524454d0ba77d299741c47bd0f5841ac3f66ce
msg300639 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-08-21 16:35
New changeset 12a3e343e1667f91c0095a9a7dc15048cb620e41 by Victor Stinner in branch '3.6':
bpo-31247: xmlrpc.server: break reference cycle (#3166) (#3168)
https://github.com/python/cpython/commit/12a3e343e1667f91c0095a9a7dc15048cb620e41
msg300640 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-08-21 16:39
Bug fixed in Python 3.6 and 3.7 (master).

Python 2.7 doesn't seem to be affected by the bug, since Exception.__traceback__ was only introduced in Python 3.
History
Date User Action Args
2022-04-11 14:58:50adminsetgithub: 75430
2017-08-21 16:39:53vstinnersetstatus: open -> closed
versions: + Python 2.7
messages: + msg300640

resolution: fixed
stage: resolved
2017-08-21 16:35:06vstinnersetmessages: + msg300639
2017-08-21 16:14:15vstinnersetpull_requests: + pull_request3204
2017-08-21 16:13:00vstinnersetmessages: + msg300635
2017-08-21 15:51:40vstinnersetversions: + Python 3.6
2017-08-21 15:51:28vstinnersetpull_requests: + pull_request3202
2017-08-21 15:48:53vstinnercreate