Public bug reported:
The libpsm2-2 package in Ubuntu 25.04 was compiled with AVX instructions
enabled, causing illegal instruction crashes (SIGILL) on older CPUs that
don't support AVX, such as Intel Core2 Duo processors. The library lacks
proper runtime CPU feature detection.
Octave compiled on Ubuntu 25.04 (on Core2Duo T9900 cpu):
$ ./run-octave -W
vaio.145001RTC timebase, using 326 picos/cycle from /proc instead of the
detected 1339 picos/cycle
[vaio:145001:0:145001] Caught signal 4 (Illegal instruction: illegal operand)
==== backtrace (tid: 145001) ====
0 /lib/x86_64-linux-gnu/libucs.so.0(ucs_handle_error+0x2ec) [0x786137249f2c]
1 /lib/x86_64-linux-gnu/libucs.so.0(+0x3530d) [0x78613724b30d]
2 /lib/x86_64-linux-gnu/libucs.so.0(+0x353a3) [0x78613724b3a3]
3 /lib/x86_64-linux-gnu/libc.so.6(+0x45810) [0x78613d645810]
4 /lib/x86_64-linux-gnu/libpsm2.so.2(+0x6acd) [0x78613bca2acd]
5 /lib64/ld-linux-x86-64.so.2(+0x546f) [0x78613fda246f]
6 /lib64/ld-linux-x86-64.so.2(+0x5584) [0x78613fda2584]
7 /lib64/ld-linux-x86-64.so.2(+0x217a0) [0x78613fdbe7a0]
=================================
octave-cli:145001 terminated with signal 4 at PC=78613bca2acd SP=7ffe1b1e43a0.
Backtrace:
/lib/x86_64-linux-gnu/libpsm2.so.2(+0x6acd) [0x78613bca2acd]
/lib64/ld-linux-x86-64.so.2(+0x546f) [0x78613fda246f]
/lib64/ld-linux-x86-64.so.2(+0x5584) [0x78613fda2584]
/lib64/ld-linux-x86-64.so.2(+0x217a0) [0x78613fdbe7a0]
(removing libpsm2-2 and libraries that use it "fixes" the problem).
objdump -d /lib/x86_64-linux-gnu/libpsm2.so.2 > t1.asm
grep -E "^\s*6a[c-d][0-9a-f]:" t1.asm | head -20
6ac2: 31 f6 xor %esi,%esi
6ac4: 48 8d 78 01 lea 0x1(%rax),%rdi
6ac8: e8 f3 ee ff ff call 59c0 <strtod@plt>
6acd: c5 fb 10 c8 vmovsd %xmm0,%xmm0,%xmm1
6ad1: c5 f9 57 c0 vxorpd %xmm0,%xmm0,%xmm0
6ad5: c5 f9 2e c8 vucomisd %xmm0,%xmm1
6ad9: 7a 0f jp 6aea <sprintf_chk@plt+0xaba>
6adb: 75 0d jne 6aea <sprintf_chk@plt+0xaba>
6add: 4c 89 e7 mov %r12,%rdi
("c5" prefix indicates AVX: vmovsd, vxorpd, vucomisd (for SSE those
would be: movsd, xorpd, ucomisd)
Also, looking at the ASM file I see:
22e46: b8 07 00 00 00 mov $0x7,%eax
22e4b: b9 00 00 00 00 mov $0x0,%ecx
22e50: 0f a2 cpuid
This is calling CPUID with EAX=7 (leaf 7). Core2Duo supports up to
leaf6.
** Affects: libpsm2 (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2111536
Title:
libpsm2-2 uses AVX instructions on Core2Duo cpu
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libpsm2/+bug/2111536/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs