Public bug reported:

Note: I used an AI assistant to help interpret the crash and gather
background on CPU microarchitecture levels and the Go 1.26 toolchain. I
may have details wrong, so please verify. I just installed Ubuntu
yesterday and today Firefox and App Center was not opening today. I
installed Firefox through flatpak to post this issue.

Every snap operation crashes immediately with SIGILL (illegal instruction). 
`snap list`, `snap version`, and all installed snaps (Firefox, App Center) are 
affected. The stack trace points to the Go 1.26 runtime.
 
(IA interpretation of cause):
The CPU supports x86-64-v2 and v3 (AVX/AVX2) but not v4 (AVX-512). Go 1.26 can 
now emit AVX-512 instructions via its new SIMD support. The snapd binary 
appears to have been built targeting AVX-512 (GOAMD64=v4, or SIMD without 
runtime CPU guards), so it executes AVX-512 opcodes that any non-v4 CPU rejects 
with SIGILL. This affects the .deb binary as well — SNAP_REEXEC=0 does not 
help, because /usr/bin/snap itself crashes before re-exec logic runs.

$ snap list
SIGILL: illegal instruction
PC=0x5deec487f220 m=0 sigcode=2
instruction bytes: 0xc4 0xe4 0x0 0x48 0x8d 0x5 0x96 0x35 0xcf 0x0 0xe8 0xd1 
0x7c 0x72 0xff 0x44

goroutine 1 gp=0x343428341e0 m=0 mp=0x5deec56ce1a0 [running, locked to thread]:
crypto/internal/fips140/ecdsa.init()
        /usr/lib/go-1.26/src/crypto/internal/fips140/ecdsa/ecdsa.go:149 +0x3e0 
fp=0x34342905e28 sp=0x34342905dd8 pc=0x5deec487f220
runtime.doInit1(0x5deec5655170)
        /usr/lib/go-1.26/src/runtime/proc.go:8103 +0xd7 fp=0x34342905f48 
sp=0x34342905e28 pc=0x5deec3fe4197
runtime.doInit(...)
        /usr/lib/go-1.26/src/runtime/proc.go:8070
runtime.main()
        /usr/lib/go-1.26/src/runtime/proc.go:258 +0x270 fp=0x34342905fe0 
sp=0x34342905f48 pc=0x5deec3fd47d0
runtime.goexit({})
        /usr/lib/go-1.26/src/runtime/asm_amd64.s:1771 +0x1 fp=0x34342905fe8 
sp=0x34342905fe0 pc=0x5deec4011921

goroutine 2 gp=0x34342834d20 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/lib/go-1.26/src/runtime/proc.go:462 +0xce fp=0x343428eefa8 
sp=0x343428eef88 pc=0x5deec4009f4e
runtime.goparkunlock(...)
        /usr/lib/go-1.26/src/runtime/proc.go:468
runtime.forcegchelper()
        /usr/lib/go-1.26/src/runtime/proc.go:375 +0xb8 fp=0x343428eefe0 
sp=0x343428eefa8 pc=0x5deec3fd4b58
runtime.goexit({})
        /usr/lib/go-1.26/src/runtime/asm_amd64.s:1771 +0x1 fp=0x343428eefe8 
sp=0x343428eefe0 pc=0x5deec4011921
created by runtime.init.7 in goroutine 1
        /usr/lib/go-1.26/src/runtime/proc.go:363 +0x1a

goroutine 3 gp=0x343428352c0 m=nil [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/lib/go-1.26/src/runtime/proc.go:462 +0xce fp=0x343428ef788 
sp=0x343428ef768 pc=0x5deec4009f4e
runtime.goparkunlock(...)
        /usr/lib/go-1.26/src/runtime/proc.go:468
runtime.bgsweep(0x34342876080)
        /usr/lib/go-1.26/src/runtime/mgcsweep.go:279 +0x94 fp=0x343428ef7c8 
sp=0x343428ef788 pc=0x5deec3fbe754
runtime.gcenable.gowrap1()
        /usr/lib/go-1.26/src/runtime/mgc.go:214 +0x17 fp=0x343428ef7e0 
sp=0x343428ef7c8 pc=0x5deec3fafb57
runtime.goexit({})
        /usr/lib/go-1.26/src/runtime/asm_amd64.s:1771 +0x1 fp=0x343428ef7e8 
sp=0x343428ef7e0 pc=0x5deec4011921
created by runtime.gcenable in goroutine 1
        /usr/lib/go-1.26/src/runtime/mgc.go:214 +0x66

goroutine 4 gp=0x343428354a0 m=nil [GC scavenge wait]:
runtime.gopark(0x34342876080?, 0x5deec49d5fc8?, 0x1?, 0x0?, 0x343428354a0?)
        /usr/lib/go-1.26/src/runtime/proc.go:462 +0xce fp=0x343428eff78 
sp=0x343428eff58 pc=0x5deec4009f4e
runtime.goparkunlock(...)
        /usr/lib/go-1.26/src/runtime/proc.go:468
runtime.(*scavengerState).park(0x5deec56cc7e0)
        /usr/lib/go-1.26/src/runtime/mgcscavenge.go:425 +0x49 fp=0x343428effa8 
sp=0x343428eff78 pc=0x5deec3fbc289
runtime.bgscavenge(0x34342876080)
        /usr/lib/go-1.26/src/runtime/mgcscavenge.go:653 +0x3c fp=0x343428effc8 
sp=0x343428effa8 pc=0x5deec3fbc7fc
runtime.gcenable.gowrap2()
        /usr/lib/go-1.26/src/runtime/mgc.go:215 +0x17 fp=0x343428effe0 
sp=0x343428effc8 pc=0x5deec3fafb17
runtime.goexit({})
        /usr/lib/go-1.26/src/runtime/asm_amd64.s:1771 +0x1 fp=0x343428effe8 
sp=0x343428effe0 pc=0x5deec4011921
created by runtime.gcenable in goroutine 1
        /usr/lib/go-1.26/src/runtime/mgc.go:215 +0xa5

goroutine 5 gp=0x34342956000 m=nil [finalizer wait]:
runtime.gopark(0x5deec3fe4197?, 0x1c8?, 0x80?, 0x22?, 0x343428ee601?)
        /usr/lib/go-1.26/src/runtime/proc.go:462 +0xce fp=0x343428ee620 
sp=0x343428ee600 pc=0x5deec4009f4e
runtime.runFinalizers()
        /usr/lib/go-1.26/src/runtime/mfinal.go:210 +0x107 fp=0x343428ee7e0 
sp=0x343428ee620 pc=0x5deec3faeaa7
runtime.goexit({})
        /usr/lib/go-1.26/src/runtime/asm_amd64.s:1771 +0x1 fp=0x343428ee7e8 
sp=0x343428ee7e0 pc=0x5deec4011921
created by runtime.createfing in goroutine 1
        /usr/lib/go-1.26/src/runtime/mfinal.go:172 +0x3d

rax    0x34342970050
rbx    0x50
rcx    0x0
rdx    0x0
rdi    0x0
rsi    0x1
rbp    0x34342905e18
rsp    0x34342905dd8
r8     0x73b1d68f5fe0
r9     0x50
r10    0xffffffffffffffff
r11    0x3434288c568
r12    0x34342970050
r13    0x64
r14    0x343428341e0
r15    0xffffffffffffffff
rip    0x5deec487f220
rflags 0x10202
cs     0x33
fs     0x0
gs     0x0

---

Additional information:

$ lsb_release -rd
Description:    Ubuntu 26.04 LTS
Release:        26.04

$ dpkg -l snapd | tail -1 
ii  snapd          2.75.2+ubuntu26.04.2 amd64        Daemon and tooling that 
enable snap packages

$ lscpu | grep 'Model name'                 
Model name:                              AMD Ryzen 9 5900X 12-Core Processor

$ /lib64/ld-linux-x86-64.so.2 --help | grep -i supported
  x86-64-v3 (supported, searched)
  x86-64-v2 (supported, searched)

$ objdump -d /usr/lib/snapd/snapd 2>/dev/null | grep -iE '%zmm|kmov' | head
  331c00:       62 f1 fe 48 6f 08       vmovdqu64 (%rax),%zmm1
  331c06:       62 f1 fe 48 6f 50 01    vmovdqu64 0x40(%rax),%zmm2
  331c20:       62 f1 fe 48 6f 05 36    vmovdqu64 0xe54636(%rip),%zmm0        # 
1186260 <crosscall2@@Base+0xca5880>
  331c2a:       62 f1 fe 48 6f 0d 6c    vmovdqu64 0xe5466c(%rip),%zmm1        # 
11862a0 <crosscall2@@Base+0xca58c0>
  331c34:       62 f1 fe 48 6f 15 a2    vmovdqu64 0xe546a2(%rip),%zmm2        # 
11862e0 <crosscall2@@Base+0xca5900>
  331c3e:       62 f1 fe 48 6f 1d d8    vmovdqu64 0xe56bd8(%rip),%zmm3        # 
1188820 <crosscall2@@Base+0xca7e40>
  331c48:       62 f1 fe 48 6f 20       vmovdqu64 (%rax),%zmm4
  331c4e:       62 f2 7d 48 8d c4       vpermb %zmm4,%zmm0,%zmm0
  331c54:       62 f3 fd 48 ce c1 00    vgf2p8affineqb $0x0,%zmm1,%zmm0,%zmm0
  331c5b:       62 f2 6d 48 8d d4       vpermb %zmm4,%zmm2,%zmm2

** Affects: snapd (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/2155805

Title:
  snap commands crash with SIGILL on x86-64-v3 CPUs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/2155805/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to