[erlang-questions] Erlang VM segfault?

Paul Davis <>
Mon Feb 23 21:44:41 CET 2009


As weird as it sounds, I've come across a repeatable segfault in
erlang. I haven't minimized it to a simple test case yet, but I
figured I'd describe it and give some GDB output in case it triggers
an idea from anyone.

The context of the segfault is when working in CouchDB with documents
that have a 29,107 element revision history. I'm only specific on the
29,107 because I duplicated in two databases with two different docs
and both of them are exactly 29,107. No idea if that's important.

My first thought was to watch the segfault with GDB to see if that
illuminated anything. It didn't really. I've pasted the first 10
frames for reference. I figured I might as well scroll down to the
58,214th frame, but at about 58,203 gdb segfaulted.

With some help from a couple of the guys in # I
tried bumping the atom table sizes to see if that was the issue. After
changing both the ATOM_SIZE and ATOM_LIMIT define's to 1GiB I'm still
getting segfaults.

Next on the list is to try R12B-5.

Anyone have any thoughts?

Thanks,
Paul Davis

#0  0x000000000049d822 in enc_atom (dep=<value optimized out>,
atom=<value optimized out>,
    ep=<value optimized out>) at beam/external.c:405
#1  0x000000000049e41c in enc_term (dep=0x0, obj=75, ep=<value
optimized out>, dflags=1924) at beam/external.c:561
#2  0x000000000049e2f7 in enc_term (dep=0x0, obj=139755318628650,
ep=0x4 <Address 0x4 out of bounds>, dflags=1924)
    at beam/external.c:678
#3  0x000000000049e2f7 in enc_term (dep=0x0, obj=139755318628674,
ep=0x4 <Address 0x4 out of bounds>, dflags=1924)
    at beam/external.c:678
#4  0x000000000049e7fc in enc_term (dep=0x0, obj=139755318628705,
ep=0x4 <Address 0x4 out of bounds>, dflags=1924)
    at beam/external.c:654
#5  0x000000000049e2f7 in enc_term (dep=0x0, obj=139755318628722,
ep=0x4 <Address 0x4 out of bounds>, dflags=1924)
    at beam/external.c:678
#6  0x000000000049e7fc in enc_term (dep=0x0, obj=139755318628753,
ep=0x4 <Address 0x4 out of bounds>, dflags=1924)
    at beam/external.c:654
#7  0x000000000049e2f7 in enc_term (dep=0x0, obj=139755318628770,
ep=0x4 <Address 0x4 out of bounds>, dflags=1924)
    at beam/external.c:678
#8  0x000000000049e7fc in enc_term (dep=0x0, obj=139755318628801,
ep=0x4 <Address 0x4 out of bounds>, dflags=1924)
    at beam/external.c:654
#9  0x000000000049e2f7 in enc_term (dep=0x0, obj=139755318628818,
ep=0x4 <Address 0x4 out of bounds>, dflags=1924)
    at beam/external.c:678
#10 0x000000000049e7fc in enc_term (dep=0x0, obj=139755318628849,
ep=0x4 <Address 0x4 out of bounds>, dflags=1924)
    at beam/external.c:654



More information about the erlang-questions mailing list