<table cellspacing='0' cellpadding='0' border='0' background='none' style='font-family:arial;font-size:10pt;color:rgb(51, 51, 51);background-color:rgb(255, 255, 255);width:100%;'><tr><td valign='top' style='font: inherit;'><div id="yiv2052635547"><div id="yiv1446269943">I encounter a segmentation fault running<br>Erlang (BEAM) emulator version 5.6.2 [source] [64-bit] [smp:2] [async-threads:0] [kernel-poll:false]<br>Linux 2.6.18-6-amd64 #1 SMP x86_64 GNU/Linux<br><br>My Erlang program is handling web-requests (GET) storing them in an ets table, periodically switching the ets table by creating a new table and sending the finished ets table data to another remote erlang node.<br><br>Here the shortcut version of what am I doing:<br>    DataList = ets:tab2list(FinishedEts),<br>    Data = term_to_binary(DataList),<br>    gen_server:call(Pid, {data, Data}),<br><br>The segfault is not reproducible it
 occurs in a few minutes
 after start of the web server. Load on the server is not an issue - only a 50 Req/s.<br>Segfault also comes after switching off smp and kernel-poll.<br><br>I also saved the last block (DataList) to a file which caused the segfault. But manually re-sending the block did not lead to a segfault.<br><br>The problem exists on all R12B-x versions.<br>On installing R11B-5 on all servers no segfault was generated at all.<br><br>Here you can see what valgrind could identify:<br><br>==6149== Memcheck, a memory error detector.<br>==6149== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.<br>==6149== Using LibVEX rev 1658, a library for dynamic binary translation.<br>==6149== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.<br>==6149== Using valgrind-3.2.1-Debian, a dynamic binary instrumentation framework.<br>==6149== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.<br>==6149== For more details, rerun with: -v<br>==6149==
 <br>==6149== My
 PID = 6149, parent PID = 1.  Prog and args are:<br>==6149==    /usr/local/lib/erlang/erts-5.6.2/bin/beam.smp<br>==6149==    --<br>==6149==    -root<br>==6149==    /usr/local/lib/erlang<br>==6149==    -progname<br>==6149==    erl<br>==6149==    --<br>==6149==    -home<br>==6149==    /root<br>==6149==    -name<br>==6149==    srv<br>==6149==    -setcookie<br>==6149==    xxxx<br>==6149==    -noshell<br>==6149==    -eval<br>==6149==    error_logger:logfile({open, '../log/log.txt'}).<br>==6149==    -eval<br>==6149==    reloader:start().<br>==6149==    -eval<br>==6149==    net_adm:ping('manager@srv1.mydummydomain.org').<br>==6149==   
 -eval<br>==6149==    net_adm:ping('dist@srv3.mydummydomain.org').<br>==6149==    -eval<br>==6149==    net_adm:ping('dist@srv4.mydummydomain.org').<br>==6149==    -eval<br>==6149==    application:start(webnode).<br>==6149==    -eval<br>==6149==    net_adm:ping('dist@srv3.mydummydomain.org').<br>==6149==    -eval<br>==6149==    net_adm:ping('dist@srv4.mydummydomain.org').<br>==6149== <br>==6149== Thread 6:<br>==6149== Invalid read of size 8<br>==6149==    at 0x45A8F2: copy_struct (copy.c:440)<br>==6149==    by 0x47783E: erts_send_message (erl_message.c:734)<br>==6149==    by 0x469E0A: do_send (bif.c:1842)<br>==6149==    by 0x46A3D5: send_2 (bif.c:1918)<br>==6149==    by 0x4D594A: process_main (beam_emu.c:1352)<br>==6149==    by
 0x47C2A9: sched_thread_func (erl_process.c:741)<br>==6149==    by 0x51CBD3: thr_wrapper (ethread.c:474)<br>==6149==    by 0x5007F19: start_thread (in /lib/libpthread-2.3.6.so)<br>==6149==    by 0x52E95D1: clone (in /lib/libc-2.3.6.so)<br>==6149==  Address 0x579E058 is 0 bytes after a block of size 262,184 alloc'd<br>==6149==    at 0x4A1B858: malloc (vg_replace_malloc.c:149)<br>==6149==    by 0x4F06FB: erts_sys_alloc (sys.c:2415)<br>==6149==    by 0x42E89D: create_carrier (erl_alloc_util.c:484)<br>==6149==    by 0x42EF7F: erts_alcu_start (erl_alloc_util.c:2966)<br>==6149==    by 0x434E26: erts_gfalc_start (erl_goodfit_alloc.c:241)<br>==6149==    by 0x42216F: start_au_allocator (erl_alloc.c:771)<br>==6149==    by 0x42892F: erts_alloc_init (erl_alloc.c:575)<br>==6149==    by 0x43B95E:
 early_init (erl_init.c:640)<br>==6149==    by 0x43BAC8: erl_start (erl_init.c:669)<br>==6149==    by 0x420198: main (erl_main.c:28)<br>==6149== <br>==6149== Invalid read of size 8<br>==6149==    at 0x45A8E0: copy_struct (copy.c:441)<br>==6149==    by 0x47783E: erts_send_message (erl_message.c:734)<br>==6149==    by 0x469E0A: do_send (bif.c:1842)<br>==6149==    by 0x46A3D5: send_2 (bif.c:1918)<br>==6149==    by 0x4D594A: process_main (beam_emu.c:1352)<br>==6149==    by 0x47C2A9: sched_thread_func (erl_process.c:741)<br>==6149==    by 0x51CBD3: thr_wrapper (ethread.c:474)<br>==6149==    by 0x5007F19: start_thread (in /lib/libpthread-2.3.6.so)<br>==6149==    by 0x52E95D1: clone (in /lib/libc-2.3.6.so)<br>==6149==  Address 0x579E060 is 8 bytes after a block of size 262,184
 alloc'd<br>==6149==    at 0x4A1B858: malloc (vg_replace_malloc.c:149)<br>==6149==    by 0x4F06FB: erts_sys_alloc (sys.c:2415)<br>==6149==    by 0x42E89D: create_carrier (erl_alloc_util.c:484)<br>==6149==    by 0x42EF7F: erts_alcu_start (erl_alloc_util.c:2966)<br>==6149==    by 0x434E26: erts_gfalc_start (erl_goodfit_alloc.c:241)<br>==6149==    by 0x42216F: start_au_allocator (erl_alloc.c:771)<br>==6149==    by 0x42892F: erts_alloc_init (erl_alloc.c:575)<br>==6149==    by 0x43B95E: early_init (erl_init.c:640)<br>==6149==    by 0x43BAC8: erl_start (erl_init.c:669)<br>==6149==    by 0x420198: main (erl_main.c:28)<br>==6149== <br>==6149== Process terminating with default action of signal 11 (SIGSEGV)<br>==6149==  Bad permissions for mapped region at address 0x585E000<br>==6149==    at
 0x45A8E0: copy_struct (copy.c:441)<br>==6149==    by 0x47783E: erts_send_message (erl_message.c:734)<br>==6149==    by 0x469E0A: do_send (bif.c:1842)<br>==6149==    by 0x46A3D5: send_2 (bif.c:1918)<br>==6149==    by 0x4D594A: process_main (beam_emu.c:1352)<br>==6149==    by 0x47C2A9: sched_thread_func (erl_process.c:741)<br>==6149==    by 0x51CBD3: thr_wrapper (ethread.c:474)<br>==6149==    by 0x5007F19: start_thread (in /lib/libpthread-2.3.6.so)<br>==6149==    by 0x52E95D1: clone (in /lib/libc-2.3.6.so)<br>==6149== <br>==6149== ERROR SUMMARY: 56217 errors from 2 contexts (suppressed: 8 from 1)<br>==6149== malloc/free: in use at exit: 16,315,457 bytes in 38 blocks.<br>==6149== malloc/free: 46,027 allocs, 45,989 frees, 21,041,414 bytes allocated.<br>==6149== For counts of detected errors, rerun with: -v<br>==6149== searching for
 pointers to 38 not-freed blocks.<br>==6149== checked 226,037,216 bytes.<br>==6149== <br>==6149== LEAK SUMMARY:<br>==6149==    definitely lost: 0 bytes in 0 blocks.<br>==6149==      possibly lost: 680 bytes in 5 blocks.<br>==6149==    still reachable: 16,314,777 bytes in 33 blocks.<br>==6149==         suppressed: 0 bytes in 0 blocks.<br>==6149== Reachable blocks (those to which a pointer was found) are not shown.<br>==6149== To see them, rerun with: --show-reachable=yes<br><br>Would be great if anybody has a clue on that.<br><br>Thanks in advance,<br>Erik<br></div></div></td></tr></table><br>



      <hr size=1>
Gesendet von <a  
href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52427/*http://de.overview.mail.yahoo.com" target=_blank>Yahoo! Mail</a>.
<br>
Dem pfiffigeren Posteingang.