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_logging leaks a "dangling" thread #74317

Closed
vstinner opened this issue Apr 21, 2017 · 9 comments
Closed

test_logging leaks a "dangling" thread #74317

vstinner opened this issue Apr 21, 2017 · 9 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 30131
Nosy @vstinner, @zhangyangyu
PRs
  • bpo-30131: Cleanup threads in test_logging #1275
  • bpo-30131: test_logging now joins queue threads #1298
  • [3.6] bpo-30131: test_logging now joins queue threads (#1298) #1317
  • [3.5] bpo-30131: test_logging now joins queue threads (#1298) #1318
  • 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-05-02.13:55:46.854>
    created_at = <Date 2017-04-21.16:12:01.929>
    labels = ['3.7', 'tests', 'performance']
    title = 'test_logging leaks a "dangling" thread'
    updated_at = <Date 2017-05-02.13:55:46.853>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2017-05-02.13:55:46.853>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-05-02.13:55:46.854>
    closer = 'vstinner'
    components = ['Tests']
    creation = <Date 2017-04-21.16:12:01.929>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 30131
    keywords = []
    message_count = 9.0
    messages = ['292058', '292241', '292343', '292349', '292395', '292424', '292504', '292505', '292757']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'xiang.zhang']
    pr_nums = ['1275', '1298', '1317', '1318']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue30131'
    versions = ['Python 3.5', 'Python 3.6', 'Python 3.7']

    @vstinner
    Copy link
    Member Author

    Example on Windows from AppVeyor:

    https://ci.appveyor.com/project/python/cpython/build/3.7.0a0.1402

    Warning -- threading._dangling was modified by test_logging
    Before: <_weakrefset.WeakSet object at 0x027CBE30>
    After: <_weakrefset.WeakSet object at 0x027CBFF0>

    I also saw this warning on FreeBSD buildbots.

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

    New changeset 4bcfa3a by Victor Stinner in branch 'master':
    bpo-30131: Cleanup threads in test_logging (bpo-1275)
    4bcfa3a

    @vstinner
    Copy link
    Member Author

    After stressing test_logging during 2 days on my FreeBSD VM, it seems like I found the root bug: see #1298

    @vstinner
    Copy link
    Member Author

    New changeset 8ca2f2f by Victor Stinner in branch 'master':
    bpo-30131: test_logging now joins queue threads (bpo-1298)
    8ca2f2f

    @zhangyangyu
    Copy link
    Member

    Does this need to be backported?

    @vstinner
    Copy link
    Member Author

    Does this need to be backported?

    I checked: Python 3.5 and 3.6 have the bug, but Python 2.7 is not affected (it doesn't have the unit test which leaks resources). I created PRs.

    @vstinner
    Copy link
    Member Author

    New changeset cb21f5f by Victor Stinner in branch '3.6':
    bpo-30131: test_logging now joins queue threads (bpo-1298) (bpo-1317)
    cb21f5f

    @vstinner
    Copy link
    Member Author

    New changeset d855e53 by Victor Stinner in branch '3.5':
    bpo-30131: test_logging now joins queue threads (bpo-1298) (bpo-1318)
    d855e53

    @vstinner
    Copy link
    Member Author

    vstinner commented May 2, 2017

    Ok, this bug is now fixed in 3.5, 3.6 and master (3.7).

    @vstinner vstinner closed this as completed May 2, 2017
    @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

    2 participants