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

Warning -- threading._dangling was modified by test_asyncio on FreeBSD 9 and 10 #74466

Closed
vstinner opened this issue May 5, 2017 · 7 comments
Labels
3.7 (EOL) end of life tests Tests in the Lib/test dir topic-asyncio

Comments

@vstinner
Copy link
Member

vstinner commented May 5, 2017

BPO 30280
Nosy @vstinner, @1st1, @koobs, @zhangyangyu
PRs
  • bpo-30280: Cleanup threads in ayncio tests #2501
  • [3.6] bpo-30280: Cleanup threads in ayncio tests (#2501) #2511
  • [3.5] bpo-30280: Cleanup threads in ayncio tests (#2501) #2512
  • 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-06-30.15:22:29.733>
    created_at = <Date 2017-05-05.09:08:35.083>
    labels = ['3.7', 'tests', 'expert-asyncio']
    title = 'Warning -- threading._dangling was modified by test_asyncio on FreeBSD 9 and 10'
    updated_at = <Date 2017-06-30.15:22:29.732>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2017-06-30.15:22:29.732>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-06-30.15:22:29.733>
    closer = 'vstinner'
    components = ['Tests', 'asyncio']
    creation = <Date 2017-05-05.09:08:35.083>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 30280
    keywords = []
    message_count = 7.0
    messages = ['293082', '293325', '293683', '297366', '297367', '297416', '297417']
    nosy_count = 4.0
    nosy_names = ['vstinner', 'yselivanov', 'koobs', 'xiang.zhang']
    pr_nums = ['2501', '2511', '2512']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue30280'
    versions = ['Python 3.5', 'Python 3.6', 'Python 3.7']

    @vstinner
    Copy link
    Member Author

    vstinner commented May 5, 2017

    @vstinner vstinner added 3.7 (EOL) end of life tests Tests in the Lib/test dir topic-asyncio labels May 5, 2017
    @vstinner
    Copy link
    Member Author

    vstinner commented May 9, 2017

    Warning also seen on FreeBSD 10:
    http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/240/steps/test/logs/stdio

    Warning -- threading._dangling was modified by test_asyncio
    Before: <_weakrefset.WeakSet object at 0x805f5d810>
    After: <_weakrefset.WeakSet object at 0x807929948>

    @vstinner vstinner changed the title Warning -- threading._dangling was modified by test_asyncio on FreeBSD 9 Warning -- threading._dangling was modified by test_asyncio on FreeBSD 9 and 10 May 9, 2017
    @vstinner
    Copy link
    Member Author

    Xiang Zhang just fixed a bug to release resources in test_asyncio: bpo-30110, commit 981096f. No idea if it's enough to fix the warning.

    @vstinner
    Copy link
    Member Author

    New changeset b903067 by Victor Stinner in branch 'master':
    bpo-30280: Cleanup threads in ayncio tests (bpo-2501)
    b903067

    @vstinner
    Copy link
    Member Author

    The commit b903067 fixes one leaking thread. I don't know if it's enough.

    Koobs gave me a SSH access to his FreeBSD buildbots (9, 10 and CURRENT), but I failed to reproduce the warning issue :-( I tried to run my system_load.py to run the tests when the system load is 5 or higher, but it doesn't help. I tried to run test_asyncio 4 times in parallel, but I was still unable to reproduce the bug.

    The commit b903067 not only fixes a bug (cleanup correctly one event loop), but it now also checks after *each* test that we don't leak threads. At least, if the bug reoccurs and the test is run in verbose mode, we will get the name of the test which leaked threads!

    @vstinner
    Copy link
    Member Author

    New changeset 0e0bc87 by Victor Stinner in branch '3.5':
    bpo-30280: Cleanup threads in ayncio tests (bpo-2501) (bpo-2512)
    0e0bc87

    @vstinner
    Copy link
    Member Author

    New changeset 23caf8c by Victor Stinner in branch '3.6':
    bpo-30280: Cleanup threads in ayncio tests (bpo-2501) (bpo-2511)
    23caf8c

    @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 tests Tests in the Lib/test dir topic-asyncio
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant