[asterisk-bugs] [JIRA] (ASTERISK-22851) Asterisk/SIP+RTP stops responding when compiled with DEBUG_THREADS

David Brillert (JIRA) noreply at issues.asterisk.org
Sun Aug 3 11:03:57 CDT 2014


     [ https://issues.asterisk.org/jira/browse/ASTERISK-22851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Brillert updated ASTERISK-22851:
--------------------------------------

    Attachment: valgrind.txt

I ran Asterisk in Valgrind until Asterisk CLI started spitting out stuff like:

[2014-08-03 11:39:37] ERROR[30855]: chan_iax2.c:2556 peercnt_add: maxcallnumber limit of 2048 for 192.168.192.196 has been reached!
[2014-08-03 11:40:27] ERROR[30850]: chan_iax2.c:2556 peercnt_add: maxcallnumber limit of 2048 for 192.168.192.196 has been reached!
core show locks

=======================================================================
=== 11.11.0
=== Currently Held Locks
=======================================================================
===
=== <pending> <lock#> (<file>): <lock type> <line num> <function> <lock name> <lock addr> (times locked)
===
=== Thread ID: 0x383cb940 (iax2_process_thread  started at [12609] chan_iax2.c start_network_thread())
=== ---> Waiting for Lock #0 (chan_iax2.c): MUTEX 3626 __attempt_transmit &iaxsl[callno] 0x1c6b3518 (1)
        main/logger.c:1610 ast_bt_get_addresses() (0x510e47+1A)
        main/lock.c:275 __ast_pthread_mutex_lock() (0x50898c+D8)
        channels/chan_iax2.c:1731 send_lagrq()
        main/sched.c:614 ast_sched_runq() (0x587d08+163)
        main/sched.c:104 sched_run()
        main/utils.c:1169 dummy_start()
        libpthread.so.0 <unknown>()
        libc.so.6 clone() (0x3998ad5200+6D)
=== --- ---> Locked Here: chan_iax2.c line 10305 (socket_process_helper)
=== --- ---> Locked Here: chan_iax2.c line 2087 (pvt_destructor)
=== -------------------------------------------------------------------
===
=== Thread ID: 0x3c879940 (iax2_process_thread  started at [12609] chan_iax2.c start_network_thread())
=== ---> Lock #0 (chan_iax2.c): MUTEX 10305 socket_process_helper &iaxsl[fr->callno] 0x1c6b3518 (2)
        main/logger.c:1610 ast_bt_get_addresses() (0x510e47+1A)
        main/lock.c:275 __ast_pthread_mutex_lock() (0x50898c+D8)
        channels/chan_iax2.c:2089 pvt_destructor()
        main/astobj2.c:474 internal_ao2_ref()
        main/astobj2.c:543 __ao2_ref() (0x44ebb0+2B)
        channels/chan_iax2.c:3580 iax2_destroy()
        channels/chan_iax2.c:11229 socket_process_helper()
        channels/chan_iax2.c:12005 socket_process()
        channels/chan_iax2.c:12117 iax2_process_thread()
        main/utils.c:1169 dummy_start()
        libpthread.so.0 <unknown>()
        libc.so.6 clone() (0x3998ad5200+6D)
=== -------------------------------------------------------------------
===
=======================================================================

*CLI> [2014-08-03 11:41:16] ERROR[30849]: chan_iax2.c:2556 peercnt_add: maxcallnumber limit of 2048 for 192.168.192.196 has been reached!
[2014-08-03 11:42:05] ERROR[30851]: chan_iax2.c:2556 peercnt_add: maxcallnumber limit of 2048 for 192.168.192.196 has been reached!

valgrind.txt attached.

I am running another trace with verbose+debug+iax2 set debug on and will supply gdb and core show locks output once * locks again.

All output is with the patch on v11 subversion.

> Asterisk/SIP+RTP stops responding when compiled with DEBUG_THREADS
> ------------------------------------------------------------------
>
>                 Key: ASTERISK-22851
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22851
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/General, Resources/res_rtp_asterisk
>    Affects Versions: 11.6.0, 11.7.0
>         Environment: Debian6
>            Reporter: Jeremy Kister
>            Assignee: Matt Jordan
>            Severity: Critical
>         Attachments: asterisk cli.txt, backtrace1-bt-full.txt, backtrace1.txt, backtrace-2-full.txt, backtrace-2.txt, backtrace-3-full.txt, backtrace-3.txt, backtrace-4-full.txt, backtrace-4.txt, core-show-locks-2.txt, core-show-locks-3.txt, core-show-locks-4.txt, core show locks gdb bt strace.txt, lsof.txt, qualify-tcpdump.txt, qualify.txt, rb2826_v11.patch, sip.conf, sip-show-peer.txt, strace-and-then-some.txt, valgrind.txt
>
>
> I have regularly (once a week, once per few hundred calls?) been having 
> problems with Asterisk's SIP stack not responding to packets from any of 
> my registered devices.  In the past, I could not tolerate the outage, so 
> i would restart asterisk to make things happy.
> My Asterisk server is currently in this broken state and I can leave it 
> this way for a short while.  Devices are registered to it and I can 'sip 
> qualify peer xxx' - see [^qualify.txt].  notice the console/debug does not show the return packet, but on the network, the device has clearly replied - [^qualify-tcpdump.txt]
> 'sip show peer xxx' all show Status OK [^sip-show-peer.txt]
> but whenever one of the devices tries to make a new call, Asterisk just 
> doesnt respond.  'sip set debug on' shows no packets.
> from the asterisk server (10.1.0.3), i can see one of my phones 
> (10.1.0.111) trying to make a call but Asterisk won't talk back.
> {code}
> # tcpdump -i eth0 -s 0 -t -n host 10.1.0.111
> ARP, Request who-has 10.1.0.3 tell 10.1.0.111, length 46
> ARP, Reply 10.1.0.3 is-at 00:0c:29:07:39:8e, length 28
> IP 10.1.0.111.5060 > 10.1.0.3.5060: SIP, length: 926
> IP 10.1.0.111.5060 > 10.1.0.3.5060: SIP, length: 926
> IP 10.1.0.111.5060 > 10.1.0.3.5060: SIP, length: 926
> IP 10.1.0.111.123 > 10.1.0.3.123: NTPv3, Client, length 48
> IP 10.1.0.3.123 > 10.1.0.111.123: NTPv3, Server, length 48
> IP 10.1.0.111.5060 > 10.1.0.3.5060: SIP, length: 926
> IP 10.1.0.111.5060 > 10.1.0.3.5060: SIP, length: 926
> IP 10.1.0.111.5060 > 10.1.0.3.5060: SIP, length: 926
> IP 10.1.0.111.123 > 10.1.0.3.123: NTPv3, Client, length 48
> IP 10.1.0.3.123 > 10.1.0.111.123: NTPv3, Server, length 48
> ARP, Request who-has 10.1.0.111 tell 10.1.0.3, length 28
> ARP, Reply 10.1.0.111 is-at 00:13:c4:01:da:4a, length 46
> IP 10.1.0.111.5060 > 10.1.0.3.5060: SIP, length: 926
> IP 10.1.0.111.5060 > 10.1.0.3.5060: SIP, length: 926
> IP 10.1.0.111.5060 > 10.1.0.3.5060: SIP, length: 926
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list