Skip to content

Python 3.14.0a5: test_external_inspection fails on freethreading-debug build on s390x Linux #130035

Description

@befeleme

Bug report

Bug description:

The failure happens only on s390x: /builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Objects/call.c:342: _PyObject_Call: Assertion '!_PyErr_Occurred(tstate)' failed.
Built as RPM on Fedora Linux 40-43, all occurrences have the same behavior.
The relevant log excerpt:

0:40:46 load avg: 3.05 [1/2/1] test_external_inspection worker non-zero exit code (Exit code -6 (SIGABRT))
Re-running test_external_inspection in verbose mode (matching: )
test_async_gather_remote_stack_trace (test.test_external_inspection.TestGetStackTrace.test_async_gather_remote_stack_trace) ... python: /builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Objects/call.c:342: _PyObject_Call: Assertion `!_PyErr_Occurred(tstate)' failed.
Fatal Python error: Aborted
<Cannot show all threads while the GIL is disabled>
Stack (most recent call first):
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/test/test_external_inspection.py", line 271 in test_async_gather_remote_stack_trace
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/unittest/case.py", line 606 in _callTestMethod
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/unittest/case.py", line 660 in run
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/unittest/case.py", line 716 in __call__
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/unittest/suite.py", line 122 in run
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/unittest/suite.py", line 84 in __call__
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/unittest/suite.py", line 122 in run
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/unittest/suite.py", line 84 in __call__
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/unittest/runner.py", line 259 in run
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/test/libregrtest/single.py", line 84 in _run_suite
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/test/libregrtest/single.py", line 42 in run_unittest
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/test/libregrtest/single.py", line 162 in test_func
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/test/libregrtest/single.py", line 118 in regrtest_runner
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/test/libregrtest/single.py", line 165 in _load_run_test
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/test/libregrtest/single.py", line 210 in _runtest_env_changed_exc
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/test/libregrtest/single.py", line 319 in _runtest
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/test/libregrtest/single.py", line 348 in run_single_test
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/test/libregrtest/worker.py", line 83 in worker_process
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/test/libregrtest/worker.py", line 118 in main
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/test/libregrtest/worker.py", line 122 in <module>
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/runpy.py", line 88 in _run_code
  File "/builddir/build/BUILD/python3.14-3.14.0_a5-build/Python-3.14.0a5/Lib/runpy.py", line 198 in _run_module_as_main
Extension modules: _testinternalcapi, _testexternalinspection (total: 2)

CPython versions tested on:

3.14

Operating systems tested on:

Linux

Activity

  1. colesbury commented on Feb 12, 2025

    @colesbury
    Contributor

    It seems like some of the error paths don't properly set a Python exception. Does s390x have HAVE_PROCESS_VM_READV?

    @pablogsal:

    No Python error set here, but it's not free threading specific, so I'm probably missing something else:

    #else
    return -1;

    results leaked on error here:

    PyObject* result = PyList_New(1);
    if (result == NULL) {
    return NULL;
    }
    PyObject* calls = PyList_New(0);
    if (calls == NULL) {
    return NULL;
    }

    Nothing else stood out immediately.

  2. sergey-miryanov commented on Feb 12, 2025

    @sergey-miryanov
    Contributor

    @colesbury I checked _testexternalinspection.c and found a few other places where exceptions are not set. Do you mind if I send a PR?

  3. colesbury commented on Feb 12, 2025

    @colesbury
    Contributor

    Yes, thanks, please send a PR.

  4. sergey-miryanov commented on Feb 12, 2025

    @sergey-miryanov
    Contributor

    gh-130051 fixes a few memory leaks.
    gh-130053 fixes exceptions (but not finished yet), jfyi.

  5. pablogsal commented on Feb 12, 2025

    @pablogsal
    Member

    It seems like some of the error paths don't properly set a Python exception. Does s390x have HAVE_PROCESS_VM_READV?

    🤔 It should otherwise the test should not even be attempted so whatever is going on is something else.

  6. pablogsal commented on Feb 12, 2025

    @pablogsal
    Member

    For example looking at https://buildbot.python.org/#/builders/509

    The test runs and runs successfully:

    0:00:19 load avg: 3.96 [ 89/484] test_external_inspection passed

  7. vstinner commented on Feb 24, 2025

    @vstinner
    Member

    I suggest to mark this issue as a duplicate of #130052.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions