I routinely use on my Ubuntu machines pyenv and a script to install python versions:
test_struct fails in python3 -m test with python 3.14.2 (and 3.14.1) with this traceback:
0:18:03 load avg: 0.84 [387/491] test_struct
Exception in initializer:
Traceback (most recent call last):
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 88, in serialize_unbound
flag = _UNBOUND_CONSTANT_TO_FLAG[op]
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
KeyError: concurrent.interpreters._queues.UNBOUND
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker
ctx.initialize()
~~~~~~~~~~~~~~^^
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize
self.results = interpreters.create_queue(maxsize)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create
unbound = _serialize_unbound(unbounditems)
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound
return _crossinterp.serialize_unbound(unbound)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 90, in serialize_unbound
raise NotImplementedError(f'unsupported unbound replacement op {op!r}')
NotImplementedError: unsupported unbound replacement op concurrent.interpreters._queues.UNBOUND
Exception in initializer:
Traceback (most recent call last):
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 88, in serialize_unbound
flag = _UNBOUND_CONSTANT_TO_FLAG[op]
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
KeyError: concurrent.interpreters._queues.UNBOUND
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker
ctx.initialize()
~~~~~~~~~~~~~~^^
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize
self.results = interpreters.create_queue(maxsize)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create
unbound = _serialize_unbound(unbounditems)
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound
return _crossinterp.serialize_unbound(unbound)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 90, in serialize_unbound
raise NotImplementedError(f'unsupported unbound replacement op {op!r}')
NotImplementedError: unsupported unbound replacement op concurrent.interpreters._queues.UNBOUND
Exception in initializer:
Traceback (most recent call last):
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 88, in serialize_unbound
flag = _UNBOUND_CONSTANT_TO_FLAG[op]
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
KeyError: concurrent.interpreters._queues.UNBOUND
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker
ctx.initialize()
~~~~~~~~~~~~~~^^
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize
self.results = interpreters.create_queue(maxsize)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create
unbound = _serialize_unbound(unbounditems)
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound
return _crossinterp.serialize_unbound(unbound)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 90, in serialize_unbound
raise NotImplementedError(f'unsupported unbound replacement op {op!r}')
NotImplementedError: unsupported unbound replacement op concurrent.interpreters._queues.UNBOUND
Exception in initializer:
Traceback (most recent call last):
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 88, in serialize_unbound
flag = _UNBOUND_CONSTANT_TO_FLAG[op]
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
KeyError: concurrent.interpreters._queues.UNBOUND
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker
ctx.initialize()
~~~~~~~~~~~~~~^^
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize
self.results = interpreters.create_queue(maxsize)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create
unbound = _serialize_unbound(unbounditems)
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound
return _crossinterp.serialize_unbound(unbound)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 90, in serialize_unbound
raise NotImplementedError(f'unsupported unbound replacement op {op!r}')
NotImplementedError: unsupported unbound replacement op concurrent.interpreters._queues.UNBOUND
Exception in initializer:
Traceback (most recent call last):
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 88, in serialize_unbound
flag = _UNBOUND_CONSTANT_TO_FLAG[op]
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
KeyError: concurrent.interpreters._queues.UNBOUND
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker
ctx.initialize()
~~~~~~~~~~~~~~^^
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize
self.results = interpreters.create_queue(maxsize)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create
unbound = _serialize_unbound(unbounditems)
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound
return _crossinterp.serialize_unbound(unbound)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 90, in serialize_unbound
raise NotImplementedError(f'unsupported unbound replacement op {op!r}')
NotImplementedError: unsupported unbound replacement op concurrent.interpreters._queues.UNBOUND
test test_struct failed -- Traceback (most recent call last):
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/test/test_struct.py", line 818, in test_endian_table_init_subinterpreters
self.assertListEqual(list(results), [None] * 5)
~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/_base.py", line 639, in result_iterator
yield _result_or_cancel(fs.pop())
~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/_base.py", line 311, in _result_or_cancel
return fut.result(timeout)
~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/_base.py", line 450, in result
return self.__get_result()
~~~~~~~~~~~~~~~~~^^
File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result
raise self._exception
concurrent.futures.interpreter.BrokenInterpreterPool: A thread initializer failed, the thread pool is not usable anymore
0:18:04 load avg: 0.84 [387/491/1] test_struct failed (1 error)
Tested on Ubuntu 24.04 (gcc 14.2.0 - clang 21.1.8) and Ubuntu 20.04 (gcc 11.4.0), several CPUs.
Bug report
Bug description:
I routinely use on my Ubuntu machines pyenv and a script to install python versions:
Click to viewtest_struct fails in python3 -m test with python 3.14.2 (and 3.14.1) with this traceback:
Click to view0:18:03 load avg: 0.84 [387/491] test_struct Exception in initializer: Traceback (most recent call last): File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 88, in serialize_unbound flag = _UNBOUND_CONSTANT_TO_FLAG[op] ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^ KeyError: concurrent.interpreters._queues.UNBOUND During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker ctx.initialize() ~~~~~~~~~~~~~~^^ File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize self.results = interpreters.create_queue(maxsize) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create unbound = _serialize_unbound(unbounditems) File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound return _crossinterp.serialize_unbound(unbound) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 90, in serialize_unbound raise NotImplementedError(f'unsupported unbound replacement op {op!r}') NotImplementedError: unsupported unbound replacement op concurrent.interpreters._queues.UNBOUND Exception in initializer: Traceback (most recent call last): File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 88, in serialize_unbound flag = _UNBOUND_CONSTANT_TO_FLAG[op] ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^ KeyError: concurrent.interpreters._queues.UNBOUND During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker ctx.initialize() ~~~~~~~~~~~~~~^^ File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize self.results = interpreters.create_queue(maxsize) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create unbound = _serialize_unbound(unbounditems) File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound return _crossinterp.serialize_unbound(unbound) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 90, in serialize_unbound raise NotImplementedError(f'unsupported unbound replacement op {op!r}') NotImplementedError: unsupported unbound replacement op concurrent.interpreters._queues.UNBOUND Exception in initializer: Traceback (most recent call last): File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 88, in serialize_unbound flag = _UNBOUND_CONSTANT_TO_FLAG[op] ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^ KeyError: concurrent.interpreters._queues.UNBOUND During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker ctx.initialize() ~~~~~~~~~~~~~~^^ File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize self.results = interpreters.create_queue(maxsize) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create unbound = _serialize_unbound(unbounditems) File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound return _crossinterp.serialize_unbound(unbound) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 90, in serialize_unbound raise NotImplementedError(f'unsupported unbound replacement op {op!r}') NotImplementedError: unsupported unbound replacement op concurrent.interpreters._queues.UNBOUND Exception in initializer: Traceback (most recent call last): File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 88, in serialize_unbound flag = _UNBOUND_CONSTANT_TO_FLAG[op] ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^ KeyError: concurrent.interpreters._queues.UNBOUND During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker ctx.initialize() ~~~~~~~~~~~~~~^^ File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize self.results = interpreters.create_queue(maxsize) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create unbound = _serialize_unbound(unbounditems) File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound return _crossinterp.serialize_unbound(unbound) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 90, in serialize_unbound raise NotImplementedError(f'unsupported unbound replacement op {op!r}') NotImplementedError: unsupported unbound replacement op concurrent.interpreters._queues.UNBOUND Exception in initializer: Traceback (most recent call last): File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 88, in serialize_unbound flag = _UNBOUND_CONSTANT_TO_FLAG[op] ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^ KeyError: concurrent.interpreters._queues.UNBOUND During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker ctx.initialize() ~~~~~~~~~~~~~~^^ File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize self.results = interpreters.create_queue(maxsize) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create unbound = _serialize_unbound(unbounditems) File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound return _crossinterp.serialize_unbound(unbound) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 90, in serialize_unbound raise NotImplementedError(f'unsupported unbound replacement op {op!r}') NotImplementedError: unsupported unbound replacement op concurrent.interpreters._queues.UNBOUND test test_struct failed -- Traceback (most recent call last): File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/test/test_struct.py", line 818, in test_endian_table_init_subinterpreters self.assertListEqual(list(results), [None] * 5) ~~~~^^^^^^^^^ File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/_base.py", line 639, in result_iterator yield _result_or_cancel(fs.pop()) ~~~~~~~~~~~~~~~~~^^^^^^^^^^ File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/_base.py", line 311, in _result_or_cancel return fut.result(timeout) ~~~~~~~~~~^^^^^^^^^ File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/_base.py", line 450, in result return self.__get_result() ~~~~~~~~~~~~~~~~~^^ File "/home/usr00/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/_base.py", line 395, in __get_result raise self._exception concurrent.futures.interpreter.BrokenInterpreterPool: A thread initializer failed, the thread pool is not usable anymore 0:18:04 load avg: 0.84 [387/491/1] test_struct failed (1 error)Tested on Ubuntu 24.04 (gcc 14.2.0 - clang 21.1.8) and Ubuntu 20.04 (gcc 11.4.0), several CPUs.
python 3.14.0 and 3.13.x, bult in the same way, pass smoothly python3 -m test
CPython versions tested on:
3.14
Operating systems tested on:
Linux
Linked PRs