Message394131
Anthony Sottile: I'm surprised that AST nodes survive until the last GC collection. It seems like somehow a reference cycle prevent to delete these nodes, and this reference cycle is kept alive somehow until the last GC collection at Python exit.
It would be interesting to follow references. You may start from PyInterpreterState which keeps objects alive until the last GC collection:
* os.register_at_fork() callbacks
* codecs.register() callback
* Python audit hooks
* sys.modules objects
* sys.__dict__
Callbacks keep global variables of a module alive through its __globals__ attribute (namespace of the module where it's defined). |
|
Date |
User |
Action |
Args |
2021-05-21 17:25:06 | vstinner | set | recipients:
+ vstinner, paul.moore, christian.heimes, tim.golden, zach.ware, steve.dower, Anthony Sottile, ammar2, pablogsal, miss-islington, erlendaasland, stestagg, shreyanavigyan |
2021-05-21 17:25:06 | vstinner | set | messageid: <1621617906.8.0.114936051034.issue44184@roundup.psfhosted.org> |
2021-05-21 17:25:06 | vstinner | link | issue44184 messages |
2021-05-21 17:25:06 | vstinner | create | |
|