-
Notifications
You must be signed in to change notification settings - Fork 44
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
Support for emulating AVX for x86 programs #530
Comments
Author of FlashMQ here. I guess I need to configure the repo better, because it's amd64 only, not ARM. There is a FlashMQ can be built on ARM though. If not using |
I'd have to investigate more but the most likely cause of this crash is that FlashMQ assumes support for AVX instructions, and QEMU doesn't support emulating AVX. (But of course, running a native ARM build is better if possible.) |
@halfgaar Thanks for the quick response! I'll try to compile it, maybe this solves it. |
@kdrag0n Thanks! I had the same problem with signal 4 also with some other software binaries. Like this one:
|
@halfgaar I have managed to compile it myself. Still it fails with the same error message. root@ubuntu:/Users/roman/Desktop/work/linux/FlashMQ/FlashMQBuildRelease# ls
CMakeCache.txt CMakeFiles cmake_install.cmake CPackConfig.cmake _CPack_Packages CPackSourceConfig.cmake flashmq flashmq_1.6.5-1691940405+jammy_amd64.deb install_manifest.txt Makefile
root@ubuntu:/Users/roman/Desktop/work/linux/FlashMQ/FlashMQBuildRelease# ./flashmq
qemu: uncaught target signal 4 (Illegal instruction) - core dumped
Illegal instruction
root@ubuntu:/Users/roman/Desktop/work/linux/FlashMQ/FlashMQBuildRelease#
|
@kdrag0n If QEMU doesn't support emulating AVX, we're out of luck, I guess? I just love the convenience of having a snappy Linux ENV with a single bash command. But well... If there is no other way, I would have to fallback to VirtualBox or Parallels Desktop. Thanks for Orbstack, amazing piece of software! |
If you remove the following from
|
The latest version of QEMU does support emulating AVX so you can try installing your own copy in the machine. OrbStack uses an older version for stability reasons. |
@halfgaar Removing those lines from CMakeLists.txt worked! root@ubuntu:/Users/roman/Desktop/work/linux/FlashMQ/FlashMQBuildRelease# ./flashmq
[2023-08-14 13:27:14] [INFO] Setting rlimit nofile to 1000000.
[2023-08-14 13:27:14] [NOTICE] 8 CPUs are detected, making as many threads. Use 'thread_count' setting to override.
[2023-08-14 13:27:14] [INFO] Loading '/var/lib/flashmq/retained.db'
[2023-08-14 13:27:14] [INFO] Loading '/var/lib/flashmq/sessions.db'
[2023-08-14 13:27:14] [NOTICE] Starting FlashMQ version 1.6.5, release build without SSE support.
[2023-08-14 13:27:14] [NOTICE] Creating IPv4 non-SSL TCP listener on [0.0.0.0]:1883
[2023-08-14 13:27:14] [NOTICE] Creating IPv6 non-SSL TCP listener on [::]:1883
[2023-08-14 13:27:14] [INFO] Switching logging from stdout to logfile '/var/log/flashmq/flashmq.log' Thank, will continue playing with it! |
I had the same issue when using the docker image from milvus. . However, it worked fine when I switched to Docker desktop that uses the rosetta2 to emulate x86 architecture. I assume, in orbstack, qemu is used to emulate and it's the cause of the error. Is there any way to use rosetta on orbstack instead of qemu? |
qemu: uncaught target signal 4 (Illegal instruction) - core dumped
@rkomu OrbStack uses Rosetta by default unless you disable it in Settings, but neither one supports emulating AVX. Follow the upstream issue instead: milvus-io/milvus#21483 @mindreframer This is about QEMU on the Linux side, not on macOS. Ubuntu's QEMU is also too old to support AVX so unfortunately there aren't many options here. Diagnostic reports are already available at |
@kdrag0n Thanks for the response! Let's hope it will be possible to upgrade sometime soon. |
I have the same situation but for the MongoDB package. I need to emulate the amd64 installation and Mongo failed to start due to missing AVX support. I know mongo has an arm64 package but I specifically need to test something for the amd64 package. The emulation of AVX using orbstack VMs will come in handy... |
@kdrag0n thanks for identifying the same issue with AlloyDB. However, some feature are not available for the native ARM build of AlloyDB, therefore I can't use OrbStack with it at all if I need these features.
is there a way to access OrbStack's docker machine to try to update the QEMU as an experimental workaround? |
Rosetta in macOS 15 Sequoia has added AVX and AVX2 support, which seems to work on macOS binaries but not within OrbStack. Is there a way for OrbStack to take advantage of this support, or does Rosetta for Linux still not support those instructions? |
Describe the bug
The binary for FlashMQ is not starting up.
To Reproduce
Install via following instructions
Expected behavior
It should start up without issues.
Diagnostic report (required)
OrbStack info:
Version: 0.16.0 (160000)
Commit: b92cc5239da462d9918d844fc5b04ec110a35e1a (v0.16.0)
System info:
macOS: 12.3.1 (21E258)
CPU: arm64, 8 cores
CPU model: Apple M1
Full report: https://orbstack.dev/_admin/diag/orbstack-diagreport_2023-08-12T08-47-39.137319Z.zip
Screenshots and additional context (optional)
No response
The text was updated successfully, but these errors were encountered: