[erlang-bugs] Segmentation fault with ETS bag implementation in 64-bit Erlang

Sverker Eriksson sverker@REDACTED
Fri Feb 17 22:58:59 CET 2012


Hi Diego,

Thanks for the exemplary test code to provoke the bug. I get the same 
crash on my 64-bit machine.

I think I found what it is. To be continued on Monday...

/Sverker, Erlang/OTP, Ericsson

Diego Llarrull wrote:
> Hello everyone,
>
> I'm currently developing a distributed store written entirely in 
> Erlang, and we are having a somewhat awkward problem: the app runs 
> fine in 32-bit Erlang VMs but ALWAYS crashes in 64-bit Erlang VMs.
> We've tested 64-bit Erlang VMs running on Linux (XUbuntu 11.04/Fedora 
> 15) 64-bit, OS X Lion 64-bit, and FreeBSD 8.2 64-bit with exactly the 
> same result: a segmentation fault as soon as we try to
> to use the store.
>
> We managed to track down one bug, which was caused by inserting the 
> same record twice, on a compressed, named ETS table with bag 
> implementation. This causes, inexplicably, a segmentation fault which
> is solved my changing the Ets table to a set.
>
>
> To replicate the bug, the following code can be run:
>
>     -module(segviola14).
>     -compile(export_all).
>
>     init() ->
>     S =     {
>                {1316110174588445,1316110174588583},
>                {1316110174588445,1316110174588590}
>     },
>     DB=ets:new(childName, [named_table, bag, compressed]),
>     ets:insert(DB, S), io:format("guau!~n"),
>     ets:insert(DB, S), io:format("guau!~n").
>
>     
>     The output for this code is:
>
>>  segviola14:init().
> guau!
> Segmentation fault (core dumped)
>
>
> In 32-bit Erlang VMs this code works just fine. We are, however, 
> having segmentation faults throught our code that make us think the 
> bug affects a core area of the VM-code. 32-bit Erlang showed
> none of these problems, with everything running fine.
>
> Any ideas?
>
> Thank you all in advance.
>
>
> Diego
>
>  
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://erlang.org/mailman/listinfo/erlang-bugs
>   





More information about the erlang-bugs mailing list