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

Christian Kastner debian at kvr.at
Mon Apr 6 10:16:39 UTC 2015


Package: libopenblas-base
Version: 0.2.12-1
Severity: important

Hi,

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.

However, as we still officially support 586 processors on i386, the
customary solution is to to disable SSE optimizations entirely for i386.
See [1] for some examples.

To reproduce this issue, you can use vmdebootstrap(8) and QEMU to
quickly recreate such an environment, and use the autopkgtest submitted
in #781996 [2] to run the tests against the locally installed binaries:

    $ sudo vmdebootstrap \
            --size 2g \
            --owner <YOUR-USERNAME> \
            --enable-dhcp \
            --mirror http://http.debian.net/debian \
            --configure-apt \
            --distribution sid \
            --arch i386 \
            --foreign /usr/bin/qemu-i386-static \
            --no-kernel \
            --package linux-image-586 \
            --package autopkgtest \
            --image sid.raw

    $ qemu-system-i386 -enable-kvm -cpu pentium sid.raw

Then, in the guest, execute the autopkgtest command from #781996.

Regards,
Christian


[1] http://codesearch.debian.net/results/sse2%20path%3Adebian%2Frules/page_0

[2] https://bugs.debian.org/781996

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20150406/c968cfe0/attachment.sig>


More information about the debian-science-maintainers mailing list