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_logging leaks a "dangling" thread
Type: resource usage Stage: resolved
Components: Tests Versions: Python 3.7, Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: vstinner, xiang.zhang
Priority: normal Keywords:

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

Pull Requests
URL Status Linked Edit
PR 1275 merged vstinner, 2017-04-24 22:15
PR 1298 merged vstinner, 2017-04-26 13:32
PR 1317 merged vstinner, 2017-04-27 11:24
PR 1318 merged vstinner, 2017-04-27 11:25
Messages (9)
msg292058 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-04-21 16:12
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.
msg292241 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-04-24 22:41
New changeset 4bcfa3a2363c30d406c6826e291b30c33a649d18 by Victor Stinner in branch 'master':
bpo-30131: Cleanup threads in test_logging (#1275)
https://github.com/python/cpython/commit/4bcfa3a2363c30d406c6826e291b30c33a649d18
msg292343 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-04-26 13:33
After stressing test_logging during 2 days on my FreeBSD VM, it seems like I found the root bug: see https://github.com/python/cpython/pull/1298
msg292349 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-04-26 13:56
New changeset 8ca2f2faefa8dba323a2e4c4b86efb633d7a53cf by Victor Stinner in branch 'master':
bpo-30131: test_logging now joins queue threads (#1298)
https://github.com/python/cpython/commit/8ca2f2faefa8dba323a2e4c4b86efb633d7a53cf
msg292395 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2017-04-27 03:55
Does this need to be backported?
msg292424 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-04-27 11:27
> 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.
msg292504 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-04-28 02:13
New changeset cb21f5f3d2005b891df0b76e3fc4d4676e285f21 by Victor Stinner in branch '3.6':
bpo-30131: test_logging now joins queue threads (#1298) (#1317)
https://github.com/python/cpython/commit/cb21f5f3d2005b891df0b76e3fc4d4676e285f21
msg292505 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-04-28 02:27
New changeset d855e53eabca0e8b2b39d25670c37bbdb4ab2e4c by Victor Stinner in branch '3.5':
bpo-30131: test_logging now joins queue threads (#1298) (#1318)
https://github.com/python/cpython/commit/d855e53eabca0e8b2b39d25670c37bbdb4ab2e4c
msg292757 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-02 13:55
Ok, this bug is now fixed in 3.5, 3.6 and master (3.7).
History
Date User Action Args
2022-04-11 14:58:45adminsetgithub: 74317
2017-05-02 13:55:46vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg292757

stage: resolved
2017-04-28 02:27:13vstinnersetmessages: + msg292505
2017-04-28 02:13:55vstinnersetmessages: + msg292504
2017-04-27 11:27:49vstinnersetmessages: + msg292424
versions: + Python 3.5, Python 3.6
2017-04-27 11:25:14vstinnersetpull_requests: + pull_request1425
2017-04-27 11:24:37vstinnersetpull_requests: + pull_request1424
2017-04-27 03:55:30xiang.zhangsetnosy: + xiang.zhang
messages: + msg292395
2017-04-26 13:56:28vstinnersetmessages: + msg292349
2017-04-26 13:33:26vstinnersetmessages: + msg292343
2017-04-26 13:32:52vstinnersetpull_requests: + pull_request1405
2017-04-24 22:41:38vstinnersetmessages: + msg292241
2017-04-24 22:15:19vstinnersetpull_requests: + pull_request1386
2017-04-21 16:12:01vstinnercreate