[erlang-bugs] Floating point exception (core dumped) in beam

Mikael Pettersson mikpe@REDACTED
Wed Dec 12 17:19:54 CET 2007


Maximillian Dornseif writes:
 > 
 > 
 > Mikael Pettersson-3 wrote:
 > > 
 > > Can you disassemble pthread_testcancel() up to and including the
 > > instruction
 > > at 0x281a731b?
 > > 
 > 
 > That was more than I thought. The full Output is available at
 > http://static.23.nu/md/Pictures/diss-beam.txt , below is a clipped version.
...
 > 0x281a7312 <pthread_testcancel+2534>:   mov    %esi,%esi
 > 0x281a7314 <pthread_testcancel+2536>:   mov    $0x17e,%eax
 > 0x281a7319 <pthread_testcancel+2541>:   int    $0x80
 > 0x281a731b <pthread_testcancel+2543>:   jb     0x281a7300
 > <pthread_testcancel+2516>
 > 0x281a731d <pthread_testcancel+2545>:   ret    

The kernel reports SIGFPE on return from syscall 0x17e.
This looks like a kernel or libc bug.

Possibly the kernel expects FP exceptions to be masked
and cannot handle user-space (BEAM) having enabled them.
You can test that theory by editing erts/configure: find
fpe-test.c in erts/configure, place a "return 1;" at the
start of main(), run ./configure, ensure that it says that
floating-point exceptions are unreliable, make the system,
and run the test case again. If things now work then this
system needs to be blacklisted (due to apparent kernel/libc
bugs) from using FP exceptions.



More information about the erlang-bugs mailing list