classification
Title: Warning -- threading._dangling was modified by test_asyncio on FreeBSD 9 and 10
Type: Stage: resolved
Components: asyncio, Tests Versions: Python 3.7, Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: koobs, vstinner, xiang.zhang, yselivanov
Priority: normal Keywords:

Created on 2017-05-05 09:08 by vstinner, last changed 2017-06-30 15:22 by vstinner. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 2501 merged vstinner, 2017-06-30 08:58
PR 2511 merged vstinner, 2017-06-30 15:00
PR 2512 merged vstinner, 2017-06-30 15:02
Messages (7)
msg293082 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-05 09:08
On the FreeBSD 9 buildbot, I saw this warning:

Warning -- threading._dangling was modified by test_asyncio

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.6/builds/124/steps/test/logs/warnings%20%281%29

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.5/builds/78/steps/test/logs/warnings%20%281%29
msg293325 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-09 15:45
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>
msg293683 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-15 08:13
Xiang Zhang just fixed a bug to release resources in test_asyncio: bpo-30110, commit 981096f98b9c131594b0ac85ad01b63cbd11aa0a. No idea if it's enough to fix the warning.
msg297366 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-06-30 09:12
New changeset b9030674624c181d6e9047cdb14ad65bb6c84c66 by Victor Stinner in branch 'master':
bpo-30280: Cleanup threads in ayncio tests (#2501)
https://github.com/python/cpython/commit/b9030674624c181d6e9047cdb14ad65bb6c84c66
msg297367 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-06-30 09:15
The commit b9030674624c181d6e9047cdb14ad65bb6c84c66 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 b9030674624c181d6e9047cdb14ad65bb6c84c66 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!
msg297416 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-06-30 15:20
New changeset 0e0bc8762570277147a09278c829e4a85a331596 by Victor Stinner in branch '3.5':
bpo-30280: Cleanup threads in ayncio tests (#2501) (#2512)
https://github.com/python/cpython/commit/0e0bc8762570277147a09278c829e4a85a331596
msg297417 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-06-30 15:20
New changeset 23caf8cfc6c52bdedd8e8db688d807530355fd6d by Victor Stinner in branch '3.6':
bpo-30280: Cleanup threads in ayncio tests (#2501) (#2511)
https://github.com/python/cpython/commit/23caf8cfc6c52bdedd8e8db688d807530355fd6d
History
Date User Action Args
2017-06-30 15:22:29vstinnersetstatus: open -> closed
resolution: fixed
stage: resolved
2017-06-30 15:20:36vstinnersetmessages: + msg297417
2017-06-30 15:20:34vstinnersetmessages: + msg297416
2017-06-30 15:02:28vstinnersetpull_requests: + pull_request2581
2017-06-30 15:00:05vstinnersetpull_requests: + pull_request2580
2017-06-30 09:15:53vstinnersetmessages: + msg297367
2017-06-30 09:12:35vstinnersetmessages: + msg297366
2017-06-30 08:58:31vstinnersetpull_requests: + pull_request2561
2017-05-15 08:13:13vstinnersetnosy: + xiang.zhang
messages: + msg293683
2017-05-13 11:18:47koobssetnosy: + koobs
2017-05-09 15:45:18vstinnersetmessages: + msg293325
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
2017-05-05 09:08:35vstinnercreate