Subject: Audacity crashes.
To: None <port-amd64@netbsd.org>
From: Richard Rauch <rkr@olib.org>
List: port-amd64
Date: 03/14/2005 07:10:16
I've been having trouble with Audacity crashing a lot.  I don't know if
it is AMD64-related, but I decided to run gdb on the corefile for a
change.  (As big, and interdependent as it is, I really don't want to
get into trying to seriously debug it, but I was curious where it was
crashing.)

The crash announces:

Floating point exception 

The crash is happening, according to the backtrace, in libm's floor():

#0  0x0000000204c13ee7 in floor () from /usr/lib/libm.so.0

...since that's the sole output of bt, the bt may be completely scrambled.
Still...  Here's a partial disassembly of libm::floor():

0x204c13ec4 <floor>:    movsd  %xmm0,0xfffffffffffffff8(%rsp,1)
0x204c13eca <floor+6>:  fstcw  0xfffffffffffffff4(%rsp,1)
0x204c13ecf <floor+11>: mov    0xfffffffffffffff4(%rsp,1),%dx
0x204c13ed4 <floor+16>: or     $0x400,%dx
0x204c13ed9 <floor+21>: and    $0xf7ff,%dx
0x204c13ede <floor+26>: mov    %dx,0xfffffffffffffff0(%rsp,1)
0x204c13ee3 <floor+31>: fldcw  0xfffffffffffffff0(%rsp,1)
0x204c13ee7 <floor+35>: fldl   0xfffffffffffffff8(%rsp,1)
0x204c13eeb <floor+39>: frndint 
0x204c13eed <floor+41>: fldcw  0xfffffffffffffff4(%rsp,1)

...note that the bt is pointing to the fldl instruction.  I don't
know if that's the actual instruction that failed, or if that's
the instruction pointer for the next instruction.

I don't know what fldcw or fldl would mean.  I'd guess some kind
of FLoat Divide, but it's not clear what the second operand would
be.  Can that instruction fail with bad data?  If so, surely floor()
should not be compiled that way...  (floor(), by my understanding,
should always work.  For infinite values or NaN, it should just
return its parameter.  The source for the library seems to try to do
that---though the source is a fairly fresh CVS update, and the
userland library is not so fresh.  (^&  Or maybe I need to update
GCC and rebuild stuff?)


Just tossing it out to see if anyone has any thoughts.  Since I
don't know what the operation is, nor what implicit operands it
may have, it's a bit hard to even know what is wrong with the
operation.

I'm half afraid to hear that this means that the FPU is malfunctioning.
I've had to replace two memory cards in this machine already.

I guess that the next time I get a crash in Audacity, I'll see if
it points to the same instruction (or a similar one elsewhere),
but I thought that I'd ask.

-- 
  "I probably don't know what I'm talking about."  http://www.olib.org/~rkr/