[erlang-bugs] Segfault on amd64 Debian with HiPE

Colm Dougan <>
Fri Dec 12 20:09:27 CET 2008


Hi,

I have a reproducible segfault when running some stuff on an amd64
Debian where some of the modules involved are compiled with HiPE.   I
can get around the problem by not compiling one particular module
natively.  I don't seem to get the same behavior on an i386 Debian
with the same code.

Unfortunately the problem seems to be a very subtle interaction
between many different modules in our system, some of which are
compiled natively and others which are not, which makes it rather
difficult to boil doing to a stand-alone test script I can send you.
However, I'd be happy to work (probably off-list) with anyone who
wants more information.

To give a brief, and I appreciate rather vague, synopsis of the code:
the offending module does a pattern on a binary and produces smaller
binaries which are then passed into another module which does more
binary chopping up and eventually hands off to another process which
does ets/mnesia inserts with data.  It seems that the segfault happens
in the GC code somewhere in the final part of that process.

Here is the gdb backtrace :

Core was generated by `/usr/lib/erlang/erts-5.6.5/bin/beam.smp -K true
-- -root /usr/lib/erlang -progn'.
Program terminated with signal 11, Segmentation fault.
#0  0x000000000050b0b2 in gensweep_nstack ()
(gdb) bt
#0  0x000000000050b0b2 in gensweep_nstack ()
#1  0x00000000004c0dc5 in erts_gc_info ()
#2  0x00000000004c1911 in erts_garbage_collect ()
#3  0x000000000050c8cf in hipe_gc ()
#4  0x000000000050d934 in nbif_gc_1 ()
#5  0x00002aaaad12ebd8 in ?? ()
#6  0x00002aaaad12ee50 in ?? ()
#7  0x0000000000000007 in ?? ()
#8  0x00002aaaaaae8f08 in ?? ()
#9  0x00002aaaace29060 in ?? ()
#10 0x00002aaaace2b4d8 in ?? ()
#11 0x00002aaaace2b4d8 in ?? ()
#12 0x000000000050b784 in hipe_mode_switch ()
#13 0x00000000004ddfd6 in process_main ()
#14 0x0000000000481f8f in erts_pid2proc_not_running ()
#15 0x000000000054f834 in ethr_thr_create ()
#16 0x00002b8e5f91bf1a in start_thread () from /lib/libpthread.so.0
#17 0x00002b8e5fbfe5d2 in clone () from /lib/libc.so.6
#18 0x0000000000000000 in ?? ()

Thanks,
Colm



More information about the erlang-bugs mailing list