Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
befeleme opened this issue Feb 12, 2025 · 7 comments
Labels
3.14 bugs and security fixes topic-free-threading type-bug An unexpected behavior, bug, or error

Comments

@befeleme
Copy link
Contributor

befeleme commented Feb 12, 2025

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

@befeleme befeleme added the type-bug An unexpected behavior, bug, or error label Feb 12, 2025
@hugovk hugovk added topic-free-threading 3.14 bugs and security fixes labels Feb 12, 2025
@colesbury
Copy link
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.

@sergey-miryanov
Copy link
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?

@colesbury
Copy link
Contributor

Yes, thanks, please send a PR.

@sergey-miryanov
Copy link
Contributor

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

@pablogsal
Copy link
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.

@pablogsal
Copy link
Member

pablogsal commented Feb 12, 2025

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

@vstinner
Copy link
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
Labels
3.14 bugs and security fixes topic-free-threading type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

6 participants