<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Lucida Console'; font-size:9pt; font-weight:400; font-style:normal;">On Dienstag, 26. Mai 2009, Christian Koch wrote:<br />&gt; &gt; Can you configure the kamailio server that it generates a core file?<br />&gt; &gt; Then take a look to the backtrace where the invalid memory access was<br />&gt; &gt; done, to verify if its really crashed in the core function, or perhaps<br />&gt; &gt; some other parts has a problem here. Further informations:<br />&gt; &gt; http://www.kamailio.org/dokuwiki/doku.php/troubleshooting:corefiles<br /><br>
Hi Christian,<br /><br>
&gt; We generated a core file, the output of the backtrace is:<br />&gt;<br />&gt; (gdb) bt<br />&gt; #0  0x00b237a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2<br />&gt; #1  0x00b64825 in raise () from /lib/tls/libc.so.6<br />&gt; #2  0x00b66289 in abort () from /lib/tls/libc.so.6<br />&gt; #3  0x080c4436 in qm_free (qm=0x81677e0, p=0x0, file=0x811728e<br />&gt; "proxy.c", func=0x811724e "hostent_cpy", line=187) at mem/q_malloc.c:444<br />&gt; #4  0x0807e329 in hostent_cpy (dst=0x8266e28, src=0x8146134) at proxy.c:187<br />&gt; [..]<br /><br>
Thanks for the backtrace, you could try the attached patch (for 1.5.x) if it solves the crash for you. The additional free after the loop looks indeed a bit suspicious.<br /><br>
&gt; So, there may be an error in proxy.c, but perhaps the reason for our<br />&gt; problem is in modules/htable/ht_var.c in pv_parse_ht_name(), where the<br />&gt; variable hpv is not freed?<br />&gt; Any comments on pv_parse_ht_name() are greatly appreciated. We could try<br />&gt; to fix this, but we're not sure about the sideeffects.<br /><br>
I also suspect the reason for the crash lays in this area. I did not wrote that module, thus i asked Daniel.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Regards,<br>
Henning</p></body></html>