Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_xmlrpc leaks dangling threads #75430

Closed
vstinner opened this issue Aug 21, 2017 · 4 comments
Closed

test_xmlrpc leaks dangling threads #75430

vstinner opened this issue Aug 21, 2017 · 4 comments
Labels
3.7 (EOL) end of life performance Performance or resource usage tests Tests in the Lib/test dir

Comments

@vstinner
Copy link
Member

BPO 31247
Nosy @vstinner
PRs
  • bpo-31247: xmlrpc.server: break reference cycle #3166
  • [3.6] bpo-31247: xmlrpc.server: break reference cycle (#3166) #3168
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2017-08-21.16:39:53.521>
    created_at = <Date 2017-08-21.15:48:53.393>
    labels = ['3.7', 'tests', 'performance']
    title = 'test_xmlrpc leaks dangling threads'
    updated_at = <Date 2017-08-21.16:39:53.519>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2017-08-21.16:39:53.519>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-08-21.16:39:53.521>
    closer = 'vstinner'
    components = ['Tests']
    creation = <Date 2017-08-21.15:48:53.393>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31247
    keywords = []
    message_count = 4.0
    messages = ['300630', '300635', '300639', '300640']
    nosy_count = 1.0
    nosy_names = ['vstinner']
    pr_nums = ['3166', '3168']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue31247'
    versions = ['Python 2.7', 'Python 3.6', 'Python 3.7']

    @vstinner
    Copy link
    Member Author

    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.

    @vstinner vstinner added 3.7 (EOL) end of life tests Tests in the Lib/test dir performance Performance or resource usage labels Aug 21, 2017
    @vstinner
    Copy link
    Member Author

    New changeset 8452445 by Victor Stinner in branch 'master':
    bpo-31247: xmlrpc.server: break reference cycle (bpo-3166)
    8452445

    @vstinner
    Copy link
    Member Author

    New changeset 12a3e34 by Victor Stinner in branch '3.6':
    bpo-31247: xmlrpc.server: break reference cycle (bpo-3166) (bpo-3168)
    12a3e34

    @vstinner
    Copy link
    Member Author

    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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life performance Performance or resource usage tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant