-
Notifications
You must be signed in to change notification settings - Fork 21
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 system without avx2 #203
Comments
Which codec are you using inside blosc2? Can you send a code to reproduce the issue? There are chances that this comes from internal zlib-ng. For the development team, one of the issues is that finding boxes without AVX2 for testing is increasingly difficult for us. |
This issue happened decompressing a value that was compressed using "zstd" with blosc1. FWIW, I can't seem to get this issue compressing and decompressing all within blosc2, although I don't have the same data in my experiments. I'm pretty the failure happens in the blosc2 library in
|
I've been able to reproduce this using a simpler example on my avx2-free vm.
The bottom of the stack trace looks like this:
This disassembly of the illegal instruction looks like this:
It's worth noting that if I compress the data using blosc2 and the ZSTD codec, I don't have an issue. |
I've had a chance to investigate this more. It's been a while since I've used gdb, so it took me a moment, but it's probably obvious to you that the issue is that we have an avx2 instruction in general |
That's interesting. Can you double check that the issue is in generic |
At Blosc/c-blosc2#436, it looks like we started compiling |
@FrancescAlted I know I didn't get around to following up with the proof of where the code was generated using "printf", but I think the link I provided and a glance at the build logs would show that a potentially unavailable instruction set is being targeted by the compiler when building this file. Please let me know if this is something you might look into, otherwise I'll need to find a workaround. Thanks. |
We are discussing about this right now in PR Blosc/c-blosc2#622. If you can provide help (for code or testing), you are more than welcome. |
After Blosc/c-blosc2#622 being merged, this should be fixed. Please feel free to reopen it if necessary. |
@FrancescAlted Is a 2.x python-blosc2 release planned with these changes to c-blosc2? Thanks. |
Python-Blosc2 2.7.1 is out. It should fix this issue. |
I'm trying to use python-blosc2 (2.6.2) on a system without avx2 but I'm getting an illegal instruction error on using avx2 instructions. The failed instruction disassembles as follows:
As you can see below (using gcc 10, which appears to be the major version used to compile the binary), avx2 is not reported as available on the system.
The c-blosc2 library I'm using is from the wheel and appears to be have been built with gcc 10.2.1:
My expectation is that the library would not use
shuffle_axv2
based on the runtime flags, but for some reason we python-blosc2 is trying to use it anyway. Is there any other reason that we might still try to use this despite the values from__builtin_cpu_supports
? Thanks.The text was updated successfully, but these errors were encountered: