<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); ">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
</pre>
</body>
</html>