Issue 30936: json module ref leaks detected by test_json (original) (raw)

Created on 2017-07-15 10:43 by Segev Finer, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 2712 merged serhiy.storchaka,2017-07-15 10:50
PR 2727 merged serhiy.storchaka,2017-07-16 04:33
PR 2728 merged serhiy.storchaka,2017-07-16 04:36
Messages (7)
msg298391 - (view) Author: Segev Finer (Segev Finer) * Date: 2017-07-15 10:42
From builtbots: test_json leaked [4, 4, 4] references, sum=12 test_json leaked [3, 3, 3] memory blocks, sum=9 1 test failed again: test_json Probably unearthed by: https://github.com/python/cpython/pull/2692 https://github.com/python/cpython/pull/2693
msg298406 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-07-15 21:40
On Python 3.6, the leaking test is: test.test_json.test_speedups.TestEncode.test_bad_bool_args
msg298414 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-07-16 04:29
New changeset 49f6449ef4b81537c19b82329caaf60596c516c2 by Serhiy Storchaka in branch 'master': bpo-30936: Fix a reference leak in json when fail to sort keys. (#2712) https://github.com/python/cpython/commit/49f6449ef4b81537c19b82329caaf60596c516c2
msg298418 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-07-16 04:48
New changeset a819e5e1e66a1a5f9a7073c8a1ff3c3f304c917b by Serhiy Storchaka in branch '3.6': [3.6] bpo-30936: Fix a reference leak in json when fail to sort keys. (GH-2712). (#2727) https://github.com/python/cpython/commit/a819e5e1e66a1a5f9a7073c8a1ff3c3f304c917b
msg298419 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-07-16 04:50
New changeset 45c471c04553d7e4cb5c328ea1ab02d6716f2bab by Serhiy Storchaka in branch '3.5': [3.5] bpo-30936: Fix a reference leak in json when fail to sort keys. (GH-2712). (#2728) https://github.com/python/cpython/commit/45c471c04553d7e4cb5c328ea1ab02d6716f2bab
msg298421 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-07-16 05:15
Thank you for opening this issue Segev. Tests added in exposed existing leak in 3.5 and 3.6. It was not exposed in 3.7 due to different code for sort_keys. But there was a leak when sorting keys is failed. I added a new test for this case. 2.7 is not affected because C speedup is not implemented for sort_keys in 2.7.
msg298439 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-07-16 14:14
Thanks for the fixes. I checked manually 2.7, 3.5, 3.6 and master branches with "./python -m test -R 3:3 test_json": no more leak!
History
Date User Action Args
2022-04-11 14:58:49 admin set github: 75119
2017-07-16 14:14:47 vstinner set messages: +
2017-07-16 05:15:26 serhiy.storchaka set status: open -> closedversions: - Python 2.7messages: + resolution: fixedstage: patch review -> resolved
2017-07-16 04:50:39 serhiy.storchaka set messages: +
2017-07-16 04:48:10 serhiy.storchaka set messages: +
2017-07-16 04:36:36 serhiy.storchaka set pull_requests: + <pull%5Frequest2788>
2017-07-16 04:33:07 serhiy.storchaka set pull_requests: + <pull%5Frequest2787>
2017-07-16 04:29:19 serhiy.storchaka set messages: +
2017-07-15 21:40:30 vstinner set messages: +
2017-07-15 10:52:00 serhiy.storchaka set stage: patch reviewversions: + Python 2.7, Python 3.7
2017-07-15 10:50:35 serhiy.storchaka set pull_requests: + <pull%5Frequest2776>
2017-07-15 10:43:00 Segev Finer create