Bug#781998: libopenblas-base: i386 binaries crash on 586 processors because they don't support SSE instructions

Christian Kastner debian at kvr.at
Tue Apr 28 20:22:22 UTC 2015


Hi Sébastien,

On 2015-04-28 20:37, Sébastien Villemot wrote:
>> When using the libraries provided by libopenblas-base:i386 on a computer
>> with a Pentium (586) processor, a program may crash with SIGILL. Here is
>> the tail of the output of the upstream test suite:
>>
>>   |  OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 ./sblat3 < ./sblat3.dat
>>   |  Makefile:59: recipe for target 'level3' failed
>>   |
>>   |  Program received signal SIGILL: Illegal instruction.
>>   |
>>   |  Backtrace for this error:
>>   |  #0  0xB76D9D6E
>>   |  #1  0xB76DA3C7
>>   |  #2  0xB77D9CDF
>>   |  #3  0xB67A9388
>>   |  Illegal instruction
>>
>>
>> This is because the libraries were built with SSE optimizations enabled.
>>
>> The decision to use SSE appears to be determined at compile-time -- see
>> cpuid.h and cpuid_x86.c -- so the optimizations are based on whatever
>> the buildd supports, and not what the target supports.
> 
> Thanks for your report.
> 
> However your diagnostic is slightly incorrect. On x86 archs, OpenBLAS is
> compiled with the so-called "dynamic arch" feature. The library binary
> contains kernels optimized for several different CPUs, and the right
> kernel is selected at runtime after detecting the CPU.

Oh, I wasn't aware of this, sorry.

> So your problem comes either because the binary does not contain a
> kernel suitable for 586, or because the CPU detection goes wrong.
>
> I know that CPU detection does not always work very well in VMs (see
> #743490 for an example). Did your crash occur on real 586 hardware, or
> in a VM?

I don't have a real 586, but I have an real AMD Geode LX800, which is an
x86 CPU which also lacks SSE, and I managed to reproduce the issue
there. Full log attached.

This is a wheezy system, but with the openblas packages + dependencies
from jessie. The hardware is a PC Engines ALIX 2D.13 system board. I ran
the tests just as the autopkgtest would have done from #781996, but I
executed all the steps manually.

Please let me know if there is anything else I can do.

Regards,
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 781998-geode-lx800.log
Type: text/x-log
Size: 3078 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20150428/927ac8e0/attachment.bin>


More information about the debian-science-maintainers mailing list