<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [Serusers] SER crash !!! ( Problem with q_malloc ???? )</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Hi Jan,</FONT>
</P>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp; Thank you for your reply and sorry for coming back so late on the subject. Below is some output from SER and the backtrace that I obtained with gdb.</FONT></P>

<P><FONT SIZE=2>Quang</FONT>
</P>

<P><FONT SIZE=2>-----Message d'origine-----</FONT>
<BR><FONT SIZE=2>De : Jan Janak [<A HREF="mailto:jan@iptel.org">mailto:jan@iptel.org</A>] </FONT>
<BR><FONT SIZE=2>Envoyé : jeudi 27 janvier 2005 18:47</FONT>
<BR><FONT SIZE=2>À : PHAN, Quang-Minh (Docteur Ordinateur)</FONT>
<BR><FONT SIZE=2>Cc : 'serusers@lists.iptel.org'</FONT>
<BR><FONT SIZE=2>Objet : Re: [Serusers] SER crash !!! ( Problem with q_malloc ???? )</FONT>
</P>

<P><FONT SIZE=2>Unfortunately the coredump itself is not enough, could you make a</FONT>
<BR><FONT SIZE=2>backtrace in gdb so that we can see where exactly does it crash ?</FONT>
</P>

<P><FONT SIZE=2>&nbsp; Jan.</FONT>
</P>

<P><FONT SIZE=2>On 20-01 11:50, PHAN, Quang-Minh (Docteur Ordinateur) wrote:</FONT>
<BR><FONT SIZE=2>&gt; Hi all,</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I'm running SER 0.9 on an FEDORA CORE 3 machine and it crashes every</FONT>
<BR><FONT SIZE=2>&gt; time I try to use mysql module. I have compile SER in mode debug and spent</FONT>
<BR><FONT SIZE=2>&gt; some time trying to figure it out. I first found a bug in the q_find_free</FONT>
<BR><FONT SIZE=2>&gt; function in q_malloc.c:290:&nbsp; &quot;if (f-&gt;size == size)&quot; which cause memory</FONT>
<BR><FONT SIZE=2>&gt; access violation when f is NULL. I fixed this but it didn't solve the</FONT>
<BR><FONT SIZE=2>&gt; problem.</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I attached here the coredump and the ser.cfg file. The version of MySQL</FONT>
<BR><FONT SIZE=2>&gt; Server and libraries is 4.1</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; Any helps will be highly appreciated,</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; Quang</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
</P>

<P><FONT SIZE=2>[ser@localhost sbin]$ ./ser -f ser.cfg</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 127.0.0.1 [127.0.0.1]:5060</FONT>
<BR><FONT SIZE=2>&nbsp;0(9063) WARNING: fix_socket_list: could not rev.</FONT>
<BR><FONT SIZE=2>resolve 192.168.4.24</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 192.168.4.24 [192.168.4.24]:5060</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 127.0.0.1 [127.0.0.1]:5060</FONT>
<BR><FONT SIZE=2>&nbsp;0(9063) WARNING: fix_socket_list: could not rev.</FONT>
<BR><FONT SIZE=2>resolve 192.168.4.24</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 192.168.4.24 [192.168.4.24]:5060 Listening on</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; udp: 127.0.0.1 [127.0.0.1]:5060</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; udp: 192.168.4.24 [192.168.4.24]:5060</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp: 127.0.0.1 [127.0.0.1]:5060</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp: 192.168.4.24 [192.168.4.24]:5060</FONT>
<BR><FONT SIZE=2>Aliases:</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp: localhost:5060</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tcp: localhost.localdomain:5060</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; udp: localhost:5060</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; udp: localhost.localdomain:5060</FONT>
</P>

<P><FONT SIZE=2>WARNING: no fork mode&nbsp; and more than one listen address found(will use only the the first one) stateless - initializing</FONT>
<BR><FONT SIZE=2>&nbsp;0(0) Maxfwd module- initializing</FONT>
<BR><FONT SIZE=2>Erreur de segmentation (core dumped)</FONT>
<BR><FONT SIZE=2>[ser@localhost sbin]$ ls</FONT>
<BR><FONT SIZE=2>core.9063&nbsp; gen_ha1&nbsp; ser&nbsp; ser.cfg&nbsp; serctl&nbsp; ser_mysql.sh&nbsp; serunix [ser@localhost sbin]$ gdb ser core.9063 </FONT>
<BR><FONT SIZE=2>GNU gdb Red Hat Linux (6.1post-1.20040607.41rh) Copyright 2004 Free Software Foundation, Inc.</FONT>
<BR><FONT SIZE=2>GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions.</FONT></P>

<P><FONT SIZE=2>Type &quot;show copying&quot; to see the conditions.</FONT>
<BR><FONT SIZE=2>There is absolutely no warranty for GDB.&nbsp; Type &quot;show warranty&quot; for details.</FONT>
<BR><FONT SIZE=2>This GDB was configured as</FONT>
<BR><FONT SIZE=2>&quot;i386-redhat-linux-gnu&quot;...Using host libthread_db library &quot;/lib/tls/libthread_db.so.1&quot;.</FONT>
</P>

<P><FONT SIZE=2>Core was generated by `./ser -f ser.cfg'.</FONT>
<BR><FONT SIZE=2>Program terminated with signal 11, Segmentation fault.</FONT>
<BR><FONT SIZE=2>Reading symbols from /lib/libdl.so.2...done.</FONT>
<BR><FONT SIZE=2>Loaded symbols for /lib/libdl.so.2</FONT>
<BR><FONT SIZE=2>Reading symbols from /lib/libresolv.so.2...done.</FONT>
<BR><FONT SIZE=2>Loaded symbols for /lib/libresolv.so.2</FONT>
<BR><FONT SIZE=2>Reading symbols from /lib/tls/libc.so.6...done.</FONT>
<BR><FONT SIZE=2>Loaded symbols for /lib/tls/libc.so.6</FONT>
<BR><FONT SIZE=2>Reading symbols from /lib/ld-linux.so.2...done.</FONT>
<BR><FONT SIZE=2>Loaded symbols for /lib/ld-linux.so.2</FONT>
<BR><FONT SIZE=2>Reading symbols from</FONT>
<BR><FONT SIZE=2>/home/ser/compiled/sip_router/lib/ser/modules/mysql.so...done.</FONT>
<BR><FONT SIZE=2>Loaded symbols for</FONT>
<BR><FONT SIZE=2>/home/ser/compiled/sip_router/lib/ser/modules/mysql.so</FONT>
<BR><FONT SIZE=2>Reading symbols from /usr/lib/libz.so.1...done.</FONT>
<BR><FONT SIZE=2>Loaded symbols for /usr/lib/libz.so.1</FONT>
<BR><FONT SIZE=2>Reading symbols from</FONT>
<BR><FONT SIZE=2>/home/ser/compiled/sip_router/lib/ser/modules/sl.so...done.</FONT>
<BR><FONT SIZE=2>Loaded symbols for</FONT>
<BR><FONT SIZE=2>/home/ser/compiled/sip_router/lib/ser/modules/sl.so</FONT>
<BR><FONT SIZE=2>Reading symbols from</FONT>
<BR><FONT SIZE=2>/home/ser/compiled/sip_router/lib/ser/modules/tm.so...done.</FONT>
<BR><FONT SIZE=2>Loaded symbols for</FONT>
<BR><FONT SIZE=2>/home/ser/compiled/sip_router/lib/ser/modules/tm.so</FONT>
<BR><FONT SIZE=2>Reading symbols from</FONT>
<BR><FONT SIZE=2>/home/ser/compiled/sip_router/lib/ser/modules/rr.so...done.</FONT>
<BR><FONT SIZE=2>Loaded symbols for</FONT>
<BR><FONT SIZE=2>/home/ser/compiled/sip_router/lib/ser/modules/rr.so</FONT>
<BR><FONT SIZE=2>Reading symbols from</FONT>
<BR><FONT SIZE=2>/home/ser/compiled/sip_router/lib/ser/modules/maxfwd.so...done.</FONT>
<BR><FONT SIZE=2>Loaded symbols for</FONT>
<BR><FONT SIZE=2>/home/ser/compiled/sip_router/lib/ser/modules/maxfwd.so</FONT>
<BR><FONT SIZE=2>Reading symbols from</FONT>
<BR><FONT SIZE=2>/home/ser/compiled/sip_router/lib/ser/modules/usrloc.so...done.</FONT>
<BR><FONT SIZE=2>Loaded symbols for</FONT>
<BR><FONT SIZE=2>/home/ser/compiled/sip_router/lib/ser/modules/usrloc.so</FONT>
<BR><FONT SIZE=2>Reading symbols from</FONT>
<BR><FONT SIZE=2>/home/ser/compiled/sip_router/lib/ser/modules/registrar.so...done.</FONT>
<BR><FONT SIZE=2>Loaded symbols for</FONT>
<BR><FONT SIZE=2>/home/ser/compiled/sip_router/lib/ser/modules/registrar.so</FONT>
<BR><FONT SIZE=2>Reading symbols from /lib/libnss_files.so.2...done.</FONT>
<BR><FONT SIZE=2>Loaded symbols for /lib/libnss_files.so.2 Reading symbols from /lib/libnss_dns.so.2...done.</FONT>
<BR><FONT SIZE=2>Loaded symbols for /lib/libnss_dns.so.2</FONT>
<BR><FONT SIZE=2>#0&nbsp; 0x002f3da3 in strlen () from /lib/tls/libc.so.6</FONT>
<BR><FONT SIZE=2>(gdb) bt</FONT>
<BR><FONT SIZE=2>#0&nbsp; 0x002f3da3 in strlen () from /lib/tls/libc.so.6</FONT>
<BR><FONT SIZE=2>#1&nbsp; 0xf6eecb57 in new_my_id (url=0x8d6dbc0</FONT>
<BR><FONT SIZE=2>&quot;mysql://root@192.168.4.24/ser&quot;) at my_id.c:80</FONT>
<BR><FONT SIZE=2>#2&nbsp; 0xf6eed299 in get_connection (url=0x8d6dbc0</FONT>
<BR><FONT SIZE=2>&quot;mysql://root@192.168.4.24/ser&quot;) at my_pool.c:69</FONT>
<BR><FONT SIZE=2>#3&nbsp; 0xf6eeb3c2 in db_init (_url=0x8d6dbc0</FONT>
<BR><FONT SIZE=2>&quot;mysql://root@192.168.4.24/ser&quot;) at dbase.c:260</FONT>
<BR><FONT SIZE=2>#4&nbsp; 0xf6e77a4d in register_udomain (_n=0x8136df0 &quot;location&quot;, _d=0xfef72ce0) at dlist.c:233</FONT>
<BR><FONT SIZE=2>#5&nbsp; 0xf6e6f6ce in domain_fixup (param=0x8136eb4,</FONT>
<BR><FONT SIZE=2>param_no=1) at reg_mod.c:207</FONT>
<BR><FONT SIZE=2>#6&nbsp; 0x0806cac0 in fix_actions (a=0x8136ea0) at</FONT>
<BR><FONT SIZE=2>route.c:238</FONT>
<BR><FONT SIZE=2>#7&nbsp; 0x0806c9cc in fix_actions (a=0x8136f40) at</FONT>
<BR><FONT SIZE=2>route.c:225</FONT>
<BR><FONT SIZE=2>#8&nbsp; 0x0806c9cc in fix_actions (a=0x8136240) at</FONT>
<BR><FONT SIZE=2>route.c:225</FONT>
<BR><FONT SIZE=2>#9&nbsp; 0x0806ef97 in fix_rls () at route.c:721 #10 0x0805cdb6 in main (argc=3, argv=0xfef72f84) at</FONT>
<BR><FONT SIZE=2>main.c:1558</FONT>
</P>
<BR>
<BR>
<BR>
<BR>

<P><FONT SIZE=2>&gt; _______________________________________________</FONT>
<BR><FONT SIZE=2>&gt; Serusers mailing list</FONT>
<BR><FONT SIZE=2>&gt; serusers@lists.iptel.org</FONT>
<BR><FONT SIZE=2>&gt; <A HREF="http://lists.iptel.org/mailman/listinfo/serusers" TARGET="_blank">http://lists.iptel.org/mailman/listinfo/serusers</A></FONT>
</P>

</BODY>
</HTML>