-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Illegal instruction on x86 Qemu guest #272
Comments
Hi @sebastien-villemot , Thank you for the feedback. I didn't meet this error before. Please reproduce this problem on your Qemu guest. I need the backtrace and the exe file. Then, I can objdump the exe to investigate the instruction. Xianyi |
I don't see xsave on the list of cpu extensions, isn't xsave needed for simd registers to work well with function calls? |
I think xsave is for AVX instructions. Qemu looks like a SSE4a CPU cores. |
I have found the cause of this problem. The Qemu guest mentioned above is recognized as an Athlon by the dynamic engine of OpenBLAS (because of its CPU vendor and model). However, the virtual CPU does not have the 3dnow! extension. Hence OpenBLAS crashes when trying to use that set of instructions. I have therefore patched the Debian package for OpenBLAS in such a way that it effectively tests the presence of 3dnow! extension before deciding it is an Athlon CPU. Otherwise, it fallbacks to Katmai. The patch is available there: http://anonscm.debian.org/gitweb/?p=debian-science/packages/openblas.git;a=blob;f=debian/patches/qemu-athlon.patch;h=51174b97098e9b2191bde9210e9ca01f4911b275;hb=HEAD Tell me if you are willing to incorporate it into OpenBLAS, in which case I'll do a pull request. |
Hi @sebastien-villemot , Good work!~ Xianyi |
The present patch verifies that, on machines declaring an Athlon CPU model and family, the 3dnow and 3dnowext feature flags are indeed present. If they are not, it fallbacks on the most generic x86 kernel. This prevents crashes due to illegal instruction on qemu guests with a weird configuration. Closes OpenMathLib#272
The OpenBLAS 0.2.8 Debian package for i386 (x86) fails to build. A test crashes with illegal instruction. The full build log is there:
https://buildd.debian.org/status/fetch.php?pkg=openblas&arch=i386&ver=0.2.8-1&stamp=1375567538
The machine on which the build was performed is a Qemu guest. Here is the contents of its
/proc/cpuinfo
(repeated 8 times):I don't have access to the machine. However, if needed, I could try to replicate the problem by creating a similar Qemu guest.
The text was updated successfully, but these errors were encountered: