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

Mikael Pettersson <>
Thu Dec 13 10:13:42 CET 2007


Maximillian Dornseif writes:
 > 
 > 
 > Mikael Pettersson-3 wrote:
 > > 
 > > 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.
 > > 
 > 
 > I changed the configure script an got
 > 
 > checking for unreliable floating point execptions... unreliable; testing in
 > software instead
 > 
 > I then compiled, installed an retried the testcase - and  got the same issue
 > and more or less the same coredump.
 > 
 > 
 > 
 > Mikael Pettersson-3 wrote:
 > > 
 > > If things now work then this
 > > system needs to be blacklisted (due to apparent kernel/libc
 > > bugs) from using FP exceptions.
 > > 
 > 
 > I checked on FreeBSD 6.2 by copying the .beam files and the Mnedia directory
 > to an Machine running FreeBSD 6.2 and I can't trigger the issue there. But
 > maybe this is related to the CPU and not to the OS.
 > 
 > $ uname -a   
 > FreeBSD boingball.XXX 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12
 > 10:40:27 UTC 2007    
 > :/usr/obj/usr/src/sys/GENERIC  i386
 > FreeBSD is a registered trademark of The FreeBSD Foundation.
 > FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007
 >     :/usr/obj/usr/src/sys/GENERIC
 > ACPI APIC Table: <PTLTD  	 APIC  >
 > Timecounter "i8254" frequency 1193182 Hz quality 0
 > CPU: Intel(R) Pentium(R) 4 CPU 2.26GHz (2259.15-MHz 686-class CPU)
 >   Origin = "GenuineIntel"  Id = 0xf27  Stepping = 7

The broken system runs 32-bit FreeBSD 5.4 on a P4 Xeon.
The working system runs 32-bit FreeBSD 6.2 on a P4.

It is most definitely FreeBSD 5.4 that's broken here,
especially since the problem occurs even when BEAM doesn't
enable and use FP exceptions.

Unless someone (not me) is very very motivated to support
FreeBSD 5.4, I don't think there is much any core Erlang
developers can do about this problem. You should upgrade,
or let the FreeBSD developers deal with it.



More information about the erlang-bugs mailing list