Debugger crashes in simple Python
已回答
Using Pycharm
Build #PC-221.5591.52, built on May 10, 2022
Runtime version: 11.0.14.1+1-b2043.45 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Pycharm Debugger crashes with following simple snippet of Python code:
class Recursive:
def __init__(self):
self.value = None
@property
def recursive(self):
return self.recursive
@recursive.setter
def recursive(self, value: str):
self.value = value
x = Recursive()
x.recursive = 'bad_true'
x = 'bad_true'
When you debug step through to `x.recursive` line, then in the Evaluate Expression pane of the Debugger window, you attempt to expand the `x = (Recursive) <__main__.Recursive object ...>` with a mouse, it explodes with:
/usr/bin/python3.9 /opt/pycharm-community-2022.1.1/plugins/python-ce/helpers/pydev/pydevd.py --multiprocess --qt-support=auto --client 127.0.0.1 --port 20977 --file /home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py
Connected to pydev debugger (build 221.5591.52)
Fatal Python error: _Py_CheckRecursiveCall: Cannot recover from stack overflow.
Python runtime state: initialized
Thread 0x00007f5b7e425640 (most recent call first):
File "/usr/lib/python3.9/threading.py", line 316 in wait
File "/usr/lib/python3.9/threading.py", line 574 in wait
File "/opt/pycharm-community-2022.1.1/plugins/python-ce/helpers/pydev/pydevd.py", line 150 in _on_run
File "/opt/pycharm-community-2022.1.1/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 219 in run
File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap
Thread 0x00007f5b7ec26640 (most recent call first):
File "/opt/pycharm-community-2022.1.1/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 293 in _on_run
File "/opt/pycharm-community-2022.1.1/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 219 in run
File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap
Thread 0x00007f5b7f427640 (most recent call first):
File "/usr/lib/python3.9/threading.py", line 316 in wait
File "/usr/lib/python3.9/queue.py", line 180 in get
File "/opt/pycharm-community-2022.1.1/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 368 in _on_run
File "/opt/pycharm-community-2022.1.1/plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 219 in run
File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner
File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap
Current thread 0x00007f5b817fa740 (most recent call first):
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
File "/home/wolfe/work/github/pyparsing-exercises/property_setter_deleter.py", line 10 in recursive
...
Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
请先登录再写评论。
Please do not be misled by the class name `Recursive`, it is a reference to ISC Bind9 named.conf configuration setting (DNS-related) and nothing to do with Python recursion.
I just did not want to change a single character of a working prototype that causes this PyCharm debugger failure.
I filed a bug to our issue tracker https://youtrack.jetbrains.com/issue/PY-54717/Debugger-crashes-when-expanding-the-variable, please vote for it and feel free to comment.