Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ice9-bluetooth crashes with "Illegal instruction: 4" on macOS 14.4.1 #33

Open
XenoKovah opened this issue May 4, 2024 · 0 comments
Open

Comments

@XenoKovah
Copy link

Testing how many channels a M1 MacBook Air can handle, and I'm getting the following error:

MacBook-Air:build xeno$ ./ice9-bluetooth -f /dev/random -s -C 20
Illegal instruction: 4

I manually installed libbladeRF from the latest master branch code. And I installed the other prerequisites with "brew install liquid-dsp hackrf uhd" (just incase I also did a brew update and brew upgrade liquid-dsp hackrf uhd just to make sure I was on the latest.

The crash is at the following according to lldb:

MacBook-Air:build xeno$ lldb ./ice9-bluetooth 
(lldb) target create "./ice9-bluetooth"
Current executable set to '/Users/xeno/ice9-bluetooth-sniffer/build/ice9-bluetooth' (x86_64).
(lldb) run -f /dev/random -s -C 20
Process 1823 launched: '/Users/xeno/ice9-bluetooth-sniffer/build/ice9-bluetooth' (x86_64)
warning: libobjc.A.dylib is being read from process memory. This indicates that LLDB could not read from the host's in-memory shared cache. This will likely reduce debugging performance.

Process 1823 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
    frame #0: 0x000000010908a312 libliquid.dylib`liquid_firdes_kaiser + 13
libliquid.dylib`liquid_firdes_kaiser:
->  0x10908a312 <+13>: vmovaps %xmm0, %xmm3
    0x10908a316 <+17>: vmovss 0x409de(%rip), %xmm0      ; liquid_version + 60, xmm0 = mem[0],zero,zero,zero 
    0x10908a31e <+25>: vucomiss %xmm2, %xmm0
    0x10908a322 <+29>: ja     0x10908a388               ; <+131>
Target 0: (ice9-bluetooth) stopped.

I also get the following warning during compilation which also suggests perhaps there's something wrong with brew's liquid-dsp package and brew install liquid-dsp is no longer sufficient?

MacBook-Air:build xeno$ make
[  5%] Generate Help Header
[ 11%] Building C object CMakeFiles/ice9-bluetooth.dir/bladerf.c.o
[ 17%] Building C object CMakeFiles/ice9-bluetooth.dir/bluetooth.c.o
[ 23%] Building C object CMakeFiles/ice9-bluetooth.dir/btbb/btbb.c.o
[ 29%] Building C object CMakeFiles/ice9-bluetooth.dir/burst_catcher.c.o
In file included from /Users/xeno/ice9-bluetooth-sniffer/burst_catcher.c:10:
/usr/local/include/liquid/liquid.h:6380:26: warning: redefinition of typedef 'qdsync_cccf' is a C11 feature [-Wtypedef-redefinition]
LIQUID_QDSYNC_DEFINE_API(LIQUID_QDSYNC_MANGLE_CCCF,
                         ^
/usr/local/include/liquid/liquid.h:6277:32: note: previous definition is here
typedef struct qdsync_cccf_s * qdsync_cccf;
                               ^
1 warning generated.
[ 35%] Building C object CMakeFiles/ice9-bluetooth.dir/fsk.c.o
In file included from /Users/xeno/ice9-bluetooth-sniffer/fsk.c:11:
/usr/local/include/liquid/liquid.h:6380:26: warning: redefinition of typedef 'qdsync_cccf' is a C11 feature [-Wtypedef-redefinition]
LIQUID_QDSYNC_DEFINE_API(LIQUID_QDSYNC_MANGLE_CCCF,
                         ^
/usr/local/include/liquid/liquid.h:6277:32: note: previous definition is here
typedef struct qdsync_cccf_s * qdsync_cccf;
                               ^
1 warning generated.
[ 41%] Building C object CMakeFiles/ice9-bluetooth.dir/hackrf.c.o
[ 47%] Building C object CMakeFiles/ice9-bluetooth.dir/hash.c.o
[ 52%] Building C object CMakeFiles/ice9-bluetooth.dir/help.c.o
[ 58%] Building C object CMakeFiles/ice9-bluetooth.dir/options.c.o
[ 64%] Building C object CMakeFiles/ice9-bluetooth.dir/pcap.c.o
[ 70%] Building C object CMakeFiles/ice9-bluetooth.dir/usrp.c.o
[ 76%] Building C object CMakeFiles/ice9-bluetooth.dir/pfbch2.c.o
[ 82%] Building C object CMakeFiles/ice9-bluetooth.dir/window.c.o
[ 88%] Building C object CMakeFiles/ice9-bluetooth.dir/main.c.o
In file included from /Users/xeno/ice9-bluetooth-sniffer/main.c:20:
/usr/local/include/liquid/liquid.h:6380:26: warning: redefinition of typedef 'qdsync_cccf' is a C11 feature [-Wtypedef-redefinition]
LIQUID_QDSYNC_DEFINE_API(LIQUID_QDSYNC_MANGLE_CCCF,
                         ^
/usr/local/include/liquid/liquid.h:6277:32: note: previous definition is here
typedef struct qdsync_cccf_s * qdsync_cccf;
                               ^
1 warning generated.
[ 94%] Building CXX object CMakeFiles/ice9-bluetooth.dir/vkfft/fft.cc.o
[100%] Linking CXX executable ice9-bluetooth
[100%] Built target ice9-bluetooth

Note: it's working on my 14.4.1 x86-based Mac, just not this M1 Mac. But it's possible and likely that the x86-based Mac has some older not-the-latest versions of software. I can upgrade the x86-based Mac to try and reproduce if needed, but I'd rather keep it in a working state if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant