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.

Author vstinner
Recipients ankostis, vstinner, yselivanov
Date 2019-02-21.11:21:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1550748062.56.0.847735328571.issue29757@roundup.psfhosted.org>
In-reply-to
Content
> I thought that local-variables were deterministically (ref-countering) destructed. What is happening?

IT's a reference cycle. Exception => traceback => frame => exception. The 'err' variable kept the frame alive which kept the exception alive which kept everything alive. The GC is supposed to be able to break ref cycles, but GC collections are irregular and sometimes the GC fails to break complex cycles.
History
Date User Action Args
2019-02-21 11:21:02vstinnersetrecipients: + vstinner, yselivanov, ankostis
2019-02-21 11:21:02vstinnersetmessageid: <1550748062.56.0.847735328571.issue29757@roundup.psfhosted.org>
2019-02-21 11:21:02vstinnerlinkissue29757 messages
2019-02-21 11:21:02vstinnercreate