[erlang-questions] Erlang VM segfault?

Bjorn Gustavsson bgustavsson@REDACTED
Tue Feb 24 09:04:41 CET 2009

On Mon, Feb 23, 2009 at 9:44 PM, Paul Davis <paul.joseph.davis@REDACTED> wrote:
> 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 #erlang@REDACTED 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

The conversion from an Erlang term to the external format is currently
implemented as
a recursive C function. It is on our TO-DO list to rewrite this
function (and some other
functions) to use an explicit stack instead of the C stack.

As a workaround until we fix the issue, you can try increasing the C stack size.

Björn Gustavsson, Erlang/OTP, Ericsson AB

More information about the erlang-questions mailing list