Skip to content

Trying to ./python -m test -R: test_index crashes with a failed assertion #133258

Closed
@ambv

Description

@ambv

Bug report

Bug description:

❯ ./configure --with-pydebug
❯ make
❯ ./python.exe -m test -R: test_index
Using random seed: 2250434908
0:00:00 load avg: 4.79 Run 1 test sequentially in a single process
0:00:00 load avg: 4.79 [1/1] test_index
beginning 9 repetitions. Showing number of leaks (. for 0 or less, X for 10 or more)
12345:6789
XAssertion failed: (!_PyErr_Occurred(tstate)), function _PyEval_EvalFrameDefault, file generated_cases.c.h, line 12425.
Fatal Python error: Aborted

Current thread 0x000000020f324c80 (most recent call first):
  File "/Volumes/RAMDisk/cpython/Lib/test/test_index.py", line 7 in __index__
  File "/Volumes/RAMDisk/cpython/Lib/test/test_index.py", line 216 in __getitem__
  File "/Volumes/RAMDisk/cpython/Lib/test/test_index.py", line 158 in <lambda>
  File "/Volumes/RAMDisk/cpython/Lib/unittest/case.py", line 247 in handle
  File "/Volumes/RAMDisk/cpython/Lib/unittest/case.py", line 813 in assertRaises
  File "/Volumes/RAMDisk/cpython/Lib/test/test_index.py", line 159 in test_error
  File "/Volumes/RAMDisk/cpython/Lib/unittest/case.py", line 615 in _callTestMethod
  File "/Volumes/RAMDisk/cpython/Lib/unittest/case.py", line 669 in run
  File "/Volumes/RAMDisk/cpython/Lib/unittest/case.py", line 725 in __call__
  File "/Volumes/RAMDisk/cpython/Lib/unittest/suite.py", line 122 in run
  File "/Volumes/RAMDisk/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/Volumes/RAMDisk/cpython/Lib/unittest/suite.py", line 122 in run
  File "/Volumes/RAMDisk/cpython/Lib/unittest/suite.py", line 84 in __call__
  File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/testresult.py", line 148 in run
  File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/single.py", line 84 in _run_suite
  File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/single.py", line 42 in run_unittest
  File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/single.py", line 162 in test_func
  File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/refleak.py", line 138 in runtest_refleak
  File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/single.py", line 114 in regrtest_runner
  File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/single.py", line 165 in _load_run_test
  File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/single.py", line 210 in _runtest_env_changed_exc
  File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/single.py", line 319 in _runtest
  File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/single.py", line 348 in run_single_test
  File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/main.py", line 389 in run_test
  File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/main.py", line 419 in run_tests_sequentially
  File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/main.py", line 561 in _run_tests
  File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/main.py", line 596 in run_tests
  File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/main.py", line 768 in main
  File "/Volumes/RAMDisk/cpython/Lib/test/libregrtest/main.py", line 776 in main
  File "/Volumes/RAMDisk/cpython/Lib/test/__main__.py", line 2 in <module>
  File "/Volumes/RAMDisk/cpython/Lib/runpy.py", line 88 in _run_code
  File "/Volumes/RAMDisk/cpython/Lib/runpy.py", line 198 in _run_module_as_main

Current thread's C stack trace (most recent call first):
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at _Py_DumpStack+0x44 [0x102e106a0]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at faulthandler_dump_c_stack+0x68 [0x102e2f06c]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at faulthandler_fatal_error+0x204 [0x102e2ee78]
  Binary file "/usr/lib/system/libsystem_platform.dylib", at _sigtramp+0x38 [0x1a048b624]
  Binary file "/usr/lib/system/libsystem_pthread.dylib", at pthread_kill+0x128 [0x1a045188c]
  Binary file "/usr/lib/system/libsystem_c.dylib", at abort+0x7c [0x1a035ac60]
  Binary file "/usr/lib/system/libsystem_c.dylib", at err+0x0 [0x1a0359eec]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyEval_EvalFrameDefault+0x3cdc0 [0x102d20568]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyEval_EvalFrame+0x3c [0x102ce3500]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyEval_Vector+0x228 [0x102ce3448]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyFunction_Vectorcall+0x13c [0x102af23f8]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyObject_VectorcallTstate+0x13c [0x102bdd44c]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at vectorcall_unbound+0x70 [0x102bdd620]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at vectorcall_method+0xbc [0x102bdb5e8]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at slot_nb_index+0x44 [0x102bf3944]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyNumber_Index+0xb8 [0x102ac49bc]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at PyNumber_AsSsize_t+0x1c [0x102ac07c0]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyEval_SliceIndex+0x50 [0x102d285ec]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at PySlice_Unpack+0x124 [0x102bc6c80]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at list_slice_subscript+0xb0 [0x102b41ddc]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at list_subscript+0xc4 [0x102b49070]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at PyObject_GetItem+0x78 [0x102ac0524]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyEval_EvalFrameDefault+0x4f4 [0x102ce3c9c]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyEval_EvalFrame+0x3c [0x102ce3500]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyEval_Vector+0x228 [0x102ce3448]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyFunction_Vectorcall+0x13c [0x102af23f8]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyObject_VectorcallTstate+0x13c [0x102bdd44c]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at vectorcall_unbound+0x70 [0x102bdd620]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at vectorcall_method+0xbc [0x102bdb5e8]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at slot_mp_subscript+0x50 [0x102bf3fe0]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at PyObject_GetItem+0x78 [0x102ac0524]
  Binary file "/Volumes/RAMDisk/cpython/python.exe", at _PyEval_EvalFrameDefault+0x4d80 [0x102ce8528]
  <truncated rest of calls>

Extension modules: _testinternalcapi (total: 1)

Platforms reproduced:

  • Windows 11 AMD64
  • macOS Sequoia 15.4.1 M1 Max
  • Ubuntu 22.04 M1 Max

The crash is present on ad2f088 (latest main at time of writing). Currently bisecting.

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

Activity

added
type-bugAn unexpected behavior, bug, or error
on May 1, 2025
changed the title [-]Trying to test_index[/-] [+]Trying to ./python -m test -R: test_index crashes with a failed assertion[/+] on May 1, 2025
ambv

ambv commented on May 1, 2025

@ambv
ContributorAuthor

Bisected to 5529213, i.e. #132626.

added a commit that references this issue on May 1, 2025

pythongh-133258: fix crash in test_index

added
testsTests in the Lib/test dir
3.14bugs and security fixes
on May 1, 2025
added a commit that references this issue on May 1, 2025

gh-133258: Fix crash in test_index (GH-133262)

a4be3bc
itamaro

itamaro commented on May 13, 2025

@itamaro
Contributor

looks like this is fixed & done, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and security fixestestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Trying to ./python -m test -R: test_index crashes with a failed assertion · Issue #133258 · python/cpython

      Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

      Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant