Repository navigation
./python -m test test_interpreters test_struct fails with: KeyError: concurrent.interpreters._queues.UNBOUND #142414
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Dec 8, 2025 - addedtestsTests in the Lib/test dirTests in the Lib/test dir
on Dec 8, 2025 Given your use of
-march=native, I think you need to share what it resolves to.All these 5 machines have python 3.14.0, at least one version of python 3.13.7 - 3.13.9 - 3.13.11, one machine has 3.6.15 as well.
python3 -m testhad problems with 3.14.1 (even segmentation fault with clang on 2 machines) and with 3.14.2test_structfails for any compiler/CPU.Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz - Ubuntu 24.04
clang -E - -march=native -###
Ubuntu clang version 21.1.8 (++20251202083326+f68f64eb8130-1~exp1~20251202083450.66) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm-21/bin (in-process) "/usr/lib/llvm-21/bin/clang" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-E" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "-" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=all" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "haswell" "-target-feature" "-prfchw" "-target-feature" "-cldemote" "-target-feature" "+avx" "-target-feature" "+aes" "-target-feature" "+sahf" "-target-feature" "+pclmul" "-target-feature" "-xop" "-target-feature" "+crc32" "-target-feature" "-amx-fp8" "-target-feature" "-xsaves" "-target-feature" "-avx512fp16" "-target-feature" "-usermsr" "-target-feature" "-sm4" "-target-feature" "-egpr" "-target-feature" "+sse4.1" "-target-feature" "-avx512ifma" "-target-feature" "+xsave" "-target-feature" "+sse4.2" "-target-feature" "-tsxldtrk" "-target-feature" "-sm3" "-target-feature" "-ptwrite" "-target-feature" "-widekl" "-target-feature" "-movrs" "-target-feature" "+invpcid" "-target-feature" "+64bit" "-target-feature" "-xsavec" "-target-feature" "-avx10.1-512" "-target-feature" "-avx512vpopcntdq" "-target-feature" "+cmov" "-target-feature" "-avx512vp2intersect" "-target-feature" "-avx512cd" "-target-feature" "+movbe" "-target-feature" "-avxvnniint8" "-target-feature" "-ccmp" "-target-feature" "-amx-int8" "-target-feature" "-kl" "-target-feature" "-avx10.1-256" "-target-feature" "-sha512" "-target-feature" "-avxvnni" "-target-feature" "-rtm" "-target-feature" "-adx" "-target-feature" "+avx2" "-target-feature" "-hreset" "-target-feature" "-movdiri" "-target-feature" "-serialize" "-target-feature" "-vpclmulqdq" "-target-feature" "-avx512vl" "-target-feature" "-uintr" "-target-feature" "-cf" "-target-feature" "-clflushopt" "-target-feature" "-raoint" "-target-feature" "-cmpccxadd" "-target-feature" "+bmi" "-target-feature" "-amx-tile" "-target-feature" "+sse" "-target-feature" "-avx10.2-256" "-target-feature" "-gfni" "-target-feature" "-avxvnniint16" "-target-feature" "-amx-fp16" "-target-feature" "-zu" "-target-feature" "-ndd" "-target-feature" "+xsaveopt" "-target-feature" "+rdrnd" "-target-feature" "-avx512f" "-target-feature" "-amx-bf16" "-target-feature" "-avx512bf16" "-target-feature" "-avx512vnni" "-target-feature" "-push2pop2" "-target-feature" "+cx8" "-target-feature" "-avx512bw" "-target-feature" "+sse3" "-target-feature" "-pku" "-target-feature" "-nf" "-target-feature" "-amx-tf32" "-target-feature" "-amx-avx512" "-target-feature" "+fsgsbase" "-target-feature" "-clzero" "-target-feature" "-mwaitx" "-target-feature" "-lwp" "-target-feature" "+lzcnt" "-target-feature" "-sha" "-target-feature" "-movdir64b" "-target-feature" "-ppx" "-target-feature" "-wbnoinvd" "-target-feature" "-enqcmd" "-target-feature" "-amx-transpose" "-target-feature" "-avx10.2-512" "-target-feature" "-avxneconvert" "-target-feature" "-tbm" "-target-feature" "-pconfig" "-target-feature" "-amx-complex" "-target-feature" "+ssse3" "-target-feature" "+cx16" "-target-feature" "+bmi2" "-target-feature" "+fma" "-target-feature" "+popcnt" "-target-feature" "-avxifma" "-target-feature" "+f16c" "-target-feature" "-avx512bitalg" "-target-feature" "-rdpru" "-target-feature" "-clwb" "-target-feature" "+mmx" "-target-feature" "+sse2" "-target-feature" "-rdseed" "-target-feature" "-avx512vbmi2" "-target-feature" "-prefetchi" "-target-feature" "-amx-movrs" "-target-feature" "-rdpid" "-target-feature" "-fma4" "-target-feature" "-avx512vbmi" "-target-feature" "-shstk" "-target-feature" "-vaes" "-target-feature" "-waitpkg" "-target-feature" "-sgx" "-target-feature" "+fxsr" "-target-feature" "-avx512dq" "-target-feature" "-sse4a" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/home/usr00/_gitea/torch-trainer" "-fcoverage-compilation-dir=/home/usr00/_gitea/torch-trainer" "-resource-dir" "/usr/lib/llvm-21/lib/clang/21" "-internal-isystem" "/usr/lib/llvm-21/lib/clang/21/include" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include" "-internal-externc-isystem" "/usr/include/x86_64-linux-gnu" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-ferror-limit" "19" "-fmessage-length=120" "-fgnuc-version=4.2.1" "-fskip-odr-check-in-gmf" "-fcolor-diagnostics" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "-" "-x" "c" "-"gcc -Q -march=native --help=target | grep -v "\[disabled\]"
The following options are target specific: -m128bit-long-double [enabled] -m64 [enabled] -m80387 [enabled] -mabi= sysv -mabm [enabled] -maddress-mode= long -maes [enabled] -malign-data= compat -malign-functions= 0 -malign-jumps= 0 -malign-loops= 0 -malign-stringops [enabled] -mapx-features= none -march= haswell -masm= att -mavx [enabled] -mavx10.1 -mavx10.1-256 -mavx2 [enabled] -mbmi [enabled] -mbmi2 [enabled] -mbranch-cost=<0,5> 3 -mcmodel= [default] -mcpu= -mcrc32 [enabled] -mcx16 [enabled] -mdirect-extern-access [enabled] -mf16c [enabled] -mfancy-math-387 [enabled] -mfentry-name= -mfentry-section= -mfma [enabled] -mfp-ret-in-387 [enabled] -mfpmath= sse -mfsgsbase [enabled] -mfunction-return= keep -mfused-madd -ffp-contract=fast -mfxsr [enabled] -mgather -mtune-ctrl=use_gather -mglibc [enabled] -mhard-float [enabled] -mharden-sls= none -mhle [enabled] -mieee-fp [enabled] -mincoming-stack-boundary= 0 -mindirect-branch= keep -minstrument-return= none -mintel-syntax -masm=intel -mlam= none -mlarge-data-threshold=<number> 65536 -mlong-double-80 [enabled] -mlzcnt [enabled] -mmemcpy-strategy= -mmemset-strategy= -mmmx [enabled] -mmovbe [enabled] -mmove-max= 256 -mmwait [enabled] -mpartial-vector-fp-math [enabled] -mpclmul [enabled] -mpopcnt [enabled] -mprefer-avx128 -mprefer-vector-width=128 -mprefer-vector-width= none -mpreferred-stack-boundary= 0 -mpush-args [enabled] -mrdrnd [enabled] -mrecip= -mred-zone [enabled] -mregparm= 6 -msahf [enabled] -mscatter -mtune-ctrl=use_scatter -msse [enabled] -msse2 [enabled] -msse3 [enabled] -msse4 [enabled] -msse4.1 [enabled] -msse4.2 [enabled] -msse5 -mavx -mssse3 [enabled] -mstack-protector-guard-offset= -mstack-protector-guard-reg= -mstack-protector-guard-symbol= -mstack-protector-guard= tls -mstore-max= 256 -mstringop-strategy= [default] -mstv [enabled] -mtls-dialect= gnu -mtls-direct-seg-refs [enabled] -mtune-ctrl= -mtune= haswell -mveclibabi= [default] -mxsave [enabled] -mxsaveopt [enabled] Known assembler dialects (for use with the -masm= option): att intel Known ABIs (for use with the -mabi= option): ms sysv Known code models (for use with the -mcmodel= option): 32 kernel large medium small Valid arguments to -mfpmath=: 387 387+sse 387,sse both sse sse+387 sse,387 Known choices for mitigation against straight line speculation with -mharden-sls=: all indirect-jmp none return Known indirect branch choices (for use with the -mindirect-branch=/-mfunction-return= options): keep thunk thunk-extern thunk-inline Known choices for return instrumentation with -minstrument-return=: call none nop5 Known data alignment choices (for use with the -malign-data= option): abi cacheline compat Known vectorization library ABIs (for use with the -mveclibabi= option): acml svml Known address mode (for use with the -maddress-mode= option): long short Known preferred register vector length (to use with the -mprefer-vector-width= option): 128 256 512 none Known stack protector guard (for use with the -mstack-protector-guard= option): global tls Valid arguments to -mstringop-strategy=: byte_loop libcall loop rep_4byte rep_8byte rep_byte unrolled_loop vector_loop Known TLS dialects (for use with the -mtls-dialect= option): gnu gnu2 Known valid arguments for -march= option: i386 i486 i586 pentium lakemont pentium-mmx winchip-c6 winchip2 c3 samuel-2 c3-2 nehemiah c7 esther i686 pentiumpro pentium2 pentium3 pentium3m pentium-m pentium4 pentium4m prescott nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client rocketlake icelake-server cascadelake tigerlake cooperlake sapphirerapids emeraldrapids alderlake raptorlake meteorlake graniterapids graniterapids-d arrowlake arrowlake-s lunarlake pantherlake bonnell atom silvermont slm goldmont goldmont-plus tremont gracemont sierraforest grandridge clearwaterforest knl knm intel geode k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp athlon-mp x86-64 x86-64-v2 x86-64-v3 x86-64-v4 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 lujiazui yongfeng k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 znver3 znver4 znver5 btver1 btver2 generic native Known valid arguments for -mtune= option: generic i386 i486 pentium lakemont pentiumpro pentium4 nocona core2 nehalem sandybridge haswell bonnell silvermont goldmont goldmont-plus tremont sierraforest grandridge clearwaterforest knl knm skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake sapphirerapids alderlake rocketlake graniterapids graniterapids-d arrowlake arrowlake-s pantherlake intel lujiazui yongfeng geode k6 athlon k8 amdfam10 bdver1 bdver2 bdver3 bdver4 btver1 btver2 znver1 znver2 znver3 znver4 znver5AMD Ryzen 7 PRO 7840U w/ Radeon 780M Graphics - Ubuntu 24.04
clang -E - -march=native -###
Ubuntu clang version 21.1.8 (++20251202083326+f68f64eb8130-1~exp1~20251202083450.66) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm-21/bin (in-process) "/usr/lib/llvm-21/bin/clang" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-E" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "-" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=all" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "znver4" "-target-feature" "+prfchw" "-target-feature" "-cldemote" "-target-feature" "+avx" "-target-feature" "+aes" "-target-feature" "+sahf" "-target-feature" "+pclmul" "-target-feature" "-xop" "-target-feature" "+crc32" "-target-feature" "-amx-fp8" "-target-feature" "+xsaves" "-target-feature" "-avx512fp16" "-target-feature" "-usermsr" "-target-feature" "-sm4" "-target-feature" "-egpr" "-target-feature" "+sse4.1" "-target-feature" "+avx512ifma" "-target-feature" "+xsave" "-target-feature" "+sse4.2" "-target-feature" "-tsxldtrk" "-target-feature" "-sm3" "-target-feature" "-ptwrite" "-target-feature" "-widekl" "-target-feature" "-movrs" "-target-feature" "+invpcid" "-target-feature" "+64bit" "-target-feature" "+xsavec" "-target-feature" "-avx10.1-512" "-target-feature" "+avx512vpopcntdq" "-target-feature" "+cmov" "-target-feature" "-avx512vp2intersect" "-target-feature" "+avx512cd" "-target-feature" "+movbe" "-target-feature" "-avxvnniint8" "-target-feature" "-ccmp" "-target-feature" "-amx-int8" "-target-feature" "-kl" "-target-feature" "-avx10.1-256" "-target-feature" "+evex512" "-target-feature" "-avxvnni" "-target-feature" "-rtm" "-target-feature" "+adx" "-target-feature" "+avx2" "-target-feature" "-hreset" "-target-feature" "-movdiri" "-target-feature" "-serialize" "-target-feature" "-sha512" "-target-feature" "+vpclmulqdq" "-target-feature" "+avx512vl" "-target-feature" "-uintr" "-target-feature" "-cf" "-target-feature" "+clflushopt" "-target-feature" "-raoint" "-target-feature" "-cmpccxadd" "-target-feature" "+bmi" "-target-feature" "-amx-tile" "-target-feature" "+sse" "-target-feature" "-avx10.2-256" "-target-feature" "+gfni" "-target-feature" "-avxvnniint16" "-target-feature" "-amx-fp16" "-target-feature" "-zu" "-target-feature" "-ndd" "-target-feature" "+xsaveopt" "-target-feature" "+rdrnd" "-target-feature" "+avx512f" "-target-feature" "-amx-bf16" "-target-feature" "+avx512bf16" "-target-feature" "+avx512vnni" "-target-feature" "-push2pop2" "-target-feature" "+cx8" "-target-feature" "+avx512bw" "-target-feature" "+sse3" "-target-feature" "-pku" "-target-feature" "-nf" "-target-feature" "-amx-tf32" "-target-feature" "-amx-avx512" "-target-feature" "+fsgsbase" "-target-feature" "+clzero" "-target-feature" "-mwaitx" "-target-feature" "-lwp" "-target-feature" "+lzcnt" "-target-feature" "+sha" "-target-feature" "-movdir64b" "-target-feature" "-ppx" "-target-feature" "-wbnoinvd" "-target-feature" "-enqcmd" "-target-feature" "-amx-transpose" "-target-feature" "-avx10.2-512" "-target-feature" "-avxneconvert" "-target-feature" "-tbm" "-target-feature" "-pconfig" "-target-feature" "-amx-complex" "-target-feature" "+ssse3" "-target-feature" "+cx16" "-target-feature" "+bmi2" "-target-feature" "+fma" "-target-feature" "+popcnt" "-target-feature" "-avxifma" "-target-feature" "+f16c" "-target-feature" "+avx512bitalg" "-target-feature" "-rdpru" "-target-feature" "+clwb" "-target-feature" "+mmx" "-target-feature" "+sse2" "-target-feature" "+rdseed" "-target-feature" "+avx512vbmi2" "-target-feature" "-prefetchi" "-target-feature" "-amx-movrs" "-target-feature" "+rdpid" "-target-feature" "-fma4" "-target-feature" "+avx512vbmi" "-target-feature" "+shstk" "-target-feature" "+vaes" "-target-feature" "-waitpkg" "-target-feature" "-sgx" "-target-feature" "+fxsr" "-target-feature" "+avx512dq" "-target-feature" "+sse4a" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/home/usr00" "-fcoverage-compilation-dir=/home/usr00" "-resource-dir" "/usr/lib/llvm-21/lib/clang/21" "-internal-isystem" "/usr/lib/llvm-21/lib/clang/21/include" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include" "-internal-externc-isystem" "/usr/include/x86_64-linux-gnu" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-ferror-limit" "19" "-fmessage-length=120" "-fgnuc-version=4.2.1" "-fskip-odr-check-in-gmf" "-fcolor-diagnostics" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "-" "-x" "c" "-"gcc -Q -march=native --help=target | grep -v "\[disabled\]"
The following options are target specific: -m128bit-long-double [enabled] -m64 [enabled] -m80387 [enabled] -mabi= sysv -mabm [enabled] -maddress-mode= long -madx [enabled] -maes [enabled] -malign-data= compat -malign-functions= 0 -malign-jumps= 0 -malign-loops= 0 -malign-stringops [enabled] -mapx-features= none -march= znver4 -masm= att -mavx [enabled] -mavx10.1 -mavx10.1-256 -mavx2 [enabled] -mavx512bf16 [enabled] -mavx512bitalg [enabled] -mavx512bw [enabled] -mavx512cd [enabled] -mavx512dq [enabled] -mavx512f [enabled] -mavx512ifma [enabled] -mavx512vbmi [enabled] -mavx512vbmi2 [enabled] -mavx512vl [enabled] -mavx512vnni [enabled] -mavx512vpopcntdq [enabled] -mbmi [enabled] -mbmi2 [enabled] -mbranch-cost=<0,5> 3 -mclflushopt [enabled] -mclwb [enabled] -mclzero [enabled] -mcmodel= [default] -mcpu= -mcrc32 [enabled] -mcx16 [enabled] -mdirect-extern-access [enabled] -mevex512 [enabled] -mf16c [enabled] -mfancy-math-387 [enabled] -mfentry-name= -mfentry-section= -mfma [enabled] -mfp-ret-in-387 [enabled] -mfpmath= sse -mfsgsbase [enabled] -mfunction-return= keep -mfused-madd -ffp-contract=fast -mfxsr [enabled] -mgather -mtune-ctrl=use_gather -mgfni [enabled] -mglibc [enabled] -mhard-float [enabled] -mharden-sls= none -mieee-fp [enabled] -mincoming-stack-boundary= 0 -mindirect-branch= keep -minstrument-return= none -mintel-syntax -masm=intel -mlam= none -mlarge-data-threshold=<number> 65536 -mlong-double-80 [enabled] -mlzcnt [enabled] -mmemcpy-strategy= -mmemset-strategy= -mmmx [enabled] -mmovbe [enabled] -mmove-max= 512 -mmwait [enabled] -mpartial-vector-fp-math [enabled] -mpclmul [enabled] -mpopcnt [enabled] -mprefer-avx128 -mprefer-vector-width=128 -mprefer-vector-width= none -mpreferred-stack-boundary= 0 -mprfchw [enabled] -mpush-args [enabled] -mrdpid [enabled] -mrdrnd [enabled] -mrdseed [enabled] -mrecip= -mred-zone [enabled] -mregparm= 6 -msahf [enabled] -mscatter -mtune-ctrl=use_scatter -msha [enabled] -mshstk [enabled] -msse [enabled] -msse2 [enabled] -msse3 [enabled] -msse4 [enabled] -msse4.1 [enabled] -msse4.2 [enabled] -msse4a [enabled] -msse5 -mavx -mssse3 [enabled] -mstack-protector-guard-offset= -mstack-protector-guard-reg= -mstack-protector-guard-symbol= -mstack-protector-guard= tls -mstore-max= 512 -mstringop-strategy= [default] -mstv [enabled] -mtls-dialect= gnu -mtls-direct-seg-refs [enabled] -mtune-ctrl= -mtune= znver4 -mvaes [enabled] -mveclibabi= [default] -mvpclmulqdq [enabled] -mxsave [enabled] -mxsavec [enabled] -mxsaveopt [enabled] -mxsaves [enabled] Known assembler dialects (for use with the -masm= option): att intel Known ABIs (for use with the -mabi= option): ms sysv Known code models (for use with the -mcmodel= option): 32 kernel large medium small Valid arguments to -mfpmath=: 387 387+sse 387,sse both sse sse+387 sse,387 Known choices for mitigation against straight line speculation with -mharden-sls=: all indirect-jmp none return Known indirect branch choices (for use with the -mindirect-branch=/-mfunction-return= options): keep thunk thunk-extern thunk-inline Known choices for return instrumentation with -minstrument-return=: call none nop5 Known data alignment choices (for use with the -malign-data= option): abi cacheline compat Known vectorization library ABIs (for use with the -mveclibabi= option): acml svml Known address mode (for use with the -maddress-mode= option): long short Known preferred register vector length (to use with the -mprefer-vector-width= option): 128 256 512 none Known stack protector guard (for use with the -mstack-protector-guard= option): global tls Valid arguments to -mstringop-strategy=: byte_loop libcall loop rep_4byte rep_8byte rep_byte unrolled_loop vector_loop Known TLS dialects (for use with the -mtls-dialect= option): gnu gnu2 Known valid arguments for -march= option: i386 i486 i586 pentium lakemont pentium-mmx winchip-c6 winchip2 c3 samuel-2 c3-2 nehemiah c7 esther i686 pentiumpro pentium2 pentium3 pentium3m pentium-m pentium4 pentium4m prescott nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client rocketlake icelake-server cascadelake tigerlake cooperlake sapphirerapids emeraldrapids alderlake raptorlake meteorlake graniterapids graniterapids-d arrowlake arrowlake-s lunarlake pantherlake bonnell atom silvermont slm goldmont goldmont-plus tremont gracemont sierraforest grandridge clearwaterforest knl knm intel geode k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp athlon-mp x86-64 x86-64-v2 x86-64-v3 x86-64-v4 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 lujiazui yongfeng k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 znver3 znver4 znver5 btver1 btver2 generic native Known valid arguments for -mtune= option: generic i386 i486 pentium lakemont pentiumpro pentium4 nocona core2 nehalem sandybridge haswell bonnell silvermont goldmont goldmont-plus tremont sierraforest grandridge clearwaterforest knl knm skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake sapphirerapids alderlake rocketlake graniterapids graniterapids-d arrowlake arrowlake-s pantherlake intel lujiazui yongfeng geode k6 athlon k8 amdfam10 bdver1 bdver2 bdver3 bdver4 btver1 btver2 znver1 znver2 znver3 znver4 znver5Intel(R) Xeon(R) CPU E3-1245 V2 @ 3.40GHz - Ubuntu 20.04
gcc -Q -march=native --help=target | grep -v "\[disabled\]"
The following options are target specific: -m128bit-long-double [enabled] -m64 [enabled] -m80387 [enabled] -mabi= sysv -maddress-mode= long -maes [enabled] -malign-data= compat -malign-functions= 0 -malign-jumps= 0 -malign-loops= 0 -malign-stringops [enabled] -march= ivybridge -masm= att -mavx [enabled] -mavx256-split-unaligned-load [enabled] -mavx256-split-unaligned-store [enabled] -mbranch-cost=<0,5> 3 -mcmodel= [default] -mcpu= -mcrc32 [enabled] -mcx16 [enabled] -mf16c [enabled] -mfancy-math-387 [enabled] -mfentry-name= -mfentry-section= -mfp-ret-in-387 [enabled] -mfpmath= sse -mfsgsbase [enabled] -mfunction-return= keep -mfused-madd -ffp-contract=fast -mfxsr [enabled] -mglibc [enabled] -mhard-float [enabled] -mharden-sls= none -mieee-fp [enabled] -mincoming-stack-boundary= 0 -mindirect-branch= keep -minstrument-return= none -mintel-syntax -masm=intel -mlarge-data-threshold=<number> 65536 -mlong-double-80 [enabled] -mmemcpy-strategy= -mmemset-strategy= -mmmx [enabled] -mmwait [enabled] -mpclmul [enabled] -mpopcnt [enabled] -mprefer-avx128 -mprefer-vector-width=128 -mprefer-vector-width= none -mpreferred-stack-boundary= 0 -mpush-args [enabled] -mrdrnd [enabled] -mrecip= -mred-zone [enabled] -mregparm= 6 -msahf [enabled] -msse [enabled] -msse2 [enabled] -msse3 [enabled] -msse4 [enabled] -msse4.1 [enabled] -msse4.2 [enabled] -msse5 -mavx -mssse3 [enabled] -mstack-protector-guard-offset= -mstack-protector-guard-reg= -mstack-protector-guard-symbol= -mstack-protector-guard= tls -mstringop-strategy= [default] -mstv [enabled] -mtls-dialect= gnu -mtls-direct-seg-refs [enabled] -mtune-ctrl= -mtune= ivybridge -mveclibabi= [default] -mvzeroupper [enabled] -mxsave [enabled] -mxsaveopt [enabled] Known assembler dialects (for use with the -masm= option): att intel Known ABIs (for use with the -mabi= option): ms sysv Known code models (for use with the -mcmodel= option): 32 kernel large medium small Valid arguments to -mfpmath=: 387 387+sse 387,sse both sse sse+387 sse,387 Known choices for mitigation against straight line speculation with -mharden-s ls=: all indirect-jmp none return Known indirect branch choices (for use with the -mindirect-branch=/-mfunction- return= options): keep thunk thunk-extern thunk-inline Known choices for return instrumentation with -minstrument-return=: call none nop5 Known data alignment choices (for use with the -malign-data= option): abi cacheline compat Known vectorization library ABIs (for use with the -mveclibabi= option): acml svml Known address mode (for use with the -maddress-mode= option): long short Known preferred register vector length (to use with the -mprefer-vector-width= option): 128 256 512 none Known stack protector guard (for use with the -mstack-protector-guard= option) : global tls Valid arguments to -mstringop-strategy=: byte_loop libcall loop rep_4byte rep_8byte rep_byte unrolled_loop vector_loop Known TLS dialects (for use with the -mtls-dialect= option): gnu gnu2 Known valid arguments for -march= option: i386 i486 i586 pentium lakemont pentium-mmx winchip-c6 winchip2 c3 samuel-2 c3-2 nehemiah c7 esther i686 pentiumpro pentium2 pentium3 pentium3m pentium-m pe ntium4 pentium4m prescott nocona core2 nehalem corei7 westmere sandybridge corei 7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 ca nnonlake icelake-client rocketlake icelake-server cascadelake tigerlake cooperla ke sapphirerapids alderlake bonnell atom silvermont slm goldmont goldmont-plus t remont knl knm intel geode k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp a thlon-mp x86-64 x86-64-v2 x86-64-v3 x86-64-v4 eden-x2 nano nano-1000 nano-2000 n ano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon 64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 z nver3 btver1 btver2 generic native Known valid arguments for -mtune= option: generic i386 i486 pentium lakemont pentiumpro pentium4 nocona core2 nehalem sandybridge haswell bonnell silvermont goldmont goldmont-plus tremont knl knm sk ylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerl ake cooperlake sapphirerapids alderlake rocketlake intel geode k6 athlon k8 amdf am10 bdver1 bdver2 bdver3 bdver4 btver1 btver2 znver1 znver2 znver3Intel(R) Xeon(R) E-2234 CPU @ 3.60GHz - Ubuntu 24.04
clang -E - -march=native -###
Ubuntu clang version 21.1.8 (++20251202083326+f68f64eb8130-1~exp1~20251202083450.66) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm-21/bin (in-process) "/usr/lib/llvm-21/bin/clang" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-E" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "-" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=all" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "skylake" "-target-feature" "+prfchw" "-target-feature" "-cldemote" "-target-feature" "+avx" "-target-feature" "+aes" "-target-feature" "+sahf" "-target-feature" "+pclmul" "-target-feature" "-xop" "-target-feature" "+crc32" "-target-feature" "-amx-fp8" "-target-feature" "+xsaves" "-target-feature" "-avx512fp16" "-target-feature" "-usermsr" "-target-feature" "-sm4" "-target-feature" "-egpr" "-target-feature" "+sse4.1" "-target-feature" "-avx512ifma" "-target-feature" "+xsave" "-target-feature" "+sse4.2" "-target-feature" "-tsxldtrk" "-target-feature" "-sm3" "-target-feature" "-ptwrite" "-target-feature" "-widekl" "-target-feature" "-movrs" "-target-feature" "+invpcid" "-target-feature" "+64bit" "-target-feature" "+xsavec" "-target-feature" "-avx10.1-512" "-target-feature" "-avx512vpopcntdq" "-target-feature" "+cmov" "-target-feature" "-avx512vp2intersect" "-target-feature" "-avx512cd" "-target-feature" "+movbe" "-target-feature" "-avxvnniint8" "-target-feature" "-ccmp" "-target-feature" "-amx-int8" "-target-feature" "-kl" "-target-feature" "-avx10.1-256" "-target-feature" "-sha512" "-target-feature" "-avxvnni" "-target-feature" "-rtm" "-target-feature" "+adx" "-target-feature" "+avx2" "-target-feature" "-hreset" "-target-feature" "-movdiri" "-target-feature" "-serialize" "-target-feature" "-vpclmulqdq" "-target-feature" "-avx512vl" "-target-feature" "-uintr" "-target-feature" "-cf" "-target-feature" "+clflushopt" "-target-feature" "-raoint" "-target-feature" "-cmpccxadd" "-target-feature" "+bmi" "-target-feature" "-amx-tile" "-target-feature" "+sse" "-target-feature" "-avx10.2-256" "-target-feature" "-gfni" "-target-feature" "-avxvnniint16" "-target-feature" "-amx-fp16" "-target-feature" "-zu" "-target-feature" "-ndd" "-target-feature" "+xsaveopt" "-target-feature" "+rdrnd" "-target-feature" "-avx512f" "-target-feature" "-amx-bf16" "-target-feature" "-avx512bf16" "-target-feature" "-avx512vnni" "-target-feature" "-push2pop2" "-target-feature" "+cx8" "-target-feature" "-avx512bw" "-target-feature" "+sse3" "-target-feature" "-pku" "-target-feature" "-nf" "-target-feature" "-amx-tf32" "-target-feature" "-amx-avx512" "-target-feature" "+fsgsbase" "-target-feature" "-clzero" "-target-feature" "-mwaitx" "-target-feature" "-lwp" "-target-feature" "+lzcnt" "-target-feature" "-sha" "-target-feature" "-movdir64b" "-target-feature" "-ppx" "-target-feature" "-wbnoinvd" "-target-feature" "-enqcmd" "-target-feature" "-amx-transpose" "-target-feature" "-avx10.2-512" "-target-feature" "-avxneconvert" "-target-feature" "-tbm" "-target-feature" "-pconfig" "-target-feature" "-amx-complex" "-target-feature" "+ssse3" "-target-feature" "+cx16" "-target-feature" "+bmi2" "-target-feature" "+fma" "-target-feature" "+popcnt" "-target-feature" "-avxifma" "-target-feature" "+f16c" "-target-feature" "-avx512bitalg" "-target-feature" "-rdpru" "-target-feature" "-clwb" "-target-feature" "+mmx" "-target-feature" "+sse2" "-target-feature" "+rdseed" "-target-feature" "-avx512vbmi2" "-target-feature" "-prefetchi" "-target-feature" "-amx-movrs" "-target-feature" "-rdpid" "-target-feature" "-fma4" "-target-feature" "-avx512vbmi" "-target-feature" "-shstk" "-target-feature" "-vaes" "-target-feature" "-waitpkg" "-target-feature" "-sgx" "-target-feature" "+fxsr" "-target-feature" "-avx512dq" "-target-feature" "-sse4a" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/home/usr00" "-fcoverage-compilation-dir=/home/usr00" "-resource-dir" "/usr/lib/llvm-21/lib/clang/21" "-internal-isystem" "/usr/lib/llvm-21/lib/clang/21/include" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include" "-internal-externc-isystem" "/usr/include/x86_64-linux-gnu" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-ferror-limit" "19" "-fmessage-length=237" "-fgnuc-version=4.2.1" "-fskip-odr-check-in-gmf" "-fcolor-diagnostics" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "-" "-x" "c" "-"gcc -Q -march=native --help=target | grep -v "\[disabled\]"
The following options are target specific: -m128bit-long-double [enabled] -m64 [enabled] -m80387 [enabled] -mabi= sysv -mabm [enabled] -maddress-mode= long -madx [enabled] -maes [enabled] -malign-data= compat -malign-functions= 0 -malign-jumps= 0 -malign-loops= 0 -malign-stringops [enabled] -mapx-features= none -march= skylake -masm= att -mavx [enabled] -mavx10.1 -mavx10.1-256 -mavx2 [enabled] -mbmi [enabled] -mbmi2 [enabled] -mbranch-cost=<0,5> 3 -mclflushopt [enabled] -mcmodel= [default] -mcpu= -mcrc32 [enabled] -mcx16 [enabled] -mdirect-extern-access [enabled] -mf16c [enabled] -mfancy-math-387 [enabled] -mfentry-name= -mfentry-section= -mfma [enabled] -mfp-ret-in-387 [enabled] -mfpmath= sse -mfsgsbase [enabled] -mfunction-return= keep -mfused-madd -ffp-contract=fast -mfxsr [enabled] -mgather -mtune-ctrl=use_gather -mglibc [enabled] -mhard-float [enabled] -mharden-sls= none -mhle [enabled] -mieee-fp [enabled] -mincoming-stack-boundary= 0 -mindirect-branch= keep -minstrument-return= none -mintel-syntax -masm=intel -mlam= none -mlarge-data-threshold=<number> 65536 -mlong-double-80 [enabled] -mlzcnt [enabled] -mmemcpy-strategy= -mmemset-strategy= -mmmx [enabled] -mmovbe [enabled] -mmove-max= 256 -mmwait [enabled] -mpartial-vector-fp-math [enabled] -mpclmul [enabled] -mpopcnt [enabled] -mprefer-avx128 -mprefer-vector-width=128 -mprefer-vector-width= none -mpreferred-stack-boundary= 0 -mprfchw [enabled] -mpush-args [enabled] -mrdrnd [enabled] -mrdseed [enabled] -mrecip= -mred-zone [enabled] -mregparm= 6 -msahf [enabled] -mscatter -mtune-ctrl=use_scatter -msse [enabled] -msse2 [enabled] -msse3 [enabled] -msse4 [enabled] -msse4.1 [enabled] -msse4.2 [enabled] -msse5 -mavx -mssse3 [enabled] -mstack-protector-guard-offset= -mstack-protector-guard-reg= -mstack-protector-guard-symbol= -mstack-protector-guard= tls -mstore-max= 256 -mstringop-strategy= [default] -mstv [enabled] -mtls-dialect= gnu -mtls-direct-seg-refs [enabled] -mtune-ctrl= -mtune= skylake -mveclibabi= [default] -mxsave [enabled] -mxsavec [enabled] -mxsaveopt [enabled] -mxsaves [enabled] Known assembler dialects (for use with the -masm= option): att intel Known ABIs (for use with the -mabi= option): ms sysv Known code models (for use with the -mcmodel= option): 32 kernel large medium small Valid arguments to -mfpmath=: 387 387+sse 387,sse both sse sse+387 sse,387 Known choices for mitigation against straight line speculation with -mharden-sls=: all indirect-jmp none return Known indirect branch choices (for use with the -mindirect-branch=/-mfunction-return= options): keep thunk thunk-extern thunk-inline Known choices for return instrumentation with -minstrument-return=: call none nop5 Known data alignment choices (for use with the -malign-data= option): abi cacheline compat Known vectorization library ABIs (for use with the -mveclibabi= option): acml svml Known address mode (for use with the -maddress-mode= option): long short Known preferred register vector length (to use with the -mprefer-vector-width= option): 128 256 512 none Known stack protector guard (for use with the -mstack-protector-guard= option): global tls Valid arguments to -mstringop-strategy=: byte_loop libcall loop rep_4byte rep_8byte rep_byte unrolled_loop vector_loop Known TLS dialects (for use with the -mtls-dialect= option): gnu gnu2 Known valid arguments for -march= option: i386 i486 i586 pentium lakemont pentium-mmx winchip-c6 winchip2 c3 samuel-2 c3-2 nehemiah c7 esther i686 pentiumpro pentium2 pentium3 pentium3m pentium-m pentium4 pentium4m prescott nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client rocketlake icelake-server cascadelake tigerlake cooperlake sapphirerapids emeraldrapids alderlake raptorlake meteorlake graniterapids graniterapids-d arrowlake arrowlake-s lunarlake pantherlake bonnell atom silvermont slm goldmont goldmont-plus tremont gracemont sierraforest grandridge clearwaterforest knl knm intel geode k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp athlon-mp x86-64 x86-64-v2 x86-64-v3 x86-64-v4 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 lujiazui yongfeng k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 znver3 znver4 znver5 btver1 btver2 generic native Known valid arguments for -mtune= option: generic i386 i486 pentium lakemont pentiumpro pentium4 nocona core2 nehalem sandybridge haswell bonnell silvermont goldmont goldmont-plus tremont sierraforest grandridge clearwaterforest knl knm skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake sapphirerapids alderlake rocketlake graniterapids graniterapids-d arrowlake arrowlake-s pantherlake intel lujiazui yongfeng geode k6 athlon k8 amdfam10 bdver1 bdver2 bdver3 bdver4 btver1 btver2 znver1 znver2 znver3 znver4 znver5Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz - Ubuntu 24.04
clang -E - -march=native -###
Ubuntu clang version 21.1.8 (++20251202083326+f68f64eb8130-1~exp1~20251202083450.66) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm-21/bin (in-process) "/usr/lib/llvm-21/bin/clang" "-cc1" "-triple" "x86_64-pc-linux-gnu" "-E" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "-" "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie" "-mframe-pointer=all" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" "ivybridge" "-target-feature" "-prfchw" "-target-feature" "-cldemote" "-target-feature" "+avx" "-target-feature" "+aes" "-target-feature" "+sahf" "-target-feature" "+pclmul" "-target-feature" "-xop" "-target-feature" "+crc32" "-target-feature" "-amx-fp8" "-target-feature" "-xsaves" "-target-feature" "-avx512fp16" "-target-feature" "-usermsr" "-target-feature" "-sm4" "-target-feature" "-egpr" "-target-feature" "+sse4.1" "-target-feature" "-avx512ifma" "-target-feature" "+xsave" "-target-feature" "+sse4.2" "-target-feature" "-tsxldtrk" "-target-feature" "-sm3" "-target-feature" "-ptwrite" "-target-feature" "-widekl" "-target-feature" "-movrs" "-target-feature" "-invpcid" "-target-feature" "+64bit" "-target-feature" "-xsavec" "-target-feature" "-avx10.1-512" "-target-feature" "-avx512vpopcntdq" "-target-feature" "+cmov" "-target-feature" "-avx512vp2intersect" "-target-feature" "-avx512cd" "-target-feature" "-movbe" "-target-feature" "-avxvnniint8" "-target-feature" "-ccmp" "-target-feature" "-amx-int8" "-target-feature" "-kl" "-target-feature" "-avx10.1-256" "-target-feature" "-sha512" "-target-feature" "-avxvnni" "-target-feature" "-rtm" "-target-feature" "-adx" "-target-feature" "-avx2" "-target-feature" "-hreset" "-target-feature" "-movdiri" "-target-feature" "-serialize" "-target-feature" "-vpclmulqdq" "-target-feature" "-avx512vl" "-target-feature" "-uintr" "-target-feature" "-cf" "-target-feature" "-clflushopt" "-target-feature" "-raoint" "-target-feature" "-cmpccxadd" "-target-feature" "-bmi" "-target-feature" "-amx-tile" "-target-feature" "+sse" "-target-feature" "-avx10.2-256" "-target-feature" "-gfni" "-target-feature" "-avxvnniint16" "-target-feature" "-amx-fp16" "-target-feature" "-zu" "-target-feature" "-ndd" "-target-feature" "+xsaveopt" "-target-feature" "+rdrnd" "-target-feature" "-avx512f" "-target-feature" "-amx-bf16" "-target-feature" "-avx512bf16" "-target-feature" "-avx512vnni" "-target-feature" "-push2pop2" "-target-feature" "+cx8" "-target-feature" "-avx512bw" "-target-feature" "+sse3" "-target-feature" "-pku" "-target-feature" "-nf" "-target-feature" "-amx-tf32" "-target-feature" "-amx-avx512" "-target-feature" "+fsgsbase" "-target-feature" "-clzero" "-target-feature" "-mwaitx" "-target-feature" "-lwp" "-target-feature" "-lzcnt" "-target-feature" "-sha" "-target-feature" "-movdir64b" "-target-feature" "-ppx" "-target-feature" "-wbnoinvd" "-target-feature" "-enqcmd" "-target-feature" "-amx-transpose" "-target-feature" "-avx10.2-512" "-target-feature" "-avxneconvert" "-target-feature" "-tbm" "-target-feature" "-pconfig" "-target-feature" "-amx-complex" "-target-feature" "+ssse3" "-target-feature" "+cx16" "-target-feature" "-bmi2" "-target-feature" "-fma" "-target-feature" "+popcnt" "-target-feature" "-avxifma" "-target-feature" "+f16c" "-target-feature" "-avx512bitalg" "-target-feature" "-rdpru" "-target-feature" "-clwb" "-target-feature" "+mmx" "-target-feature" "+sse2" "-target-feature" "-rdseed" "-target-feature" "-avx512vbmi2" "-target-feature" "-prefetchi" "-target-feature" "-amx-movrs" "-target-feature" "-rdpid" "-target-feature" "-fma4" "-target-feature" "-avx512vbmi" "-target-feature" "-shstk" "-target-feature" "-vaes" "-target-feature" "-waitpkg" "-target-feature" "-sgx" "-target-feature" "+fxsr" "-target-feature" "-avx512dq" "-target-feature" "-sse4a" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/home/usr00/_rust/guessing_game" "-fcoverage-compilation-dir=/home/usr00/_rust/guessing_game" "-resource-dir" "/usr/lib/llvm-21/lib/clang/21" "-internal-isystem" "/usr/lib/llvm-21/lib/clang/21/include" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/usr/lib/gcc/x86_64-linux-gnu/14/../../../../x86_64-linux-gnu/include" "-internal-externc-isystem" "/usr/include/x86_64-linux-gnu" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-ferror-limit" "19" "-fmessage-length=120" "-fgnuc-version=4.2.1" "-fskip-odr-check-in-gmf" "-fcolor-diagnostics" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "-" "-x" "c" "-"gcc -Q -march=native --help=target | grep -v "\[disabled\]"
The following options are target specific: -m128bit-long-double [enabled] -m64 [enabled] -m80387 [enabled] -mabi= sysv -maddress-mode= long -maes [enabled] -malign-data= compat -malign-functions= 0 -malign-jumps= 0 -malign-loops= 0 -malign-stringops [enabled] -mapx-features= none -march= ivybridge -masm= att -mavx [enabled] -mavx10.1 -mavx10.1-256 -mavx256-split-unaligned-load [enabled] -mavx256-split-unaligned-store [enabled] -mbranch-cost=<0,5> 3 -mcmodel= [default] -mcpu= -mcrc32 [enabled] -mcx16 [enabled] -mdirect-extern-access [enabled] -mf16c [enabled] -mfancy-math-387 [enabled] -mfentry-name= -mfentry-section= -mfp-ret-in-387 [enabled] -mfpmath= sse -mfsgsbase [enabled] -mfunction-return= keep -mfused-madd -ffp-contract=fast -mfxsr [enabled] -mgather -mtune-ctrl=use_gather -mglibc [enabled] -mhard-float [enabled] -mharden-sls= none -mieee-fp [enabled] -mincoming-stack-boundary= 0 -mindirect-branch= keep -minstrument-return= none -mintel-syntax -masm=intel -mlam= none -mlarge-data-threshold=<number> 65536 -mlong-double-80 [enabled] -mmemcpy-strategy= -mmemset-strategy= -mmmx [enabled] -mmove-max= 256 -mmwait [enabled] -mpartial-vector-fp-math [enabled] -mpclmul [enabled] -mpopcnt [enabled] -mprefer-avx128 -mprefer-vector-width=128 -mprefer-vector-width= none -mpreferred-stack-boundary= 0 -mpush-args [enabled] -mrdrnd [enabled] -mrecip= -mred-zone [enabled] -mregparm= 6 -msahf [enabled] -mscatter -mtune-ctrl=use_scatter -msse [enabled] -msse2 [enabled] -msse3 [enabled] -msse4 [enabled] -msse4.1 [enabled] -msse4.2 [enabled] -msse5 -mavx -mssse3 [enabled] -mstack-protector-guard-offset= -mstack-protector-guard-reg= -mstack-protector-guard-symbol= -mstack-protector-guard= tls -mstore-max= 256 -mstringop-strategy= [default] -mstv [enabled] -mtls-dialect= gnu -mtls-direct-seg-refs [enabled] -mtune-ctrl= -mtune= ivybridge -mveclibabi= [default] -mxsave [enabled] -mxsaveopt [enabled] Known assembler dialects (for use with the -masm= option): att intel Known ABIs (for use with the -mabi= option): ms sysv Known code models (for use with the -mcmodel= option): 32 kernel large medium small Valid arguments to -mfpmath=: 387 387+sse 387,sse both sse sse+387 sse,387 Known choices for mitigation against straight line speculation with -mharden-sls=: all indirect-jmp none return Known indirect branch choices (for use with the -mindirect-branch=/-mfunction-return= options): keep thunk thunk-extern thunk-inline Known choices for return instrumentation with -minstrument-return=: call none nop5 Known data alignment choices (for use with the -malign-data= option): abi cacheline compat Known vectorization library ABIs (for use with the -mveclibabi= option): acml svml Known address mode (for use with the -maddress-mode= option): long short Known preferred register vector length (to use with the -mprefer-vector-width= option): 128 256 512 none Known stack protector guard (for use with the -mstack-protector-guard= option): global tls Valid arguments to -mstringop-strategy=: byte_loop libcall loop rep_4byte rep_8byte rep_byte unrolled_loop vector_loop Known TLS dialects (for use with the -mtls-dialect= option): gnu gnu2 Known valid arguments for -march= option: i386 i486 i586 pentium lakemont pentium-mmx winchip-c6 winchip2 c3 samuel-2 c3-2 nehemiah c7 esther i686 pentiumpro pentium2 pentium3 pentium3m pentium-m pentium4 pentium4m prescott nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client rocketlake icelake-server cascadelake tigerlake cooperlake sapphirerapids emeraldrapids alderlake raptorlake meteorlake graniterapids graniterapids-d arrowlake arrowlake-s lunarlake pantherlake bonnell atom silvermont slm goldmont goldmont-plus tremont gracemont sierraforest grandridge clearwaterforest knl knm intel geode k6 k6-2 k6-3 athlon athlon-tbird athlon-4 athlon-xp athlon-mp x86-64 x86-64-v2 x86-64-v3 x86-64-v4 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 lujiazui yongfeng k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 znver3 znver4 znver5 btver1 btver2 generic native Known valid arguments for -mtune= option: generic i386 i486 pentium lakemont pentiumpro pentium4 nocona core2 nehalem sandybridge haswell bonnell silvermont goldmont goldmont-plus tremont sierraforest grandridge clearwaterforest knl knm skylake skylake-avx512 cannonlake icelake-client icelake-server cascadelake tigerlake cooperlake sapphirerapids alderlake rocketlake graniterapids graniterapids-d arrowlake arrowlake-s pantherlake intel lujiazui yongfeng geode k6 athlon k8 amdfam10 bdver1 bdver2 bdver3 bdver4 btver1 btver2 znver1 znver2 znver3 znver4 znver5The following dependencies are missing from the script:
apt install wget clang lld pkg-configapt install wget clang lld pkg-configThat is only a snippet of a script that I use once to setup a development environment (pyenv, uv, nvm etc.) in a clean machine/vm.
I install clang versions from llvm with this script:
click to view
#!/bin/bash # 251010 # add clang ${version} to Ubuntu update_alternatives() { local version=${1} local priority=${2} local master=${3} local slaves=${4} local path=${5} local cmdln cmdln="--verbose --install ${path}${master} ${master} ${path}${master}-${version} ${priority}" for slave in ${slaves}; do cmdln="${cmdln} --slave ${path}${slave} ${slave} ${path}${slave}-${version}" done sudo update-alternatives ${cmdln} } if [[ ${#} -ne 2 ]]; then echo usage: "${0}" clang_version priority exit 1 fi version=${1} priority=${2} path="/usr/bin/" sudo apt update # download and launch the setup script curl -sSL https://apt.llvm.org/llvm.sh | sudo bash -s ${version} # sudo apt install -y bolt-${version} # curl -sSL https://apt.llvm.org/llvm.sh | sudo bash -s ${version} all # configure with update-alternatives master="llvm-config" # v19 #slaves="asan_symbolize bugpoint clang++ clang clang-cpp clangd count dsymutil FileCheck ld64.lld ld.lld llc lld lldb lldb-argdumper lldb-dap lldb-instr lldb-server lld-link lli lli-child-target llvm-addr2line llvm-ar llvm-as llvm-bcanalyzer llvm-bitcode-strip llvm-cat llvm-cfi-verify llvm-cov llvm-c-test llvm-cvtres llvm-cxxdump llvm-cxxfilt llvm-cxxmap llvm-debuginfo-analyzer llvm-debuginfod llvm-debuginfod-find llvm-diff llvm-dis llvm-dlltool llvm-dwarfdump llvm-dwarfutil llvm-dwp llvm-exegesis llvm-extract llvm-gsymutil llvm-ifs llvm-install-name-tool llvm-jitlink llvm-jitlink-executor llvm-lib llvm-libtool-darwin llvm-link llvm-lipo llvm-lto llvm-lto2 llvm-mc llvm-mca llvm-ml llvm-modextract llvm-mt llvm-nm llvm-objcopy llvm-objdump llvm-opt-report llvm-otool llvm-pdbutil llvm-PerfectShuffle llvm-profdata llvm-profgen llvm-ranlib llvm-rc llvm-readelf llvm-readobj llvm-readtapi llvm-reduce llvm-remarkutil llvm-rtdyld llvm-sim llvm-size llvm-split llvm-stress llvm-strings llvm-strip llvm-symbolizer llvm-tblgen llvm-tli-checker llvm-undname llvm-windres llvm-xray not obj2yaml opt reduce-chunk-list sanstats split-file UnicodeNameMappingGenerator verify-uselistorder wasm-ld yaml2obj yaml-bench" # v19 with bolt #slaves="amdgpu-arch analyze-build asan_symbolize bugpoint c-index-test clang++ clang clang-apply-replacements clang-change-namespace clang-check clang-cl clang-cpp clangd clang-doc clang-extdef-mapping clang-include-cleaner clang-include-fixer clang-installapi clang-linker-wrapper clang-move clang-nvlink-wrapper clang-offload-bundler clang-offload-packager clang-pseudo clang-query clang-refactor clang-rename clang-reorder-fields clang-repl clang-scan-deps clang-tblgen count diagtool dsymutil FileCheck find-all-symbols hmaptool hwasan_symbolize intercept-build ld64.lld ld.lld llc lld lldb lldb-argdumper lldb-dap lldb-instr lldb-server lld-link lli lli-child-target llvm-addr2line llvm-ar llvm-as llvm-bcanalyzer llvm-bitcode-strip llvm-bolt llvm-boltdiff llvm-bolt-heatmap llvm-cat llvm-cfi-verify llvm-cov llvm-c-test llvm-cvtres llvm-cxxdump llvm-cxxfilt llvm-cxxmap llvm-debuginfo-analyzer llvm-debuginfod llvm-debuginfod-find llvm-diff llvm-dis llvm-dlltool llvm-dwarfdump llvm-dwarfutil llvm-dwp llvm-exegesis llvm-extract llvm-gsymutil llvm-ifs llvm-install-name-tool llvm-jitlink llvm-jitlink-executor llvm-lib llvm-libtool-darwin llvm-link llvm-lipo llvm-lto llvm-lto2 llvm-mc llvm-mca llvm-ml llvm-modextract llvm-mt llvm-nm llvm-objcopy llvm-objdump llvm-opt-report llvm-otool llvm-pdbutil llvm-PerfectShuffle llvm-profdata llvm-profgen llvm-ranlib llvm-rc llvm-readelf llvm-readobj llvm-readtapi llvm-reduce llvm-remarkutil llvm-rtdyld llvm-sim llvm-size llvm-split llvm-stress llvm-strings llvm-strip llvm-symbolizer llvm-tblgen llvm-tli-checker llvm-undname llvm-windres llvm-xray merge-fdata modularize not nvptx-arch obj2yaml opt perf2bolt pp-trace reduce-chunk-list sancov sanstats scan-build scan-build-py scan-view split-file UnicodeNameMappingGenerator verify-uselistorder wasm-ld yaml2obj yaml-bench" # v20 #slaves="amdgpu-arch analyze-build asan_symbolize bugpoint c-index-test clang++ clang clang-apply-replacements clang-change-namespace clang-check clang-cl clang-cpp clangd clang-doc clang-extdef-mapping clang-include-cleaner clang-include-fixer clang-installapi clang-linker-wrapper clang-move clang-nvlink-wrapper clang-offload-bundler clang-offload-packager clang-query clang-refactor clang-reorder-fields clang-repl clang-scan-deps clang-sycl-linker clang-tblgen count diagtool dsymutil FileCheck find-all-symbols hmaptool hwasan_symbolize intercept-build ld64.lld ld.lld llc lld lldb lldb-argdumper lldb-dap lldb-instr lldb-server lld-link lli lli-child-target llvm-addr2line llvm-ar llvm-as llvm-bcanalyzer llvm-bitcode-strip llvm-cat llvm-cfi-verify llvm-cgdata llvm-cov llvm-c-test llvm-ctxprof-util llvm-cvtres llvm-cxxdump llvm-cxxfilt llvm-cxxmap llvm-debuginfo-analyzer llvm-debuginfod llvm-debuginfod-find llvm-diff llvm-dis llvm-dlltool llvm-dwarfdump llvm-dwarfutil llvm-dwp llvm-exegesis llvm-extract llvm-gsymutil llvm-ifs llvm-install-name-tool llvm-jitlink llvm-jitlink-executor llvm-lib llvm-libtool-darwin llvm-link llvm-lipo llvm-lto llvm-lto2 llvm-mc llvm-mca llvm-ml llvm-modextract llvm-mt llvm-nm llvm-objcopy llvm-objdump llvm-opt-report llvm-otool llvm-pdbutil llvm-PerfectShuffle llvm-profdata llvm-profgen llvm-ranlib llvm-rc llvm-readelf llvm-readobj llvm-readtapi llvm-reduce llvm-remarkutil llvm-rtdyld llvm-sim llvm-size llvm-split llvm-stress llvm-strings llvm-strip llvm-symbolizer llvm-tblgen llvm-tli-checker llvm-undname llvm-windres llvm-xray modularize not nvptx-arch obj2yaml opt pp-trace reduce-chunk-list sancov sanstats scan-build scan-build-py scan-view split-file UnicodeNameMappingGenerator verify-uselistorder wasm-ld yaml2obj yaml-bench" # v20 with bolt #slaves="amdgpu-arch analyze-build asan_symbolize bugpoint c-index-test clang++ clang clang-apply-replacements clang-change-namespace clang-check clang-cl clang-cpp clangd clang-doc clang-extdef-mapping clang-include-cleaner clang-include-fixer clang-installapi clang-linker-wrapper clang-move clang-nvlink-wrapper clang-offload-bundler clang-offload-packager clang-query clang-refactor clang-reorder-fields clang-repl clang-scan-deps clang-sycl-linker clang-tblgen count diagtool dsymutil FileCheck find-all-symbols hmaptool hwasan_symbolize intercept-build ld64.lld ld.lld llc lld lldb lldb-argdumper lldb-dap lldb-instr lldb-server lld-link lli lli-child-target llvm-addr2line llvm-ar llvm-as llvm-bcanalyzer llvm-bitcode-strip llvm-bolt llvm-bolt-binary-analysis llvm-boltdiff llvm-bolt-heatmap llvm-cat llvm-cfi-verify llvm-cgdata llvm-cov llvm-c-test llvm-ctxprof-util llvm-cvtres llvm-cxxdump llvm-cxxfilt llvm-cxxmap llvm-debuginfo-analyzer llvm-debuginfod llvm-debuginfod-find llvm-diff llvm-dis llvm-dlltool llvm-dwarfdump llvm-dwarfutil llvm-dwp llvm-exegesis llvm-extract llvm-gsymutil llvm-ifs llvm-install-name-tool llvm-jitlink llvm-jitlink-executor llvm-lib llvm-libtool-darwin llvm-link llvm-lipo llvm-lto llvm-lto2 llvm-mc llvm-mca llvm-ml llvm-modextract llvm-mt llvm-nm llvm-objcopy llvm-objdump llvm-opt-report llvm-otool llvm-pdbutil llvm-PerfectShuffle llvm-profdata llvm-profgen llvm-ranlib llvm-rc llvm-readelf llvm-readobj llvm-readtapi llvm-reduce llvm-remarkutil llvm-rtdyld llvm-sim llvm-size llvm-split llvm-stress llvm-strings llvm-strip llvm-symbolizer llvm-tblgen llvm-tli-checker llvm-undname llvm-windres llvm-xray merge-fdata modularize not nvptx-arch obj2yaml opt perf2bolt pp-trace reduce-chunk-list sancov sanstats scan-build scan-build-py scan-view split-file UnicodeNameMappingGenerator verify-uselistorder wasm-ld yaml2obj yaml-bench" # v21 slaves="amdgpu-arch analyze-build asan_symbolize bugpoint c-index-test clang++ clang clang-apply-replacements clang-change-namespace clang-check clang-cl clang-cpp clangd clang-doc clang-extdef-mapping clang-include-cleaner clang-include-fixer clang-installapi clang-linker-wrapper clang-move clang-nvlink-wrapper clang-offload-bundler clang-offload-packager clang-query clang-refactor clang-reorder-fields clang-repl clang-scan-deps clang-sycl-linker clang-tblgen count diagtool dsymutil FileCheck find-all-symbols hmaptool hwasan_symbolize intercept-build ld64.lld ld.lld llc lld lldb lldb-argdumper lldb-dap lldb-instr lldb-server lld-link lli lli-child-target llvm-addr2line llvm-ar llvm-as llvm-bcanalyzer llvm-bitcode-strip llvm-cat llvm-cfi-verify llvm-cgdata llvm-cov llvm-c-test llvm-ctxprof-util llvm-cvtres llvm-cxxdump llvm-cxxfilt llvm-cxxmap llvm-debuginfo-analyzer llvm-debuginfod llvm-debuginfod-find llvm-diff llvm-dis llvm-dlltool llvm-dwarfdump llvm-dwarfutil llvm-dwp llvm-exegesis llvm-extract llvm-gsymutil llvm-ifs llvm-install-name-tool llvm-jitlink llvm-jitlink-executor llvm-lib llvm-libtool-darwin llvm-link llvm-lipo llvm-lto llvm-lto2 llvm-mc llvm-mca llvm-ml llvm-ml64 llvm-modextract llvm-mt llvm-nm llvm-objcopy llvm-objdump llvm-opt-report llvm-otool llvm-pdbutil llvm-PerfectShuffle llvm-profdata llvm-profgen llvm-ranlib llvm-rc llvm-readelf llvm-readobj llvm-readtapi llvm-reduce llvm-remarkutil llvm-rtdyld llvm-sim llvm-size llvm-split llvm-stress llvm-strings llvm-strip llvm-symbolizer llvm-tblgen llvm-test-mustache-spec llvm-tli-checker llvm-undname llvm-windres llvm-xray modularize not nvptx-arch obj2yaml offload-arch opt pp-trace reduce-chunk-list sancov sanstats scan-build scan-build-py scan-view split-file UnicodeNameMappingGenerator verify-uselistorder wasm-ld yaml2obj yaml-bench" # v21 with bolt #slaves="amdgpu-arch analyze-build asan_symbolize bugpoint c-index-test clang++ clang clang-apply-replacements clang-change-namespace clang-check clang-cl clang-cpp clangd clang-doc clang-extdef-mapping clang-include-cleaner clang-include-fixer clang-installapi clang-linker-wrapper clang-move clang-nvlink-wrapper clang-offload-bundler clang-offload-packager clang-query clang-refactor clang-reorder-fields clang-repl clang-scan-deps clang-sycl-linker clang-tblgen count diagtool dsymutil FileCheck find-all-symbols hmaptool hwasan_symbolize intercept-build ld64.lld ld.lld llc lld lldb lldb-argdumper lldb-dap lldb-instr lldb-server lld-link lli lli-child-target llvm-addr2line llvm-ar llvm-as llvm-bcanalyzer llvm-bitcode-strip llvm-bolt llvm-bolt-binary-analysis llvm-boltdiff llvm-bolt-heatmap llvm-cat llvm-cfi-verify llvm-cgdata llvm-cov llvm-c-test llvm-ctxprof-util llvm-cvtres llvm-cxxdump llvm-cxxfilt llvm-cxxmap llvm-debuginfo-analyzer llvm-debuginfod llvm-debuginfod-find llvm-diff llvm-dis llvm-dlltool llvm-dwarfdump llvm-dwarfutil llvm-dwp llvm-exegesis llvm-extract llvm-gsymutil llvm-ifs llvm-install-name-tool llvm-jitlink llvm-jitlink-executor llvm-lib llvm-libtool-darwin llvm-link llvm-lipo llvm-lto llvm-lto2 llvm-mc llvm-mca llvm-ml llvm-ml64 llvm-modextract llvm-mt llvm-nm llvm-objcopy llvm-objdump llvm-opt-report llvm-otool llvm-pdbutil llvm-PerfectShuffle llvm-profdata llvm-profgen llvm-ranlib llvm-rc llvm-readelf llvm-readobj llvm-readtapi llvm-reduce llvm-remarkutil llvm-rtdyld llvm-sim llvm-size llvm-split llvm-stress llvm-strings llvm-strip llvm-symbolizer llvm-tblgen llvm-test-mustache-spec llvm-tli-checker llvm-undname llvm-windres llvm-xray merge-fdata modularize not nvptx-arch obj2yaml offload-arch opt perf2bolt pp-trace reduce-chunk-list sancov sanstats scan-build scan-build-py scan-view split-file UnicodeNameMappingGenerator verify-uselistorder wasm-ld yaml2obj yaml-bench" update_alternatives "${version}" "${priority}" "${master}" "${slaves}" "${path}" exit # to uninstall a Clang version LLVM_VERSION=20 sudo apt purge -y clang-${LLVM_VERSION} lldb-${LLVM_VERSION} lld-${LLVM_VERSION} clangd-${LLVM_VERSION} bolt-${LLVM_VERSION} && sudo apt autoremove -y sudo update-alternatives --config llvm-config # to generate the list of slaves on a clean Ubuntu vm sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt autoclean ls /usr/bin > usr_bin_orig version=21 curl -sSL https://apt.llvm.org/llvm.sh | sudo bash -s "$version" # sudo apt install -y bolt-$version # curl -sSL https://apt.llvm.org/llvm.sh | sudo bash -s "$version" all ls /usr/bin > usr_bin_new diff usr_bin_new usr_bin_orig | awk -v ver="$version" '/^< / && !/llvm-config-'"$version"'$/ && /-'"$version"'$/ {gsub("^< ",""); gsub("-" ver "$",""); printf "%s ", $0} END {print ""}' > slaves_llvm # check if an application is already a master in: # /var/lib/dpkg/alternatives/I failed to reproduce the issue. The pyenv command succeeded with:
Installed Python-3.14.2 to /root/.pyenv/versions/3.14.2. The build logs contain0:01:19 load avg: 3.04 [39/43] test_struct passed.I ran the commands in a Ubuntu 24.04 container (clang 18.1.3). On my (Fedora) Linux host,
/proc/cpuinfosaysIntel(R) Core(TM) i7-10850H CPU @ 2.70GHz.Tested on Ubuntu 24.04 (gcc 14.2.0 - clang 21.1.8) and Ubuntu 20.04 (gcc 11.4.0), several CPUs.
How did you get clang 21 on Ubuntu 24.04?
aptonly installed clang 18.1.3 for me.Cross posting, check the script in my previous post to setup clang 21 on Ubuntu.
BTW pyenv builds python 3.14.2 without issues with either clang/gcc, buttest_structfails inpython3 -m testwith gcc/clang with that traceback.EDIT:
python -m test test_structruns only the "bad" test.I built python 3.14.2 in a clean VM Ubuntu 24.04, using default gcc 13.3.0, with this script.
click to view
#!/bin/bash python_ver=3.14.2 # setup pyenv and install latest python # https://github.com/pyenv/pyenv # https://github.com/python/pyperformance # dependencies according to pyenv #sudo apt update; sudo apt install -y build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev # Workaround missing libmpdec-dev on ubuntu 24.04 (it should be re introduced in ubuntu 26.04): # https://launchpad.net/~ondrej/+archive/ubuntu/php # https://deb.sury.org/ sudo add-apt-repository -y ppa:ondrej/php # dependencies according to python build doc dropping packages used in CI (ccache, cmake, gdb, inetutils-inetd, lcov, lzma, strace, xvfb) # https://devguide.python.org/getting-started/setup-building/index.html#build-dependencies # https://github.com/python/cpython/blob/main/.github/workflows/posix-deps-apt.sh sudo apt update; sudo apt install -y build-essential pkg-config libb2-dev libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev lzma-dev tk-dev uuid-dev zlib1g-dev libzstd-dev libmpdec-dev pyenv_dir="$HOME/.pyenv" git clone https://github.com/pyenv/pyenv.git "$pyenv_dir" cat << 'EOF' >> "$HOME/.profile" # pyenv: keep at the end of the file export PYENV_ROOT="$HOME/.pyenv" command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" EOF cat << 'EOF' >> "$HOME/.bashrc" # pyenv: keep at the end of the file export PYENV_ROOT="$HOME/.pyenv" command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" EOF . "$HOME/.profile" pushd "$pyenv_dir" && src/configure && make -C src && popd PYTHON_CONFIGURE_OPTS="--enable-optimizations --with-lto" PYTHON_CFLAGS="-march=native -mtune=native" pyenv install "$python_ver" pyenv global "$python_ver" python3 -m testRunning
python3 -m testfails fortest_structRunning
python3 -m test test_structsucceed.I wonder if
test_structfinds some leftovers from previous tests...Downloading Python-3.14.2.tar.xz... -> https://www.python.org/ftp/python/3.14.2/Python-3.14.2.tar.xz Installing Python-3.14.2... Installed Python-3.14.2 to /home/vmuser/.pyenv/versions/3.14.2 Using random seed: 2266171211 0:00:00 load avg: 0.06 Run 491 tests sequentially in a single process 0:00:00 load avg: 0.06 [ 1/491] test.test_asyncio.test_base_events 0:00:01 load avg: 0.14 [ 1/491] test.test_asyncio.test_base_events passed 0:00:01 load avg: 0.14 [ 2/491] test.test_asyncio.test_buffered_proto ... 0:20:19 load avg: 1.96 [490/491/1] test_zoneinfo passed 0:20:19 load avg: 1.96 [491/491/1] test_zstd 0:20:20 load avg: 1.96 [491/491/1] test_zstd passed == Tests result: FAILURE == 22 tests skipped: test.test_asyncio.test_windows_events test.test_asyncio.test_windows_utils test.test_gdb.test_backtrace test.test_gdb.test_cfunction test.test_gdb.test_cfunction_full test.test_gdb.test_misc test.test_gdb.test_pretty_print test_android test_apple test_asdl_parser test_clinic test_devpoll test_free_threading test_generated_cases test_kqueue test_launcher test_msvcrt test_startfile test_winapi test_winconsoleio test_winreg test_wmi 10 tests skipped (resource denied): test_curses test_peg_generator test_smtpnet test_socketserver test_tkinter test_ttk test_urllib2net test_urllibnet test_winsound test_zipfile64 1 test failed: test_struct 458 tests OK. Total duration: 20 min 20 sec Total tests: run=46,881 skipped=2,243 Total test files: run=481/491 failed=1 skipped=22 resource_denied=10 Result: FAILUREvmuser@u2404:~$ python3 -m test test_struct Using random seed: 847363914 0:00:00 load avg: 0.00 Run 1 test sequentially in a single process 0:00:00 load avg: 0.00 [1/1] test_struct 0:00:00 load avg: 0.00 [1/1] test_struct passed == Tests result: SUCCESS == 1 test OK. Total duration: 447 ms Total tests: run=41 Total test files: run=1/1 Result: SUCCESSI found the culprit pair of tests.
python3 -m test test_interpreters test_structclick to view
vmuser@u2404:~$ python3 -m test test_interpreters test_struct Using random seed: 2256134008 0:00:00 load avg: 0.07 Run 2 tests sequentially in a single process 0:00:00 load avg: 0.07 [1/2] test_interpreters 0:00:09 load avg: 0.21 [1/2] test_interpreters passed 0:00:09 load avg: 0.21 [2/2] test_struct Exception in initializer: Traceback (most recent call last): File "/home/vmuser/.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/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker ctx.initialize() ~~~~~~~~~~~~~~^^ File "/home/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize self.results = interpreters.create_queue(maxsize) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create unbound = _serialize_unbound(unbounditems) File "/home/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound return _crossinterp.serialize_unbound(unbound) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/vmuser/.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/vmuser/.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/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker ctx.initialize() ~~~~~~~~~~~~~~^^ File "/home/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize self.results = interpreters.create_queue(maxsize) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create unbound = _serialize_unbound(unbounditems) File "/home/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound return _crossinterp.serialize_unbound(unbound) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/vmuser/.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/vmuser/.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/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker ctx.initialize() ~~~~~~~~~~~~~~^^ File "/home/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize self.results = interpreters.create_queue(maxsize) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create unbound = _serialize_unbound(unbounditems) File "/home/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound return _crossinterp.serialize_unbound(unbound) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/vmuser/.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/vmuser/.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/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker ctx.initialize() ~~~~~~~~~~~~~~^^ File "/home/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize self.results = interpreters.create_queue(maxsize) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create unbound = _serialize_unbound(unbounditems) File "/home/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound return _crossinterp.serialize_unbound(unbound) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/vmuser/.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/vmuser/.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/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker ctx.initialize() ~~~~~~~~~~~~~~^^ File "/home/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize self.results = interpreters.create_queue(maxsize) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create unbound = _serialize_unbound(unbounditems) File "/home/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound return _crossinterp.serialize_unbound(unbound) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/vmuser/.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/vmuser/.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/vmuser/.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/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/_base.py", line 311, in _result_or_cancel return fut.result(timeout) ~~~~~~~~~~^^^^^^^^^ File "/home/vmuser/.pyenv/versions/3.14.2/lib/python3.14/concurrent/futures/_base.py", line 450, in result return self.__get_result() ~~~~~~~~~~~~~~~~~^^ File "/home/vmuser/.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:00:09 load avg: 0.21 [2/2/1] test_struct failed (1 error) == Tests result: FAILURE == 1 test failed: test_struct 1 test OK. Total duration: 9.6 sec Total tests: run=211 skipped=8 Total test files: run=2/2 failed=1 Result: FAILUREFor whatever reason
crossinterptries to serialize the UNBOUND sentinel fromqueuecpython/Lib/concurrent/interpreters/_crossinterp.py
Lines 72 to 91 in 7f497c3
UNBOUND = object.__new__(UnboundItem) UNBOUND_ERROR = object() UNBOUND_REMOVE = object() _UNBOUND_CONSTANT_TO_FLAG = { UNBOUND_REMOVE: 1, UNBOUND_ERROR: 2, UNBOUND: 3, } _UNBOUND_FLAG_TO_CONSTANT = {v: k for k, v in _UNBOUND_CONSTANT_TO_FLAG.items()} def serialize_unbound(unbound): op = unbound try: flag = _UNBOUND_CONSTANT_TO_FLAG[op] except KeyError: raise NotImplementedError(f'unsupported unbound replacement op {op!r}') return flag, Script for any recent Ubuntu, to build official python 3.14.2 with gcc, default options, and run the pairs of tests that exposes the bug. Tested working in a clean VM Ubuntu 22.04 - 24.04.
#!/usr/bin/env bash set -euo pipefail # ---- Config (overridable via env) ---- PYTHON_VER="${PYTHON_VER:-3.14.2}" PREFIX="${PREFIX:-$HOME/.local/python-${PYTHON_VER}}" WORKDIR="${WORKDIR:-$HOME/build-python-${PYTHON_VER}}" JOBS="${JOBS:-$(nproc)}" INSTALL_DEPS="${INSTALL_DEPS:-1}" # set to 0 to skip apt TAR="Python-${PYTHON_VER}.tar.xz" URL="https://www.python.org/ftp/python/${PYTHON_VER}/${TAR}" # ---- Functions ---- detect_ubuntu_2404() { if [[ -r /etc/os-release ]]; then # shellcheck disable=SC1091 . /etc/os-release [[ "${ID:-}" == "ubuntu" && "${VERSION_ID:-}" == "24.04" ]] else return 1 fi } install_deps() { [[ "${INSTALL_DEPS}" -eq 1 ]] || { echo "Skipping apt dependencies."; return 0; } echo "Installing build dependencies (requires sudo)..." if detect_ubuntu_2404; then echo "Detected Ubuntu 24.04 -> enabling ondrej/php PPA for libmpdec-dev" sudo add-apt-repository -y ppa:ondrej/php || true fi sudo apt update sudo apt install -y \ build-essential pkg-config wget ca-certificates xz-utils \ libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \ libncursesw5-dev libncurses5-dev libffi-dev liblzma-dev tk-dev \ libgdbm-dev libgdbm-compat-dev uuid-dev libzstd-dev libmpdec-dev \ libxml2-dev libxmlsec1-dev } build_python() { mkdir -p "${WORKDIR}" pushd "${WORKDIR}" >/dev/null if [[ ! -f "${TAR}" ]]; then echo "Downloading ${TAR}..." wget -c "${URL}" fi rm -rf "Python-${PYTHON_VER}" tar -xf "${TAR}" cd "Python-${PYTHON_VER}" echo "Configuring Python ${PYTHON_VER} with prefix ${PREFIX}" ./configure --prefix="${PREFIX}" echo "Building with make -j${JOBS}" make -j"${JOBS}" echo "Installing into ${PREFIX}" make install popd >/dev/null } run_smoke_tests() { local py="${PREFIX}/bin/python3" export PATH="${PREFIX}/bin:${PATH}" echo "Using interpreter: $(${py} -V)" echo "Running failing pair: test_interpreters + test_struct" "${py}" -m test test_interpreters test_struct } # ---- Main ---- echo "Building Python ${PYTHON_VER} into ${PREFIX}" echo "Workdir: ${WORKDIR}" install_deps build_python run_smoke_tests
Correction: I am able to reproduce the
test_structfailure when runningpython -m test: when the whole test suite is run sequentially.Reacted by ppigazzini15 remaining items
Hey, folks. Thank you for troubleshooting the problem and narrowing it down. Since it's been a while and I am hitting the same issue, I took a crack at looking at the code. The singleton is a red herring. It's actually not even a singleton. 🙂
The issue is with reloading the single module in tests while other modules, that have already imported the variables, keeping the old references. This breaks identity checks, dictionary key lookups, and exception handling. Luckily isolating
importlib.reloadinside a subinterpreter seems to work, so I hope this means we can resolve this.test_structstill fails with the same error in the new python 3.14.3 for all my builds (Ubuntu 22.04 and 24.04, gcc and clang).Click to view
0:15:32 load avg: 0.80 [386/492] test_strtod
0:15:33 load avg: 0.80 [386/492] test_strtod passed
0:15:33 load avg: 0.80 [387/492] test_struct
Exception in initializer:
Traceback (most recent call last):
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 88, in serialize_unbound
flag = _UNBOUND_CONSTANT_TO_FLAG[op]
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
KeyError: concurrent.interpreters._queues.UNBOUNDDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker
ctx.initialize()
~~~~~~~~~~~~~~^^
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize
self.results = interpreters.create_queue(maxsize)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create
unbound = _serialize_unbound(unbounditems)
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound
return _crossinterp.serialize_unbound(unbound)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.3/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.3/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 88, in serialize_unbound
flag = _UNBOUND_CONSTANT_TO_FLAG[op]
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
KeyError: concurrent.interpreters._queues.UNBOUNDDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker
ctx.initialize()
~~~~~~~~~~~~~~^^
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize
self.results = interpreters.create_queue(maxsize)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create
unbound = _serialize_unbound(unbounditems)
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound
return _crossinterp.serialize_unbound(unbound)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.3/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.3/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 88, in serialize_unbound
flag = _UNBOUND_CONSTANT_TO_FLAG[op]
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
KeyError: concurrent.interpreters._queues.UNBOUNDDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker
ctx.initialize()
~~~~~~~~~~~~~~^^
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize
self.results = interpreters.create_queue(maxsize)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create
unbound = _serialize_unbound(unbounditems)
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound
return _crossinterp.serialize_unbound(unbound)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.3/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.3/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 88, in serialize_unbound
flag = _UNBOUND_CONSTANT_TO_FLAG[op]
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
KeyError: concurrent.interpreters._queues.UNBOUNDDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker
ctx.initialize()
~~~~~~~~~~~~~~^^
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize
self.results = interpreters.create_queue(maxsize)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create
unbound = _serialize_unbound(unbounditems)
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound
return _crossinterp.serialize_unbound(unbound)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.3/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.3/lib/python3.14/concurrent/interpreters/_crossinterp.py", line 88, in serialize_unbound
flag = _UNBOUND_CONSTANT_TO_FLAG[op]
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
KeyError: concurrent.interpreters._queues.UNBOUNDDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/futures/thread.py", line 99, in _worker
ctx.initialize()
~~~~~~~~~~~~~~^^
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/futures/interpreter.py", line 64, in initialize
self.results = interpreters.create_queue(maxsize)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/interpreters/_queues.py", line 75, in create
unbound = _serialize_unbound(unbounditems)
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/interpreters/_queues.py", line 56, in _serialize_unbound
return _crossinterp.serialize_unbound(unbound)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.3/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.3/lib/python3.14/test/test_struct.py", line 824, in test_endian_table_init_subinterpreters
self.assertListEqual(list(results), [None] * 5)
~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.3/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.3/lib/python3.14/concurrent/futures/_base.py", line 311, in _result_or_cancel
return fut.result(timeout)
~~~~~~~~~~^^^^^^^^^
File "/home/usr00/.pyenv/versions/3.14.3/lib/python3.14/concurrent/futures/_base.py", line 450, in result
return self.__get_result()
~~~~~~~~~~~~~~~~~^^
File "/home/usr00/.pyenv/versions/3.14.3/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 anymore0:15:33 load avg: 0.80 [387/492/1] test_struct failed (1 error)
0:15:33 load avg: 0.80 [388/492/1] test_structseq
0:15:34 load avg: 0.80 [388/492/1] test_structseq passedHey, @ppigazzini, while Core team is looking for the fix, I think the approach I suggested in gh-144096 could be used as a quick relief. You can temporarily hot patch with:
git fetch origin --depth 2 9208c1d95b194f3cea595251ca1b2b9d267b09cf && git show 9208c1d95b194f3cea595251ca1b2b9d267b09cf | git applyOr just ignore while running tests:
./python -m test test_interpreters test_struct -i test.test_interpreters.test_queues.LowLevelTests.test_highlevel_reloaded -i test.test_interpreters.test_channels.LowLevelTests.test_highlevel_reloadedReacted by ppigazziniGentle ping for review on the linked PR #144096: it isolates the module-reload side-effect causing the
test_structflake in this issue.Change is minimal/safe. No runtime impact, just ensures that
importlib.reloadin tests doesn't pollute the rest of the suite. It preserves the original test intent from #115493.This helps test-suite reliability (including PGO builds). CI green, merges cleanly.
@ericsnowcurrently (and anyone else interested), would appreciate a look when you can. Thanks!
I'm having the same problem in the main branch. I built it like this:
CC=gcc CXX=g++ ./configureboss@oops-lab ~/projects/oss/cpython/main (main %2⚑1) $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/15.2.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /build/gcc/src/gcc/configure --enable-languages=ada,c,c++,d,fortran,go,lto,m2,objc,obj-c++,rust,cobol --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 15.2.1 20260209 (GCC)logs
0:30:25 load avg: 5.09 [397/501/4] test_struct Exception in initializer: Traceback (most recent call last): File "/home/boss/projects/oss/cpython/main/Lib/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/boss/projects/oss/cpython/main/Lib/concurrent/futures/thread.py", line 99, in _worker ctx.initialize() ~~~~~~~~~~~~~~^^ File "/home/boss/projects/oss/cpython/main/Lib/concurrent/futures/interpreter.py", line 64, in initialize self.results = interpreters.create_queue(maxsize) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/boss/projects/oss/cpython/main/Lib/concurrent/interpreters/_queues.py", line 74, in create unbound = _serialize_unbound(unbounditems) File "/home/boss/projects/oss/cpython/main/Lib/concurrent/interpreters/_queues.py", line 55, in _serialize_unbound return _crossinterp.serialize_unbound(unbound) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/boss/projects/oss/cpython/main/Lib/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/boss/projects/oss/cpython/main/Lib/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/boss/projects/oss/cpython/main/Lib/concurrent/futures/thread.py", line 99, in _worker ctx.initialize() ~~~~~~~~~~~~~~^^ File "/home/boss/projects/oss/cpython/main/Lib/concurrent/futures/interpreter.py", line 64, in initialize self.results = interpreters.create_queue(maxsize) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/boss/projects/oss/cpython/main/Lib/concurrent/interpreters/_queues.py", line 74, in create unbound = _serialize_unbound(unbounditems) File "/home/boss/projects/oss/cpython/main/Lib/concurrent/interpreters/_queues.py", line 55, in _serialize_unbound return _crossinterp.serialize_unbound(unbound) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/boss/projects/oss/cpython/main/Lib/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/boss/projects/oss/cpython/main/Lib/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/boss/projects/oss/cpython/main/Lib/concurrent/futures/thread.py", line 99, in _worker ctx.initialize() ~~~~~~~~~~~~~~^^ File "/home/boss/projects/oss/cpython/main/Lib/concurrent/futures/interpreter.py", line 64, in initialize self.results = interpreters.create_queue(maxsize) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/boss/projects/oss/cpython/main/Lib/concurrent/interpreters/_queues.py", line 74, in create unbound = _serialize_unbound(unbounditems) File "/home/boss/projects/oss/cpython/main/Lib/concurrent/interpreters/_queues.py", line 55, in _serialize_unbound return _crossinterp.serialize_unbound(unbound) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/boss/projects/oss/cpython/main/Lib/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/boss/projects/oss/cpython/main/Lib/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/boss/projects/oss/cpython/main/Lib/concurrent/futures/thread.py", line 99, in _worker ctx.initialize() ~~~~~~~~~~~~~~^^ File "/home/boss/projects/oss/cpython/main/Lib/concurrent/futures/interpreter.py", line 64, in initialize self.results = interpreters.create_queue(maxsize) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/boss/projects/oss/cpython/main/Lib/concurrent/interpreters/_queues.py", line 74, in create unbound = _serialize_unbound(unbounditems) File "/home/boss/projects/oss/cpython/main/Lib/concurrent/interpreters/_queues.py", line 55, in _serialize_unbound return _crossinterp.serialize_unbound(unbound) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/boss/projects/oss/cpython/main/Lib/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/boss/projects/oss/cpython/main/Lib/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/boss/projects/oss/cpython/main/Lib/concurrent/futures/thread.py", line 99, in _worker ctx.initialize() ~~~~~~~~~~~~~~^^ File "/home/boss/projects/oss/cpython/main/Lib/concurrent/futures/interpreter.py", line 64, in initialize self.results = interpreters.create_queue(maxsize) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/boss/projects/oss/cpython/main/Lib/concurrent/interpreters/_queues.py", line 74, in create unbound = _serialize_unbound(unbounditems) File "/home/boss/projects/oss/cpython/main/Lib/concurrent/interpreters/_queues.py", line 55, in _serialize_unbound return _crossinterp.serialize_unbound(unbound) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/boss/projects/oss/cpython/main/Lib/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/boss/projects/oss/cpython/main/Lib/test/test_struct.py", line 1003, in test_endian_table_init_subinterpreters self.assertListEqual(list(results), [None] * 5) ~~~~^^^^^^^^^ File "/home/boss/projects/oss/cpython/main/Lib/concurrent/futures/_base.py", line 666, in result_iterator yield _result_or_cancel(fs.pop()) ~~~~~~~~~~~~~~~~~^^^^^^^^^^ File "/home/boss/projects/oss/cpython/main/Lib/concurrent/futures/_base.py", line 311, in _result_or_cancel return fut.result(timeout) ~~~~~~~~~~^^^^^^^^^ File "/home/boss/projects/oss/cpython/main/Lib/concurrent/futures/_base.py", line 450, in result return self.__get_result() ~~~~~~~~~~~~~~~~~^^ File "/home/boss/projects/oss/cpython/main/Lib/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:30:27 load avg: 5.09 [397/501/5] test_struct failed (1 error)FWIW I was able to produce the same issue on macOS with
/python.exe -m test.
But changes from aa24c20 from seems to fixed it.$ gcc -v Apple clang version 21.0.0 (clang-2100.1.1.101) Target: arm64-apple-darwin25.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/binI merged the #144096 change to avoid side effects from the test cases that check that the
_interpretersextension module tolerates the pure Python modules being reloaded.Beyond that, our policy on module reloading is generally "If you hot reload a module without cleaning up everything that references it, you get to keep all the shiny pieces when it inevitably breaks". On those grounds, #142515 and #142577 would be closed as "don't do that" (where "that" is reloading
concurrent.interpreterssubmodules without also reloadingconcurrent.interpretersitself to update the exported API objects).However, having the two different
UNBOUNDsingletons seems genuinely odd, so there may still be some genuine code cleanup worth implementing here.Cleanup proposals can go in a separate issue that explains the benefits separately from this test failure (since the modified testing means we won't be hitting that anymore)
- moved this from Todo to Done in Release and Deferred blockers 🚫
on Aug 30, 2026
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsDone
- StatusShow more project fieldsDone
Bug report
Bug description:
I routinely use on my Ubuntu machines
pyenvand a script to install python versions:Click to view
test_structfails inpython3 -m testwith python 3.14.2 (and 3.14.1) with this traceback:Click to view
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 testCPython versions tested on:
3.14
Operating systems tested on:
Linux
Linked PRs