You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ref leaks introduced by _io isolation (gh-101948) #104510
Seems that implementing Py_tp_clear for textiobase_spec, bufferediobase_spec, rawiobase_spec doesn't make sense. There's no need in it. I'll check other types in iomodule_exec.
Activity
Eclips4 commentedon May 15, 2023
Commit which introduced it
cc @erlend-aasland
erlend-aasland commentedon May 15, 2023
Nice! We anticipated errors :) cc. @kumaraditya303 @vstinner
Eclips4 commentedon May 15, 2023
However,
nttplibdeprecated since 3.11. So, it's good that it wasn't cut out in 3.12 or earlier😄Eclips4 commentedon May 15, 2023
test_gzip also affected by this commit:
sunmy2019 commentedon May 15, 2023
Incorrectly implemented GC likely causes this.
e.g. I tracked down one cyclic reference here:
self.handler._push_datacontains reference toself.When I add the above line, ref leaks drop from
to
Eclips4 commentedon May 15, 2023
test_httpservers, test_xmlrpc, test_tarfile cause also cause reference leaks.
So, we have at least five tests with reference leaks:
[-]test_nntplib are leaked[/-][+]Some tests are leaked[/+]sunmy2019 commentedon May 15, 2023
@Eclips4 You can try doing similar things in #104457
186bf39 introduces three heap types; none have a
*_clearset.cpython/Modules/_io/_iomodule.c
Lines 681 to 687 in 186bf39
But I have not carefully examined the correct value, and I am unsure whether this will fix the issue.
[-]Some tests are leaked[/-][+]Ref leaks introduced by 186bf39[/+]Eclips4 commentedon May 15, 2023
Sure! I can try this, and later let you know results.
Eclips4 commentedon May 15, 2023
Seems that implementing
Py_tp_clearfortextiobase_spec,bufferediobase_spec,rawiobase_specdoesn't make sense. There's no need in it. I'll check other types iniomodule_exec.erlend-aasland commentedon May 15, 2023
Bisected and confirmed that 186bf39 is the first bad commit.
kumaraditya303 commentedon May 15, 2023
#104516 fixes all the leaks mentioned
[-]Ref leaks introduced by 186bf39[/-][+]Ref leaks introduced by _io isolation (gh-101948)[/+]GH-104510: Fix refleaks in `_io` base types (#104516)
kumaraditya303 commentedon May 16, 2023
Thanks for the report.
Merge branch 'main' into supermon
Merge branch 'main' into 709funconly