[issue28913] "Fatal Python error: Cannot recover from stack overflow." from RecursionError in Python 3.5

2020-11-24 Thread STINNER Victor


STINNER Victor  added the comment:

> This appears to happen in 3.5, and not in 3.6 so perhaps whatever fix was 
> applied to 3.6 can be backported to 3.5 so that it doesn't core dump?

I removed the stack usage for function calls in Python 3.6. See the "Stack 
consumption" section of:
https://vstinner.github.io/contrib-cpython-2017q1.html

> Hi Richard, 3.5 is no longer maintained. Does this issue exist in current (>= 
> 3.8) versions?

He wrote that 3.6 is not affected. 3.5 no longer accept bugfixes, so I close 
the issue as out of date.

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue28913] "Fatal Python error: Cannot recover from stack overflow." from RecursionError in Python 3.5

2020-11-24 Thread STINNER Victor


STINNER Victor  added the comment:

https://github.com/Naddiseo/python-core-dump reproducer no longer works on 
Python 3.10.

# in Python source code directory
git clone https://github.com/Naddiseo/python-core-dump
make
./python -m venv ENV
ENV/bin/python -m pip install -r python-core-dump/requirements.txt 
cd python-core-dump/
../ENV/bin/python manage.py migrate

Output:
---
/home/vstinner/python/master/ENV/lib/python3.10/site-packages/django/db/models/sql/query.py:11:
 DeprecationWarning: Using or importing the ABCs from 'collections' instead of 
from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop 
working
  from collections import Counter, Iterator, Mapping, OrderedDict
/home/vstinner/python/master/ENV/lib/python3.10/site-packages/django/core/paginator.py:101:
 DeprecationWarning: Using or importing the ABCs from 'collections' instead of 
from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop 
working
  class Page(collections.Sequence):
Traceback (most recent call last):
  File "/home/vstinner/python/master/python-core-dump/manage.py", line 22, in 

execute_from_command_line(sys.argv)
  File 
"/home/vstinner/python/master/ENV/lib/python3.10/site-packages/django/core/management/__init__.py",
 line 367, in execute_from_command_line
utility.execute()
  File 
"/home/vstinner/python/master/ENV/lib/python3.10/site-packages/django/core/management/__init__.py",
 line 341, in execute
django.setup()
  File 
"/home/vstinner/python/master/ENV/lib/python3.10/site-packages/django/__init__.py",
 line 27, in setup
apps.populate(settings.INSTALLED_APPS)
  File 
"/home/vstinner/python/master/ENV/lib/python3.10/site-packages/django/apps/registry.py",
 line 108, in populate
app_config.import_models(all_models)
  File 
"/home/vstinner/python/master/ENV/lib/python3.10/site-packages/django/apps/config.py",
 line 199, in import_models
self.models_module = import_module(models_module_name)
  File "/home/vstinner/python/master/Lib/importlib/__init__.py", line 126, in 
import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1037, in _gcd_import
  File "", line 1014, in _find_and_load
  File "", line 993, in _find_and_load_unlocked
  File "", line 687, in _load_unlocked
  File "", line 831, in exec_module
  File "", line 235, in _call_with_frames_removed
  File 
"/home/vstinner/python/master/ENV/lib/python3.10/site-packages/django/contrib/auth/models.py",
 line 4, in 
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
  File 
"/home/vstinner/python/master/ENV/lib/python3.10/site-packages/django/contrib/auth/base_user.py",
 line 52, in 
class AbstractBaseUser(models.Model):
RuntimeError: __class__ not set defining 'AbstractBaseUser' as . Was __classcell__ propagated 
to type.__new__?
---

--
nosy: +vstinner
status: pending -> open

___
Python tracker 

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



[issue28913] "Fatal Python error: Cannot recover from stack overflow." from RecursionError in Python 3.5

2020-11-24 Thread Irit Katriel


Irit Katriel  added the comment:

Hi Richard, 3.5 is no longer maintained. Does this issue exist in current (>= 
3.8) versions?

--
nosy: +iritkatriel
status: open -> pending

___
Python tracker 

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



[issue28913] "Fatal Python error: Cannot recover from stack overflow." from RecursionError in Python 3.5

2016-12-08 Thread STINNER Victor

Changes by STINNER Victor :


--
title: "Fatal Python error: Cannot recover from stack overflow." from 
RecursionError -> "Fatal Python error: Cannot recover from stack overflow." 
from RecursionError in Python 3.5

___
Python tracker 

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



[issue28913] "Fatal Python error: Cannot recover from stack overflow." from RecursionError

2016-12-08 Thread Richard Eames

New submission from Richard Eames:

I've been porting a project to the latest version of Django, and due to one of 
the changes in the Django, caused a recursion error in my code. However, the 
error (under certain conditions) then causes the python interpreter to core 
dump. I'm not 100% sure what causes this to happen, but it does seem to be 
similar to https://bugs.python.org/issue6028

I've created a minimal django project: 
https://github.com/Naddiseo/python-core-dump

However, it does rely on some interaction between mysql, pymysql, and django to 
be reproduced, the latter two being 100% python code. I'm sorry that I could 
not reduce the test case further.

One of the interesting/weird things about this bug is that (on my machine at 
least) it requires exactly 15 entries in the `MIDDLEWARE` variable in 
"coredump/settings.py" in my test project, any more, or any less will cause the 
interpreter to issue a `RecursionError` as expected, but not to core dump. 

This appears to happen in 3.5, and not in 3.6 so perhaps whatever fix was 
applied to 3.6 can be backported to 3.5 so that it doesn't core dump?

--
components: Interpreter Core
messages: 282745
nosy: Richard Eames
priority: normal
severity: normal
status: open
title: "Fatal Python error: Cannot recover from stack overflow." from 
RecursionError
type: crash
versions: Python 3.5

___
Python tracker 

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