<!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.2654.45">
<TITLE>RE: [Asterisk-Users] segmentation fault</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>OK, here it is. On a flow of shorter calls it lasted about an hour.</FONT>
</P>
<P><FONT SIZE=2>[root@wpbx asterisk]# gdb asterisk core.12348</FONT>
<BR><FONT SIZE=2>GNU gdb Red Hat Linux 7.x (5.0rh-15) (MI_OUT)</FONT>
<BR><FONT SIZE=2>Copyright 2001 Free Software Foundation, Inc.</FONT>
<BR><FONT SIZE=2>GDB is free software, covered by the GNU General Public License, and you are</FONT>
<BR><FONT SIZE=2>welcome to change it and/or distribute copies of it under certain conditions.</FONT>
<BR><FONT SIZE=2>Type "show copying" to see the conditions.</FONT>
<BR><FONT SIZE=2>There is absolutely no warranty for GDB. Type "show warranty" for details.</FONT>
<BR><FONT SIZE=2>This GDB was configured as "i386-redhat-linux"...</FONT>
<BR><FONT SIZE=2>Core was generated by `asterisk -dgvvvc'.</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/i686/libpthread.so.0...done.</FONT>
</P>
<P><FONT SIZE=2>warning: Unable to set global thread event mask: generic error</FONT>
<BR><FONT SIZE=2>[New Thread 1024 (LWP 12342)]</FONT>
<BR><FONT SIZE=2>Error while reading shared library symbols:</FONT>
<BR><FONT SIZE=2>Can't attach LWP 12342: No such process</FONT>
<BR><FONT SIZE=2>Reading symbols from /usr/lib/libncurses.so.5...done.</FONT>
<BR><FONT SIZE=2>Loaded symbols for /usr/lib/libncurses.so.5</FONT>
<BR><FONT SIZE=2>Reading symbols from /lib/i686/libm.so.6...done.</FONT>
<BR><FONT SIZE=2>Loaded symbols for /lib/i686/libm.so.6</FONT>
<BR><FONT SIZE=2>Reading symbols from /lib/i686/libc.so.6...done.</FONT>
<BR><FONT SIZE=2>Loaded symbols for /lib/i686/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 /usr/lib/asterisk/modules/chan_modem.so...done.</FONT>
<BR><FONT SIZE=2>.</FONT>
<BR><FONT SIZE=2>.</FONT>
<BR><FONT SIZE=2>.</FONT>
<BR><FONT SIZE=2>.</FONT>
<BR><FONT SIZE=2>Loaded symbols for /lib/libcrypt.so.1</FONT>
<BR><FONT SIZE=2>Reading symbols from /lib/libnsl.so.1...done.</FONT>
<BR><FONT SIZE=2>Loaded symbols for /lib/libnsl.so.1</FONT>
<BR><FONT SIZE=2>Reading symbols from /usr/lib/asterisk/modules/format_pcm_alaw.so...done.</FONT>
<BR><FONT SIZE=2>Loaded symbols for /usr/lib/asterisk/modules/format_pcm_alaw.so</FONT>
<BR><FONT SIZE=2>#0 0x08055d86 in ast_queue_frame (chan=0x81cd398, fin=0x42c1991c, lock=1)</FONT>
<BR><FONT SIZE=2> at channel.c:354</FONT>
<BR><FONT SIZE=2>354 cur = chan->pvt->readq;</FONT>
<BR><FONT SIZE=2>(gdb) bt</FONT>
<BR><FONT SIZE=2>#0 0x08055d86 in ast_queue_frame (chan=0x81cd398, fin=0x42c1991c, lock=1)</FONT>
<BR><FONT SIZE=2> at channel.c:354</FONT>
<BR><FONT SIZE=2>#1 0x0805a9a0 in ast_queue_hangup (chan=0x81cd398, lock=1) at channel.c:391</FONT>
<BR><FONT SIZE=2>#2 0x42412855 in handle_request (p=0x82b6350, req=0x42c1b25c, sin=0x42c1b24c)</FONT>
<BR><FONT SIZE=2> at chan_sip.c:3762</FONT>
<BR><FONT SIZE=2>#3 0x42412e6d in sipsock_read (id=0x80d7850, fd=10, events=1, ignore=0x0)</FONT>
<BR><FONT SIZE=2> at chan_sip.c:3840</FONT>
<BR><FONT SIZE=2>#4 0x08050d9e in ast_io_wait (ioc=0x80d9018, howlong=1000) at io.c:268</FONT>
<BR><FONT SIZE=2>#5 0x424131f5 in do_monitor (data=0x0) at chan_sip.c:3928</FONT>
<BR><FONT SIZE=2>#6 0x4003ec6f in pthread_start_thread (arg=0x42c1bbe0) at manager.c:284</FONT>
<BR><FONT SIZE=2>(gdb)</FONT>
</P>
<BR>
<BR>
<BR>
<BR>
<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Martin Pycko [<A HREF="mailto:martinp@digium.com">mailto:martinp@digium.com</A>]</FONT>
<BR><FONT SIZE=2>Sent: Wednesday, April 02, 2003 11:38 AM</FONT>
<BR><FONT SIZE=2>To: 'Asterisk-Users@Lists.Digium.Com'</FONT>
<BR><FONT SIZE=2>Subject: Re: [Asterisk-Users] segmentation fault</FONT>
</P>
<BR>
<P><FONT SIZE=2>asterisk -vvvcg (use g option to generate the coredump file)</FONT>
<BR><FONT SIZE=2>than gdb asterisk core.pid</FONT>
<BR><FONT SIZE=2>bt</FONT>
</P>
<P><FONT SIZE=2>Also you might send a log of "pri intense debug span <number>"</FONT>
</P>
<P><FONT SIZE=2>regards</FONT>
<BR><FONT SIZE=2>Martin</FONT>
</P>
<P><FONT SIZE=2>On Wed, 2 Apr 2003, Alex Zarubin wrote:</FONT>
</P>
<P><FONT SIZE=2>> Configuration:</FONT>
<BR><FONT SIZE=2>> Linux wpbx 2.4.9-13 #1 Tue Oct 30 20:11:04 EST 2001 i686 unknown</FONT>
<BR><FONT SIZE=2>> P4 2.5 GHz, 1 GB RAM</FONT>
<BR><FONT SIZE=2>> T400P with 3 T1s plugged in. A flow of 46 calls (spread out over 3 T1s).</FONT>
<BR><FONT SIZE=2>> Each call gets transferred (Dial) to the SIP platform and stays for 5 min.</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> Case 1. Asterisk built out of CVS Mar. 19. Test was running for 3 days.</FONT>
<BR><FONT SIZE=2>> Segmentation fault.</FONT>
<BR><FONT SIZE=2>> Case 2. Asterisk built out of CVS Apr. 1. Test was running for 12 hours.</FONT>
<BR><FONT SIZE=2>> Segmentation fault.</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> No coredump found. In case 1 there was a significant memory growth:</FONT>
<BR><FONT SIZE=2>> Top at the startup:</FONT>
<BR><FONT SIZE=2>> 15986 root 9 0 6440 6436 2144 S 0.0 0.6 0:00 asterisk</FONT>
<BR><FONT SIZE=2>> 15987 root 8 0 6440 6436 2144 S 0.0 0.6 0:00 asterisk</FONT>
<BR><FONT SIZE=2>> Top in several hours:</FONT>
<BR><FONT SIZE=2>> 15986 root 9 0 9192 9188 2148 S 0.0 0.9 0:00 asterisk</FONT>
<BR><FONT SIZE=2>> 15987 root 9 0 9192 9188 2148 S 0.0 0.9 0:00 asterisk</FONT>
<BR><FONT SIZE=2>> Top after a day:</FONT>
<BR><FONT SIZE=2>> 27441 root 9 0 45980 44M 2156 S 0.0 4.5 0:00 asterisk</FONT>
<BR><FONT SIZE=2>> 27442 root 8 0 45980 44M 2156 S 0.0 4.5 0:16 asterisk</FONT>
<BR><FONT SIZE=2>> Actually, I saw it over 50.</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> There were some warning messages on the way. For example:</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> Apr 1 23:22:33 WARNING[10251]: File chan_zap.c, Line 5248 (zt_pri_error):</FONT>
<BR><FONT SIZE=2>> PRI:</FONT>
<BR><FONT SIZE=2>> Read on 86 failed: Unknown error 500</FONT>
<BR><FONT SIZE=2>> Apr 1 23:24:54 WARNING[11276]: File chan_zap.c, Line 5248 (zt_pri_error):</FONT>
<BR><FONT SIZE=2>> PRI:</FONT>
<BR><FONT SIZE=2>> !! Got reject for frame 102, retransmitting frame 102 now, updating n_r!</FONT>
<BR><FONT SIZE=2>> Apr 1 23:24:54 WARNING[11276]: File chan_zap.c, Line 5248 (zt_pri_error):</FONT>
<BR><FONT SIZE=2>> PRI:</FONT>
<BR><FONT SIZE=2>> !! Got reject for frame 103, but we have nothing -- resetting!</FONT>
<BR><FONT SIZE=2>> Apr 1 23:28:49 WARNING[10251]: File chan_zap.c, Line 5248 (zt_pri_error):</FONT>
<BR><FONT SIZE=2>> PRI:</FONT>
<BR><FONT SIZE=2>> !! Got reject for frame 29, retransmitting frame 29 now, updating n_r!</FONT>
<BR><FONT SIZE=2>> Apr 1 23:28:49 WARNING[10251]: File chan_zap.c, Line 5248 (zt_pri_error):</FONT>
<BR><FONT SIZE=2>> PRI:</FONT>
<BR><FONT SIZE=2>> !! Got reject for frame 30, but we have nothing -- resetting!</FONT>
<BR><FONT SIZE=2>> Apr 1 23:30:00 WARNING[11276]: File chan_zap.c, Line 5248 (zt_pri_error):</FONT>
<BR><FONT SIZE=2>> PRI:</FONT>
<BR><FONT SIZE=2>> Read on 87 failed: Unknown error 500</FONT>
<BR><FONT SIZE=2>> Apr 1 23:30:24 WARNING[10251]: File chan_zap.c, Line 5248 (zt_pri_error):</FONT>
<BR><FONT SIZE=2>> PRI:</FONT>
<BR><FONT SIZE=2>> Read on 86 failed: Unknown error 500</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> Question:</FONT>
<BR><FONT SIZE=2>> What do I do to give you more info? Should I issue 'ulimit -c unlimited' to</FONT>
<BR><FONT SIZE=2>> get a coredump?</FONT>
<BR><FONT SIZE=2>> Are there any flags/modes to set?</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> Thank you.</FONT>
<BR><FONT SIZE=2>> Alex Zarubin</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>></FONT>
</P>
<P><FONT SIZE=2>_______________________________________________</FONT>
<BR><FONT SIZE=2>Asterisk-Users mailing list</FONT>
<BR><FONT SIZE=2>Asterisk-Users@lists.digium.com</FONT>
<BR><FONT SIZE=2><A HREF="http://lists.digium.com/mailman/listinfo/asterisk-users" TARGET="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</A></FONT>
</P>
</BODY>
</HTML>