libopenblas-base crashes octave

Asked by Joshua Milas

When the libopenblas-base package is installed, using the plot function in octave causes a crash

For example, when running plot(1)
Octave reports
```
panic: Illegal instruction -- stopping myself...
attempting to save variables to 'octave-workspace'...
save to 'octave-workspace' complete
Illegal instruction
```

Using GDB to debug, it reports
```
Program received signal SIGILL, Illegal instruction.
0x00007fffed1c3220 in dgemm_otcopy_OPTERON_SSE3 () from /usr/lib/libopenblas.so.0
```

Getting more info
```
(gdb) info line *0x00007fffed1c3220
No line number information available for address 0x7fffed1c3220 <dgemm_otcopy_OPTERON_SSE3+32>
```
Disassembling the code,
```
(gdb) disassemble /r 0x00007fffed1c3200,+36
Dump of assembler code from 0x7fffed1c3200 to 0x7fffed1c3224:
   0x00007fffed1c3200 <dgemm_otcopy_OPTERON_SSE3+0>: 41 57 push %r15
   0x00007fffed1c3202 <dgemm_otcopy_OPTERON_SSE3+2>: 41 56 push %r14
   0x00007fffed1c3204 <dgemm_otcopy_OPTERON_SSE3+4>: 41 55 push %r13
   0x00007fffed1c3206 <dgemm_otcopy_OPTERON_SSE3+6>: 41 54 push %r12
   0x00007fffed1c3208 <dgemm_otcopy_OPTERON_SSE3+8>: 55 push %rbp
   0x00007fffed1c3209 <dgemm_otcopy_OPTERON_SSE3+9>: 53 push %rbx
   0x00007fffed1c320a <dgemm_otcopy_OPTERON_SSE3+10>: 48 89 f0 mov %rsi,%rax
   0x00007fffed1c320d <dgemm_otcopy_OPTERON_SSE3+13>: 48 89 f3 mov %rsi,%rbx
   0x00007fffed1c3210 <dgemm_otcopy_OPTERON_SSE3+16>: 48 83 e0 fc and $0xfffffffffffffffc,%rax
   0x00007fffed1c3214 <dgemm_otcopy_OPTERON_SSE3+20>: 48 83 e3 fe and $0xfffffffffffffffe,%rbx
   0x00007fffed1c3218 <dgemm_otcopy_OPTERON_SSE3+24>: 48 0f af c7 imul %rdi,%rax
   0x00007fffed1c321c <dgemm_otcopy_OPTERON_SSE3+28>: 48 0f af df imul %rdi,%rbx
=> 0x00007fffed1c3220 <dgemm_otcopy_OPTERON_SSE3+32>: 0f 0e femms
   0x00007fffed1c3222 <dgemm_otcopy_OPTERON_SSE3+34>: 4d 8d 2c c0 lea (%r8,%rax,8),%r13
End of assembler dump.
```

It seems the problem is with the FEMMS instruction. I am running this on an AMD Opteron 23xx, which should have the 3dnow! extensions, but I do not see it in cpuinfo

```
processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 6
model name : AMD Opteron 23xx (Gen 3 Class Opteron)
stepping : 1
microcode : 0x1000065
cpu MHz : 2299.998
cache size : 512 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl extd_apicid pni cx16 x2apic popcnt hypervisor abm sse4a misalignsse 3dnowprefetch vmmcall
bugs : fxsave_leak sysret_ss_attrs
bogomips : 4599.99
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management:
```

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu openblas Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Radoslav Neychev (nexes) said :
#2

I've also faced this bug using python, both versions 2 and 3 on several machines.
Should this ticket be reopened, or it's better to create another one?