Bug#676885: libatlas3-base: Illegal instruction in dgetrf

Dima Kogan dima at secretsauce.net
Sun Jun 10 09:53:41 UTC 2012


Package: libatlas3-base
Version: 3.8.4-6
Severity: grave
Justification: renders package unusable

I have a Core2 machine that doesn't have the latest FMA4 instructions. My
understanding that the libatlas3-base package from unstable shouldn't be doing
anything fancy and potentially cpu-specific unless the user rebuilds this
package themselves. I have the following trivial program:

#include <stdio.h>
int dgetrf_(int *m, int *n, double *a, int *lda, int *ipiv, int *info);
int main(void)
{
  int three = 3;
  int ipiv[3];
  int info;
  double A[9] = {1,2,5,2,3,4,5,4,3};
  dgetrf_(&three, &three, A, &three,
          ipiv, &info);
  printf("info: %d\n", info);
  return 0;
}


Session that shows the issue, with some useful diagnostics:


dima at shorty:/tmp$ gcc-4.7 -llapack -o tst tst.c
dima at shorty:/tmp$ ./tst
zsh: illegal hardware instruction (core dumped)  ./tst
dima at shorty:/tmp$ ldd tst
	linux-vdso.so.1 =>  (0x00007fff3bbff000)
	liblapack.so.3 => /usr/lib/liblapack.so.3 (0x00007f3ff4f8e000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3ff4c07000)
	libblas.so.3 => /usr/lib/libblas.so.3 (0x00007f3ff453d000)
	libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007f3ff4227000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f3ff4011000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3ff3df4000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3ff3b72000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f3ff5caf000)
	libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f3ff393d000)
dima at shorty:/tmp$ update-alternatives --display liblapack.so.3
liblapack.so.3 - auto mode
  link currently points to /usr/lib/atlas-base/atlas/liblapack.so.3
/usr/lib/atlas-base/atlas/liblapack.so.3 - priority 35
  slave liblapack.so.3gf: /usr/lib/atlas-base/atlas/liblapack.so.3
/usr/lib/lapack/liblapack.so.3 - priority 10
  slave liblapack.so.3gf: /usr/lib/lapack/liblapack.so.3
Current 'best' version is '/usr/lib/atlas-base/atlas/liblapack.so.3'.
dima at shorty:/tmp$ dpkg -S /usr/lib/atlas-base/atlas/liblapack.so.3
libatlas3-base: /usr/lib/atlas-base/atlas/liblapack.so.3
dima at shorty:/tmp$ dpkg -l libatlas3-base
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                    Version                 Description
+++-=======================-=======================-==============================================================
ii  libatlas3-base          3.8.4-6                 Automatically Tuned Linear Algebra Software, generic shared
dima at shorty:/tmp$ gdb tst core
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /tmp/tst...(no debugging symbols found)...done.
[New LWP 30474]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./tst'.
Program terminated with signal 4, Illegal instruction.
#0  0x00007fa03d281bb7 in ATL_dgetrfC () from /usr/lib/liblapack.so.3
(gdb) disass
Dump of assembler code for function ATL_dgetrfC:
   0x00007fa03d281950 <+0>:	mov    %rbx,-0x30(%rsp)
   0x00007fa03d281955 <+5>:	mov    %rbp,-0x28(%rsp)
..........
   0x00007fa03d281bb3 <+611>:	lea    (%r12,%rax,8),%rbx
=> 0x00007fa03d281bb7 <+615>:	vmovsd (%rbx),%xmm1
   0x00007fa03d281bbb <+619>:	vucomisd 0x996ced(%rip),%xmm1        # 0x7fa03dc188b0
   0x00007fa03d281bc3 <+627>:	mov    0x38(%rsp),%r10d
..........
dima at shorty:/tmp$ cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 15
model name	: Intel(R) Core(TM)2 CPU         T7400  @ 2.16GHz
stepping	: 6
cpu MHz		: 2167.000
cache size	: 4096 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 2
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 10
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm dts tpr_shadow
bogomips	: 4322.43
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:



-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.1.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/dash

Versions of packages libatlas3-base depends on:
ii  libc6         2.13-33
ii  libgcc1       1:4.7.0-12
ii  libgfortran3  4.7.0-12

libatlas3-base recommends no packages.

Versions of packages libatlas3-base suggests:
ii  liblapack3  3.4.1-1

-- no debconf information





More information about the debian-science-maintainers mailing list