Skip to content

inspectrum/liquid-dsp illegal instruction crash on Linux x86-64 build & recent Intel CPUs #134

@miek

Description

@miek

I was trying to run inspectrum from radioconda-2025.03.14-Linux-x86_64 and it crashes immediately with:

Illegal instruction (core dumped)

Narrowing it down some more, the crash is in libliquid on a vcvttss2usi instruction:

(gdb) run
Starting program: /home/mike/radioconda/bin/inspectrum 

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.ubuntu.com>
Enable debuginfod for this session? (y or [n]) y
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff34246c0 (LWP 1809923)]
[New Thread 0x7ffff2bec6c0 (LWP 1809924)]

Thread 1 "inspectrum" received signal SIGILL, Illegal instruction.
0x00007ffff7967388 in estimate_req_filter_len () from /home/mike/radioconda/bin/../lib/libliquid.so.1
(gdb) bt
#0  0x00007ffff7967388 in estimate_req_filter_len () from /home/mike/radioconda/bin/../lib/libliquid.so.1
#1  0x000055555558848b in SpectrogramPlot::getTunerTaps() ()
#2  0x0000555555588647 in SpectrogramPlot::tunerMoved() ()
#3  0x00007ffff6bdffbf in ?? () from /home/mike/radioconda/bin/../lib/libQt5Core.so.5
#4  0x00005555555888a1 in SpectrogramPlot::setFFTSize(int) ()
#5  0x000055555557dc12 in PlotView::setFFTAndZoom(int, int) ()
#6  0x00007ffff6bdffbf in ?? () from /home/mike/radioconda/bin/../lib/libQt5Core.so.5
#7  0x000055555556fa46 in SpectrogramControls::fftOrZoomChanged(int, int) ()
#8  0x0000555555586601 in SpectrogramControls::setDefaults() ()
#9  0x0000555555574b00 in MainWindow::MainWindow() ()
#10 0x000055555556f0db in main ()
(gdb) disassemble
Dump of assembler code for function estimate_req_filter_len:
   0x00007ffff7967360 <+0>:	sub    $0x8,%rsp
   0x00007ffff7967364 <+4>:	vcomiss 0x5a864(%rip),%xmm0        # 0x7ffff79c1bd0
   0x00007ffff796736c <+12>:	ja     0x7ffff7967390 <estimate_req_filter_len+48>
   0x00007ffff796736e <+14>:	vxorps %xmm2,%xmm2,%xmm2
   0x00007ffff7967372 <+18>:	vcomiss %xmm0,%xmm2
   0x00007ffff7967376 <+22>:	jae    0x7ffff7967390 <estimate_req_filter_len+48>
   0x00007ffff7967378 <+24>:	vcomiss %xmm1,%xmm2
   0x00007ffff796737c <+28>:	jae    0x7ffff79673c0 <estimate_req_filter_len+96>
   0x00007ffff796737e <+30>:	call   *0x92dcc(%rip)        # 0x7ffff79fa150
   0x00007ffff7967384 <+36>:	add    $0x8,%rsp
=> 0x00007ffff7967388 <+40>:	vcvttss2usi %xmm0,%eax
   0x00007ffff796738e <+46>:	ret
   0x00007ffff796738f <+47>:	nop
   0x00007ffff7967390 <+48>:	mov    $0x50,%edx
   0x00007ffff7967395 <+53>:	mov    $0x3,%edi
   0x00007ffff796739a <+58>:	mov    $0x1,%eax
   0x00007ffff796739f <+63>:	vcvtss2sd %xmm0,%xmm0,%xmm0
   0x00007ffff79673a3 <+67>:	lea    0x6156e(%rip),%rcx        # 0x7ffff79c8918
   0x00007ffff79673aa <+74>:	lea    0x619d2(%rip),%rsi        # 0x7ffff79c8d83
   0x00007ffff79673b1 <+81>:	call   *0x94c39(%rip)        # 0x7ffff79fbff0
   0x00007ffff79673b7 <+87>:	xor    %eax,%eax
   0x00007ffff79673b9 <+89>:	add    $0x8,%rsp
   0x00007ffff79673bd <+93>:	ret
   0x00007ffff79673be <+94>:	xchg   %ax,%ax
   0x00007ffff79673c0 <+96>:	mov    $0x53,%edx
   0x00007ffff79673c5 <+101>:	mov    $0x3,%edi
   0x00007ffff79673ca <+106>:	mov    $0x1,%eax
   0x00007ffff79673cf <+111>:	vcvtss2sd %xmm1,%xmm1,%xmm0
   0x00007ffff79673d3 <+115>:	lea    0x61506(%rip),%rcx        # 0x7ffff79c88e0
   0x00007ffff79673da <+122>:	lea    0x619a2(%rip),%rsi        # 0x7ffff79c8d83
   0x00007ffff79673e1 <+129>:	call   *0x94c09(%rip)        # 0x7ffff79fbff0
   0x00007ffff79673e7 <+135>:	xor    %eax,%eax
   0x00007ffff79673e9 <+137>:	jmp    0x7ffff79673b9 <estimate_req_filter_len+89>
End of assembler dump.

This is apparently an AVX-512 instruction, but support for that set has been removed from most recent Intel CPUs (I'm using an i7-13700K - Raptor Lake) so I think the library probably should be built without AVX-512 for good compatibility.

I noticed that conda info includes virtual packages : __archspec=1=skylake which I guess is autodetected from the build runner? I wasn't sure whether it's possible to override that at a global level or if this would have to be patched in the liquid-dsp build, so I opened the issue here rather than on liquid-dsp-feedstock for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions