Bug 295948 - lang/python311: Illegal instruction on old amd64 CPU
Summary: lang/python311: Illegal instruction on old amd64 CPU
Status: Closed DUPLICATE of bug 295664
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-python (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-06-08 23:03 UTC by Jason W. Bacon
Modified: 2026-06-10 13:51 UTC (History)
1 user (show)

See Also:
vishwin: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason W. Bacon freebsd_committer freebsd_triage 2026-06-08 23:03:06 UTC
Not sure how many users this affects, but our docs do say that all amd64 hardware is supported:

https://www.freebsd.org/releases/15.0R/hardware/

2.1. x86-64

FreeBSD/amd64 supports x86-64 as a fully-supported, Tier-1 architecture. Release media is expected to work on all x86-64 machines with at least 256 MiB of RAM. This release incorporates optimizations and enhancements to leverage the full capabilities of FreeBSD/amd64-based systems, delivering improved performance across a wide range of workloads.

So I think we need to either fix this, or update the docs to accurately indicate the CPU requirements.

This is one of a couple very old machines I still maintain for testing (the other being a Core 2 Duo laptop).

FreeBSD barracuda.acadix.biz 15.0-RELEASE FreeBSD 15.0-RELEASE releng/15.0-n280995-7aedc8de6446 GENERIC amd64

CPU: AMD Phenom(tm) II X4 955 Processor (3214.36-MHz K8-class CPU)
  Origin="AuthenticAMD"  Id=0x100f42  Family=0x10  Model=0x4  Stepping=2
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x802009<SSE3,MON,CX16,POPCNT>
  AMD Features=0xee500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM,3DNow!+,3DNow!>
  AMD Features2=0x37ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,SKINIT,WDT>
  SVM: NP,NRIP,NAsids=64
  TSC: P-state invariant

lldb -c python3.11.core python3.11
(lldb) target create "python3.11" --core "python3.11.core"
Core file '/home/bacon/Barracuda/DIY-RNA-Seq-DE/Yeast/python3.11.core' (x86_64) was loaded.
(lldb) bt
* thread #1, name = 'python3.11', stop reason = signal SIGILL
  * frame #0: 0x0000000846d6fe2c _multiarray_umath.cpython-311.so`std::__1::pair<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<int, std::__1::function<_object* (tagPyArrayObject*, unsigned char)>>, void*>*>, bool> std::__1::__hash_table<std::__1::__hash_value_type<int, std::__1::function<_object* (tagPyArrayObject*, unsigned char)>>, std::__1::__unordered_map_hasher<int, std::__1::__hash_value_type<int, std::__1::function<_object* (tagPyArrayObject*, unsigned char)>>, std::__1::hash<int>, std::__1::equal_to<int>, true>, std::__1::__unordered_map_equal<int, std::__1::__hash_value_type<int, std::__1::function<_object* (tagPyArrayObject*, unsigned char)>>, std::__1::equal_to<int>, std::__1::hash<int>, true>, std::__1::allocator<std::__1::__hash_value_type<int, std::__1::function<_object* (tagPyArrayObject*, unsigned char)>>>>::__emplace_unique_key_args<int, std::__1::pair<int const, std::__1::function<_object* (tagPyArrayObject*, unsigned char)>> const&>(int const&, std::__1::pair<int const, std::__1::function<_object* (tagPyArrayObject*, unsigned char)>> const&) + 572
    frame #1: 0x0000000846d6f829 _multiarray_umath.cpython-311.so`___lldb_unnamed_symbol7405 + 1225
    frame #2: 0x0000185e2c66573d ld-elf.so.1
    frame #3: 0x0000185e2c66a229 ld-elf.so.1
    frame #4: 0x0000185e2c666785 ld-elf.so.1
    frame #5: 0x0000000821d47a5f libpython3.11.so.1.0`___lldb_unnamed_symbol5638 + 207
    frame #6: 0x0000000821cffc6f libpython3.11.so.1.0`___lldb_unnamed_symbol5396 + 1151
    frame #7: 0x0000000821c1e5f9 libpython3.11.so.1.0`___lldb_unnamed_symbol4273 + 201
    frame #8: 0x0000000821cc1188 libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 29032
    frame #9: 0x0000000821cc8315 libpython3.11.so.1.0`___lldb_unnamed_symbol5157 + 325
    frame #10: 0x0000000821bcb5f1 libpython3.11.so.1.0`___lldb_unnamed_symbol3502 + 401
    frame #11: 0x0000000821bcb420 libpython3.11.so.1.0`PyObject_CallMethodObjArgs + 320
    frame #12: 0x0000000821cfaeb0 libpython3.11.so.1.0`PyImport_ImportModuleLevelObject + 1648
    frame #13: 0x0000000821cb312a libpython3.11.so.1.0`___lldb_unnamed_symbol5096 + 282
    frame #14: 0x0000000821c1e4de libpython3.11.so.1.0`___lldb_unnamed_symbol4272 + 126
    frame #15: 0x0000000821cc1188 libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 29032
    frame #16: 0x0000000821cc8315 libpython3.11.so.1.0`___lldb_unnamed_symbol5157 + 325
    frame #17: 0x0000000821bcb5f1 libpython3.11.so.1.0`___lldb_unnamed_symbol3502 + 401
    frame #18: 0x0000000821bcb420 libpython3.11.so.1.0`PyObject_CallMethodObjArgs + 320
    frame #19: 0x0000000821cfb09a libpython3.11.so.1.0`PyImport_ImportModuleLevelObject + 2138
    frame #20: 0x0000000821cc28cc libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 34988
    frame #21: 0x0000000821cb8f41 libpython3.11.so.1.0`PyEval_EvalCode + 209
    frame #22: 0x0000000821cb499f libpython3.11.so.1.0`___lldb_unnamed_symbol5110 + 1263
    frame #23: 0x0000000821c1e4de libpython3.11.so.1.0`___lldb_unnamed_symbol4272 + 126
    frame #24: 0x0000000821cc1188 libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 29032
    frame #25: 0x0000000821cc8315 libpython3.11.so.1.0`___lldb_unnamed_symbol5157 + 325
    frame #26: 0x0000000821bcb5f1 libpython3.11.so.1.0`___lldb_unnamed_symbol3502 + 401
    frame #27: 0x0000000821bcb420 libpython3.11.so.1.0`PyObject_CallMethodObjArgs + 320
    frame #28: 0x0000000821cfaeb0 libpython3.11.so.1.0`PyImport_ImportModuleLevelObject + 1648
    frame #29: 0x0000000821cb312a libpython3.11.so.1.0`___lldb_unnamed_symbol5096 + 282
    frame #30: 0x0000000821c1e4de libpython3.11.so.1.0`___lldb_unnamed_symbol4272 + 126
    frame #31: 0x0000000821cc1188 libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 29032
    frame #32: 0x0000000821cc8315 libpython3.11.so.1.0`___lldb_unnamed_symbol5157 + 325
    frame #33: 0x0000000821bcb5f1 libpython3.11.so.1.0`___lldb_unnamed_symbol3502 + 401
    frame #34: 0x0000000821bcb420 libpython3.11.so.1.0`PyObject_CallMethodObjArgs + 320
    frame #35: 0x0000000821cfb09a libpython3.11.so.1.0`PyImport_ImportModuleLevelObject + 2138
    frame #36: 0x0000000821cc28cc libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 34988
    frame #37: 0x0000000821cb8f41 libpython3.11.so.1.0`PyEval_EvalCode + 209
    frame #38: 0x0000000821cb499f libpython3.11.so.1.0`___lldb_unnamed_symbol5110 + 1263
    frame #39: 0x0000000821c1e4de libpython3.11.so.1.0`___lldb_unnamed_symbol4272 + 126
    frame #40: 0x0000000821cc1188 libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 29032
    frame #41: 0x0000000821cc8315 libpython3.11.so.1.0`___lldb_unnamed_symbol5157 + 325
    frame #42: 0x0000000821bcb5f1 libpython3.11.so.1.0`___lldb_unnamed_symbol3502 + 401
    frame #43: 0x0000000821bcb420 libpython3.11.so.1.0`PyObject_CallMethodObjArgs + 320
    frame #44: 0x0000000821cfaeb0 libpython3.11.so.1.0`PyImport_ImportModuleLevelObject + 1648
    frame #45: 0x0000000821cb312a libpython3.11.so.1.0`___lldb_unnamed_symbol5096 + 282
    frame #46: 0x0000000821c1e4de libpython3.11.so.1.0`___lldb_unnamed_symbol4272 + 126
    frame #47: 0x0000000821cc1188 libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 29032
    frame #48: 0x0000000821cc8315 libpython3.11.so.1.0`___lldb_unnamed_symbol5157 + 325
    frame #49: 0x0000000821bcb5f1 libpython3.11.so.1.0`___lldb_unnamed_symbol3502 + 401
    frame #50: 0x0000000821bcb420 libpython3.11.so.1.0`PyObject_CallMethodObjArgs + 320
    frame #51: 0x0000000821cfaeb0 libpython3.11.so.1.0`PyImport_ImportModuleLevelObject + 1648
    frame #52: 0x0000000821cc28cc libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 34988
    frame #53: 0x0000000821cb8f41 libpython3.11.so.1.0`PyEval_EvalCode + 209
    frame #54: 0x0000000821cb499f libpython3.11.so.1.0`___lldb_unnamed_symbol5110 + 1263
    frame #55: 0x0000000821c1e4de libpython3.11.so.1.0`___lldb_unnamed_symbol4272 + 126
    frame #56: 0x0000000821cc1188 libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 29032
    frame #57: 0x0000000821cc8315 libpython3.11.so.1.0`___lldb_unnamed_symbol5157 + 325
    frame #58: 0x0000000821bcb5f1 libpython3.11.so.1.0`___lldb_unnamed_symbol3502 + 401
    frame #59: 0x0000000821bcb420 libpython3.11.so.1.0`PyObject_CallMethodObjArgs + 320
    frame #60: 0x0000000821cfaeb0 libpython3.11.so.1.0`PyImport_ImportModuleLevelObject + 1648
    frame #61: 0x0000000821cc28cc libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 34988
    frame #62: 0x0000000821cb8f41 libpython3.11.so.1.0`PyEval_EvalCode + 209
    frame #63: 0x0000000821cb499f libpython3.11.so.1.0`___lldb_unnamed_symbol5110 + 1263
    frame #64: 0x0000000821c1e4de libpython3.11.so.1.0`___lldb_unnamed_symbol4272 + 126
    frame #65: 0x0000000821cc1188 libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 29032
    frame #66: 0x0000000821cc8315 libpython3.11.so.1.0`___lldb_unnamed_symbol5157 + 325
    frame #67: 0x0000000821bcb5f1 libpython3.11.so.1.0`___lldb_unnamed_symbol3502 + 401
    frame #68: 0x0000000821bcb420 libpython3.11.so.1.0`PyObject_CallMethodObjArgs + 320
    frame #69: 0x0000000821cfaeb0 libpython3.11.so.1.0`PyImport_ImportModuleLevelObject + 1648
    frame #70: 0x0000000821cc28cc libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 34988
    frame #71: 0x0000000821cb8f41 libpython3.11.so.1.0`PyEval_EvalCode + 209
    frame #72: 0x0000000821cb499f libpython3.11.so.1.0`___lldb_unnamed_symbol5110 + 1263
    frame #73: 0x0000000821c1e4de libpython3.11.so.1.0`___lldb_unnamed_symbol4272 + 126
    frame #74: 0x0000000821cc1188 libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 29032
    frame #75: 0x0000000821cc8315 libpython3.11.so.1.0`___lldb_unnamed_symbol5157 + 325
    frame #76: 0x0000000821bcb5f1 libpython3.11.so.1.0`___lldb_unnamed_symbol3502 + 401
    frame #77: 0x0000000821bcb420 libpython3.11.so.1.0`PyObject_CallMethodObjArgs + 320
    frame #78: 0x0000000821cfaeb0 libpython3.11.so.1.0`PyImport_ImportModuleLevelObject + 1648
    frame #79: 0x0000000821cb312a libpython3.11.so.1.0`___lldb_unnamed_symbol5096 + 282
    frame #80: 0x0000000821c1e4de libpython3.11.so.1.0`___lldb_unnamed_symbol4272 + 126
    frame #81: 0x0000000821cc1188 libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 29032
    frame #82: 0x0000000821cc8315 libpython3.11.so.1.0`___lldb_unnamed_symbol5157 + 325
    frame #83: 0x0000000821bcb5f1 libpython3.11.so.1.0`___lldb_unnamed_symbol3502 + 401
    frame #84: 0x0000000821bcb420 libpython3.11.so.1.0`PyObject_CallMethodObjArgs + 320
    frame #85: 0x0000000821cfb09a libpython3.11.so.1.0`PyImport_ImportModuleLevelObject + 2138
    frame #86: 0x0000000821cc28cc libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 34988
    frame #87: 0x0000000821cb8f41 libpython3.11.so.1.0`PyEval_EvalCode + 209
    frame #88: 0x0000000821cb499f libpython3.11.so.1.0`___lldb_unnamed_symbol5110 + 1263
    frame #89: 0x0000000821c1e4de libpython3.11.so.1.0`___lldb_unnamed_symbol4272 + 126
    frame #90: 0x0000000821cc1188 libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 29032
    frame #91: 0x0000000821cc8315 libpython3.11.so.1.0`___lldb_unnamed_symbol5157 + 325
    frame #92: 0x0000000821bcb5f1 libpython3.11.so.1.0`___lldb_unnamed_symbol3502 + 401
    frame #93: 0x0000000821bcb420 libpython3.11.so.1.0`PyObject_CallMethodObjArgs + 320
    frame #94: 0x0000000821cfaeb0 libpython3.11.so.1.0`PyImport_ImportModuleLevelObject + 1648
    frame #95: 0x0000000821cc28cc libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 34988
    frame #96: 0x0000000821cb8f41 libpython3.11.so.1.0`PyEval_EvalCode + 209
    frame #97: 0x0000000821cb499f libpython3.11.so.1.0`___lldb_unnamed_symbol5110 + 1263
    frame #98: 0x0000000821c1e4de libpython3.11.so.1.0`___lldb_unnamed_symbol4272 + 126
    frame #99: 0x0000000821cc1188 libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 29032
    frame #100: 0x0000000821cc8315 libpython3.11.so.1.0`___lldb_unnamed_symbol5157 + 325
    frame #101: 0x0000000821bcb5f1 libpython3.11.so.1.0`___lldb_unnamed_symbol3502 + 401
    frame #102: 0x0000000821bcb420 libpython3.11.so.1.0`PyObject_CallMethodObjArgs + 320
    frame #103: 0x0000000821cfaeb0 libpython3.11.so.1.0`PyImport_ImportModuleLevelObject + 1648
    frame #104: 0x0000000821cc28cc libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 34988
    frame #105: 0x0000000821cb8f41 libpython3.11.so.1.0`PyEval_EvalCode + 209
    frame #106: 0x0000000821cb499f libpython3.11.so.1.0`___lldb_unnamed_symbol5110 + 1263
    frame #107: 0x0000000821c1e4de libpython3.11.so.1.0`___lldb_unnamed_symbol4272 + 126
    frame #108: 0x0000000821cc1188 libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 29032
    frame #109: 0x0000000821cc8315 libpython3.11.so.1.0`___lldb_unnamed_symbol5157 + 325
    frame #110: 0x0000000821bcb5f1 libpython3.11.so.1.0`___lldb_unnamed_symbol3502 + 401
    frame #111: 0x0000000821bcb420 libpython3.11.so.1.0`PyObject_CallMethodObjArgs + 320
    frame #112: 0x0000000821cfaeb0 libpython3.11.so.1.0`PyImport_ImportModuleLevelObject + 1648
    frame #113: 0x0000000821cb312a libpython3.11.so.1.0`___lldb_unnamed_symbol5096 + 282
    frame #114: 0x0000000821c1e4de libpython3.11.so.1.0`___lldb_unnamed_symbol4272 + 126
    frame #115: 0x0000000821cc1188 libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 29032
    frame #116: 0x0000000821cc8315 libpython3.11.so.1.0`___lldb_unnamed_symbol5157 + 325
    frame #117: 0x0000000821bcb5f1 libpython3.11.so.1.0`___lldb_unnamed_symbol3502 + 401
    frame #118: 0x0000000821bcb420 libpython3.11.so.1.0`PyObject_CallMethodObjArgs + 320
    frame #119: 0x0000000821cfb09a libpython3.11.so.1.0`PyImport_ImportModuleLevelObject + 2138
    frame #120: 0x0000000821cc28cc libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 34988
    frame #121: 0x0000000821cb8f41 libpython3.11.so.1.0`PyEval_EvalCode + 209
    frame #122: 0x0000000821cb499f libpython3.11.so.1.0`___lldb_unnamed_symbol5110 + 1263
    frame #123: 0x0000000821c1e4de libpython3.11.so.1.0`___lldb_unnamed_symbol4272 + 126
    frame #124: 0x0000000821cc1188 libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 29032
    frame #125: 0x0000000821cc8315 libpython3.11.so.1.0`___lldb_unnamed_symbol5157 + 325
    frame #126: 0x0000000821cc1188 libpython3.11.so.1.0`_PyEval_EvalFrameDefault + 29032
    frame #127: 0x0000000821cb8f41 libpython3.11.so.1.0`PyEval_EvalCode + 209
    frame #128: 0x0000000821d224ed libpython3.11.so.1.0`___lldb_unnamed_symbol5491 + 141
    frame #129: 0x0000000821d21da9 libpython3.11.so.1.0`_PyRun_SimpleFileObject + 873
    frame #130: 0x0000000821d21167 libpython3.11.so.1.0`_PyRun_AnyFileObject + 215
    frame #131: 0x0000000821d4904c libpython3.11.so.1.0`___lldb_unnamed_symbol5641 + 844
    frame #132: 0x0000000821d486db libpython3.11.so.1.0`Py_RunMain + 2859
    frame #133: 0x0000000821d49cf6 libpython3.11.so.1.0`___lldb_unnamed_symbol5644 + 1558
    frame #134: 0x0000000821d4a11a libpython3.11.so.1.0`Py_BytesMain + 58
    frame #135: 0x0000000826af837f libc.so.7`__libc_start1 + 303
    frame #136: 0x0000000000201654 python3.11`_start + 36
Comment 1 Charlie Li freebsd_committer freebsd_triage 2026-06-08 23:52:18 UTC
Is this with math/py-numpy? This is unlikely to happen with only the CPython interpreter itself.
Comment 2 Jason W. Bacon freebsd_committer freebsd_triage 2026-06-09 12:07:54 UTC
It's triggered by biology/py-multiqc and by DESeq2 installed via BiocManager.  Both programs do use numpy, but the trace is only showing libpython, so I suspect this is a separate issue.

Both programs work fine on an old i5 and a Ryzen.
Comment 3 Jason W. Bacon freebsd_committer freebsd_triage 2026-06-09 13:09:24 UTC
I tried building math/py-numpy and lang/python311 from source on the Phenom, neither helped.

From the numpy build:

Test features "X86_V2" : Supported 
Test features "X86_V3" : Supported 
Test features "X86_V4" : Supported 
Test features "AVX512_ICL" : Supported 
Test features "AVX512_SPR" : Unsupported due to Compiler fails against the test code of "AVX512_SPR"
Comment 4 Charlie Li freebsd_committer freebsd_triage 2026-06-09 15:38:07 UTC
Given your CPUs this is most likely not related to the numpy issue that manifests on amd64/i386 without SSE4. However, _multiarray_umath.cpython-311.so is from numpy.

(In reply to Jason W. Bacon from comment #3)
Those lines from meson configure are only for checking to see which dispatched routines can be built based on compiler support of the build environment, not the baseline.
Comment 5 Charlie Li freebsd_committer freebsd_triage 2026-06-09 15:44:36 UTC
Actually your AMD Phenom is K10, which puts it as a v1 microarchitecture, which is below the new baseline of v2. You will need to disable compiled optimisations and rely on dispatched code for numpy in order to run on that machine.

*** This bug has been marked as a duplicate of bug 295664 ***
Comment 6 Jason W. Bacon freebsd_committer freebsd_triage 2026-06-10 13:51:32 UTC
Note to posterity:

Confirmed that it's a numpy issue using the following:

--- meson.options.orig  2026-05-18 21:24:13 UTC
+++ meson.options
@@ -24,7 +24,7 @@ option('enable-openmp', type: 'boolean', value: false,
         description: 'Disable threading support (see `NPY_ALLOW_THREADS` docs)')
 option('enable-openmp', type: 'boolean', value: false,
         description: 'Enable building NumPy with openmp support')
-option('disable-optimization', type: 'boolean', value: false,
+option('disable-optimization', type: 'boolean', value: true,
         description: 'Disable CPU optimized code (dispatch,simd,unroll...)')
 option('cpu-baseline', type: 'string', value: 'min',
         description: 'Minimal set of required CPU features')

Thanks for the feedback...