-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Closed
Labels
3.15new features, bugs and security fixesnew features, bugs and security fixestestsTests in the Lib/test dirTests in the Lib/test dirtopic-JITtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
Recently, we started to run Python test suite with PYTHON_JIT=1.
This is a test failure we got on all Fedora versions (41 to 44), x86_64:
======================================================================
FAIL: test_attr_promotion_failure (test.test_capi.test_opt.TestUopsOptimization.test_attr_promotion_failure)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib64/python3.15/test/test_capi/test_opt.py", line 2460, in test_attr_promotion_failure
script_helper.assert_python_ok('-c', textwrap.dedent("""
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
import _testinternalcapi
^^^^^^^^^^^^^^^^^^^^^^^^
...<22 lines>...
assert ex is not None
^^^^^^^^^^^^^^^^^^^^^
"""))
^^^^^
File "/usr/lib64/python3.15/test/support/script_helper.py", line 182, in assert_python_ok
return _assert_python(True, *args, **env_vars)
File "/usr/lib64/python3.15/test/support/script_helper.py", line 167, in _assert_python
res.fail(cmd_line)
~~~~~~~~^^^^^^^^^^
File "/usr/lib64/python3.15/test/support/script_helper.py", line 80, in fail
raise AssertionError(f"Process return code is {exitcode}\n"
...<10 lines>...
f"---")
AssertionError: Process return code is 1
command line: ['/usr/bin/python3.15', '-X', 'faulthandler', '-I', '-c', '\nimport _testinternalcapi\nimport _opcode\nimport email\n\ndef get_first_executor(func):\n code = func.__code__\n co_code = code.co_code\n for i in range(0, len(co_code), 2):\n try:\n return _opcode.get_executor(code, i)\n except ValueError:\n pass\n return None\n\ndef testfunc(n):\n for _ in range(n):\n email.jit_testing = None\n prompt = email.jit_testing\n del email.jit_testing\n\n\ntestfunc(_testinternalcapi.TIER2_THRESHOLD)\nex = get_first_executor(testfunc)\nassert ex is not None\n']
stdout:
---
---
stderr:
---
Traceback (most recent call last):
File "<string>", line 25, in <module>
assert ex is not None
^^^^^^^^^^^^^^
AssertionError
---
----------------------------------------------------------------------
Ran 1 test in 0.050s
FAILED (failures=1)
test test_capi failed
1 test failed again:
test_capi
== Tests result: FAILURE then FAILURE ==
We run the tests from installed Python via python3.15 -m test -wW -j0 --timeout=1800 -i ....
Full log including python3.15 -m test.pythoninfo output: output.txt
CPython versions tested on:
3.15
Operating systems tested on:
Linux
Linked PRs
Metadata
Metadata
Assignees
Labels
3.15new features, bugs and security fixesnew features, bugs and security fixestestsTests in the Lib/test dirTests in the Lib/test dirtopic-JITtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error