viable/strict/1790888005: [dynamo] Don't let observed exceptions pin the Python stack (#197567)
- PyTorch: 2111 events in the last 90 days
- PyTorch: 2082th Release in the last 90 days
- Previous: earlier the same day · viable/strict/1790886758
What happened
An ObservedException that unwinds out of a tracer ends up in a reference cycle with its own traceback, and only the cyclic GC can break it. That matters because the traceback covers the entire live Python stack at the point of the raise, so until the next gc pass the cycle pins every frame below Dynamo -- including user frames and everything their locals reference. Root cause: InstructionTranslatorBase.exception_han…
Summary assembled by rule from the sources below