classification
Title: A fatal error in test_descr
Type: Stage: patch review
Components: Interpreter Core Versions: Python 3.9, Python 3.8, Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ZackerySpytz, eamanu, vstinner
Priority: normal Keywords: patch

Created on 2019-10-22 03:16 by ZackerySpytz, last changed 2019-10-22 22:32 by vstinner.

Pull Requests
URL Status Linked Edit
PR 16879 open ZackerySpytz, 2019-10-22 03:20
Messages (3)
msg355113 - (view) Author: Zackery Spytz (ZackerySpytz) * (Python triager) Date: 2019-10-22 03:16
When running test_descr, I encountered a fatal error!


./python -m test test_descr
0:00:00 load avg: 0.46 Run tests sequentially
0:00:00 load avg: 0.46 [1/1] test_descr
python: Objects/typeobject.c:7318: update_one_slot: Assertion `!PyErr_Occurred()' failed.
Fatal Python error: Aborted

Current thread 0x00007ff22eb72140 (most recent call first):
  File "/home/lubuntu2/cpython/Lib/test/test_descr.py", line 3923 in test_mutable_bases
  File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 617 in _callTestMethod
  File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 663 in run
  File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 725 in __call__
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run
  File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/home/lubuntu2/cpython/Lib/test/support/testresult.py", line 162 in run
  File "/home/lubuntu2/cpython/Lib/test/support/__init__.py", line 2032 in _run_suite
  File "/home/lubuntu2/cpython/Lib/test/support/__init__.py", line 2128 in run_unittest
  File "/home/lubuntu2/cpython/Lib/test/test_descr.py", line 5643 in test_main
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 234 in _runtest_inner2
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 270 in _runtest_inner
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 153 in _runtest
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 193 in runtest
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 417 in run_tests_sequential
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 515 in run_tests
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 687 in _main
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 634 in main
  File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 712 in main
  File "/home/lubuntu2/cpython/Lib/test/__main__.py", line 2 in <module>
  File "/home/lubuntu2/cpython/Lib/runpy.py", line 85 in _run_code
  File "/home/lubuntu2/cpython/Lib/runpy.py", line 192 in _run_module_as_main
Aborted (core dumped)

This is because update_all_slots() is called immediately after add_all_subclasses() in type_set_bases(). If an exception occurs in add_all_subclasses() (for example, MemoryError), update_all_slots() will be called with a live exception.
msg355138 - (view) Author: Emmanuel Arias (eamanu) * Date: 2019-10-22 15:41
I can't reproduce the error
msg355139 - (view) Author: Emmanuel Arias (eamanu) * Date: 2019-10-22 15:42
I' am using:
Python 3.9.0a0 (heads/master:f548a3e4a2, Oct 22 2019, 12:02:14) 
[GCC 6.3.0 20170516]

On Debian 9
History
Date User Action Args
2019-10-22 22:32:52vstinnersetnosy: + vstinner
2019-10-22 15:42:08eamanusetmessages: + msg355139
2019-10-22 15:41:19eamanusetnosy: + eamanu
messages: + msg355138
2019-10-22 03:20:31ZackerySpytzsetkeywords: + patch
stage: patch review
pull_requests: + pull_request16424
2019-10-22 03:16:04ZackerySpytzcreate