[erlang-bugs] Segmentation fault in Erlang R12B

Erik Demming erik_demming@REDACTED
Thu Jun 5 10:23:35 CEST 2008


As you can see from the call-path in valgrind output, when sending a message the emulator tries to call copy_struct which leads to the problem a few warnings later.
If we uncommented the gen_server:call no segfault emerged.
Here is a modified example of what we store in ets and try to send.

Output from ets:tab2list:
[{106, binary(record)}, {84, binary(record)}, {77, binary(record),...}]

A few tens of those records are normally stored until sending them.

The records have following structure:
{rec,1212578249037785004, 4, "192.168.2.1", 1212578249, 1212578249037785004,

     1212578249037785004, 0, "www.somedomain.org", "/path/to/something", '', 0, 1, 0, '', 0, '', 0, '',

     0, '', 0, '',
    "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)",

     2}

Only IP, BIGNUMS, domain, path and user-agent changes on each record.

We use term_to_binary(Rec) also term_to_binary(Rec, [{compressed,N}]) leads to same problem.

Sorry, I cannot provide info for size of binary - tell me if you really need that I will provide that info later.




--- Matthew Dempsky <matthew@REDACTED> schrieb am Mi, 4.6.2008:
Von: Matthew Dempsky <matthew@REDACTED>
Betreff: Re: [erlang-bugs] Segmentation fault in Erlang R12B
An: erik_demming@REDACTED
CC: erlang-bugs@REDACTED
Datum: Mittwoch, 4. Juni 2008, 20:28

2008/6/4 Erik Demming <erik_demming@REDACTED>:
> Here the shortcut version of what am I doing:
>     DataList = ets:tab2list(FinishedEts),
>     Data = term_to_binary(DataList),
>     gen_server:call(Pid, {data, Data}),

Do you know which step here caused the segmentation fault?  What data
types are you storing in the ets table?  Anything other than lists,
tuples, numbers, and/or binaries?  If term_to_binary succeeds, how big
is Data when you have a segfault?


      __________________________________________________________
Gesendet von Yahoo! Mail.
Dem pfiffigeren Posteingang.
http://de.overview.mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20080605/e99d35ab/attachment.htm>


More information about the erlang-bugs mailing list