[issue42651] Recursive traceback crashes Python Interpreter

2020-12-22 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
superseder:  -> crash with unbounded recursion in except statement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42651] Recursive traceback crashes Python Interpreter

2020-12-22 Thread Xinmeng Xia


Xinmeng Xia  added the comment:

Thank you very much, looking forward to the new Python version.

Could you please kindly change the resolution into fixed and close this issue?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42651] Recursive traceback crashes Python Interpreter

2020-12-17 Thread Steve Stagg


Steve Stagg  added the comment:

Sorry, previous should have read "Fixes the abort"

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42651] Recursive traceback crashes Python Interpreter

2020-12-17 Thread Steve Stagg

Steve Stagg  added the comment:

Confirmed that bpo-42500 fixes this traceback, in commit 4e7a69bdb6 

Parent commit:

user@obsidian ~/t/f/cpython (master)> git checkout  93a0ef7
Note: switching to '93a0ef7'.
HEAD is now at 93a0ef7647 Correct return type in 
Modules/_ssl.c::sslmodule_legacy (GH-23609)

user@obsidian ~/t/f/cpython ((93a0ef76…))> ../test.sh
+ make distclean
+ CFLAGS=-O0
+ ./configure --prefix=/home/user/prefix --exec-prefix=/home/user/prefix 
--cache-file=../config.cache --with-pydebug --without-ensurepip
+ CFLAGS=-O0
+ make -j8 install
/home/user/cpython/Lib/runpy.py:111: PendingDeprecationWarning: lib2to3 package 
is deprecated and may not be able to parse Python 3.10+
  __import__(pkg_name)
/home/user/cpython/Lib/runpy.py:111: PendingDeprecationWarning: lib2to3 package 
is deprecated and may not be able to parse Python 3.10+
  __import__(pkg_name)
++ realpath /home/user/prefix/include/python3.10d/
+ INCLUDE_DIR=/home/user/prefix/include/python3.10d
+ set +e
+ PYTHONHOME=/home/user/prefix
+ /home/user/prefix/bin/python3 ../test.py
NoneType: None
...
NoneType: None
Fatal Python error: _Py_CheckRecursiveCall: Cannot recover from stack overflow.
Python runtime state: initialized

Current thread 0x7f483d4bd740 (most recent call first):
  File "/home/user/prefix/lib/python3.10/traceback.py", line 165 in _some_str
  File "/home/user/prefix/lib/python3.10/traceback.py", line 524 in __init__
  File "/home/user/prefix/lib/python3.10/traceback.py", line 113 in 
print_exception
  File "/home/user/prefix/lib/python3.10/traceback.py", line 173 in print_exc
  File "/home/user/cpython/../test.py", line 4 in foo
  ...
../test.sh: line 33: 50081 Aborted (core dumped) 
PYTHONHOME=$PREFIX $EPREFIX/bin/python3 ../test.py
+ [[ 134 -eq 139 ]]
+ exit 0

After fix merged:

user@obsidian ~/t/f/cpython ((93a0ef76…)) [1]> git checkout 4e7a69bdb6
Previous HEAD position was 93a0ef7647 Correct return type in 
Modules/_ssl.c::sslmodule_legacy (GH-23609)
HEAD is now at 4e7a69bdb6 bpo-42500: Fix recursion in or after except (GH-23568)
user@obsidian ~/t/f/cpython ((4e7a69bd…))> ../test.sh
+ make distclean
+ CFLAGS=-O0
+ ./configure --prefix=/home/user/prefix --exec-prefix=/home/user/prefix 
--cache-file=../config.cache --with-pydebug --without-ensurepip
+ CFLAGS=-O0
+ make -j8 install
/home/user/cpython/Lib/runpy.py:111: PendingDeprecationWarning: lib2to3 package 
is deprecated and may not be able to parse Python 3.10+
  __import__(pkg_name)
/home/user/cpython/Lib/runpy.py:111: PendingDeprecationWarning: lib2to3 package 
is deprecated and may not be able to parse Python 3.10+
  __import__(pkg_name)
++ realpath /home/user/prefix/include/python3.10d/
+ INCLUDE_DIR=/home/user/prefix/include/python3.10d
+ set +e
+ PYTHONHOME=/home/user/prefix
+ /home/user/prefix/bin/python3 ../test.py
NoneType: None
...
NoneType: None
Traceback (most recent call last):
  File "/home/user/prefix/lib/python3.10/traceback.py", line 165, in _some_str
return str(value)
RecursionError: maximum recursion depth exceeded while calling a Python object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/cpython/../test.py", line 7, in 
foo()
  File "/home/user/cpython/../test.py", line 5, in foo
foo() 
  File "/home/user/cpython/../test.py", line 5, in foo
foo() 
  File "/home/user/cpython/../test.py", line 5, in foo
foo() 
  [Previous line repeated 989 more times]
  File "/home/user/cpython/../test.py", line 4, in foo
traceback.print_exc()
  File "/home/user/prefix/lib/python3.10/traceback.py", line 173, in print_exc
print_exception(*sys.exc_info(), limit=limit, file=file, chain=chain)
  File "/home/user/prefix/lib/python3.10/traceback.py", line 113, in 
print_exception
for line in TracebackException(
  File "/home/user/prefix/lib/python3.10/traceback.py", line 632, in format
yield from self.format_exception_only()
  File "/home/user/prefix/lib/python3.10/traceback.py", line 580, in 
format_exception_only
yield _format_final_exc_line(stype, self._str)
  File "/home/user/prefix/lib/python3.10/traceback.py", line 156, in 
_format_final_exc_line
valuestr = _some_str(value)
  File "/home/user/prefix/lib/python3.10/traceback.py", line 167, in _some_str
return '' % type(value).__name__
RecursionError: maximum recursion depth exceeded while calling a Python object
+ [[ 1 -eq 139 ]]
+ exit 0

--
nosy: +stestagg

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42651] Recursive traceback crashes Python Interpreter

2020-12-17 Thread Xinmeng Xia


Xinmeng Xia  added the comment:

In issue#36272, they discuss a bug in logging module. They show an example 
which is similar as this one. So I think I think there might be a similar bug 
in traceback module.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42651] Recursive traceback crashes Python Interpreter

2020-12-17 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

This might be related to #42500

--
nosy: +ronaldoussoren

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42651] Recursive traceback crashes Python Interpreter

2020-12-16 Thread Xinmeng Xia


Change by Xinmeng Xia :


--
title: Title: Recursive traceback crashes  Python Interpreter -> Recursive 
traceback crashes  Python Interpreter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com