[issue40696] exception chain cycles cause hangs (was "Exception handling with "await" can hang in Python3.9.0b1")
Chris Jerdonek
report at bugs.python.org
Fri May 22 17:45:19 EDT 2020
Chris Jerdonek <chris.jerdonek at gmail.com> added the comment:
Good to hear, Mariusz! And thanks for the report!
Also, as discussed above, I'm leaving this issue open (and retitling) until the following more general issue is fixed:
try:
raise RuntimeError
except Exception as exc:
print(f'handling: {exc!r}')
exc.__context__ = exc
raise ValueError # hangs
As I mentioned above, I believe this is because _PyErr_SetObject() only checks for cycles that involve the exception being raised. In this case, the cycle involves the exception one further down:
ValueError -> RuntimeError -> RuntimeError -> RuntimeError -> ...
----------
title: Exception handling with "await" can hang in Python3.9.0b1 -> exception chain cycles cause hangs (was "Exception handling with "await" can hang in Python3.9.0b1")
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40696>
_______________________________________
More information about the Python-bugs-list
mailing list