[Home]

Summary:ASTERISK-15007: [patch] iax2 show cache, locks channels.
Reporter:Alec Davis (alecdavis)Labels:
Date Opened:2009-10-18 22:38:55Date Closed:2009-11-20 16:48:48.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_iax2
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) bug16094.diff.txt
Description:Executing 'iax2 show cache' lock iax.
On debian, /etc/init.d/asterisk restart fails to kill asterisk process.

This is repeatable on 1.6.1 lastest branch, and latest trunk.

DAHDI channels become unusable, SIP reports
"Oct 19 16:23:26] WARNING[23802]: chan_sip.c:6308 sip_write: Asked to transmit frame type 64, while native formats is 0x8 (alaw)(8) read/write = 0x8 (alaw)(8)/0x8 (alaw)(8)
"


****** ADDITIONAL INFORMATION ******

console output:
Connected to Asterisk SVN-trunk-r224448 currently running on test (pid = 23654)
Verbosity was 0 and is now 4
   -- Remote UNIX connection
   -- Executing [8699@trusted:1] Dial("SIP/GXP0001-08a5f8b0", "IAX2/astridtest/8899,,r") in new stack
   -- Called astridtest/8899
   -- Call accepted by 192.168.5.253 (format alaw)
   -- Format for call is alaw
   -- IAX2/astridtest-18764 answered SIP/GXP0001-08a5f8b0
[Oct 19 16:22:32] WARNING[23676]: chan_iax2.c:1104 iax_error_output: Attempt to double free frame detected
   -- Hungup 'IAX2/astridtest-18764'
 == Spawn extension (trusted, 8699, 1) exited non-zero on 'SIP/GXP0001-08a5f8b0'
test*CLI>
test*CLI> iax2 show cache
Peer/Context         Exten        Exp.      Wait.    Flags
   -- Executing [8699@trusted:1] Dial("SIP/GXP0001-08a63cb8", "IAX2/astridtest/8899,,r") in new stack
   -- Called astridtest/8899
   -- Call accepted by 192.168.5.253 (format alaw)
   -- Format for call is alaw
[Oct 19 16:22:38] WARNING[23700]: chan_sip.c:6308 sip_write: Asked to transmit frame type 64, while native formats is 0x8 (alaw)(8) read/write = 0x8 (alaw)(8)/0x8 (alaw)(8)
[Oct 19 16:22:38] WARNING[23700]: chan_sip.c:6308 sip_write: Asked to transmit frame type 64, while native formats is 0x8 (alaw)(8) read/write = 0x8 (alaw)(8)/0x8 (alaw)(8)
[Oct 19 16:22:38] WARNING[23700]: chan_sip.c:6308 sip_write: Asked to transmit frame type 64, while native formats is 0x8 (alaw)(8) read/write = 0x8 (alaw)(8)/0x8 (alaw)(8)
[Oct 19 16:22:38] WARNING[23700]: chan_sip.c:6308 sip_write: Asked to transmit frame type 64, while native formats is 0x8 (alaw)(8) read/write = 0x8 (alaw)(8)/0x8 (alaw)(8)
[Oct 19 16:22:38] WARNING[23700]: chan_sip.c:6308 sip_write: Asked to transmit frame type 64, while native formats is 0x8 (alaw)(8) read/write = 0x8 (alaw)(8)/0x8 (alaw)(8)
Comments:By: Alec Davis (alecdavis) 2009-10-18 22:52:11

Finally after a few more dial attempts across and IAX link: CHANUNAVAIL

  -- Executing [8699@trusted:1] Dial("SIP/GXP0001-08afcf00", "IAX2/astridtest/8899,,r") in new stack
[Oct 19 16:34:56] WARNING[23808]: app_dial.c:1786 dial_exec_full: Unable to create channel of type 'IAX2' (cause 20 - Unknown)
 == Everyone is busy/congested at this time (1:0/0/1)
   -- Auto fallthrough, channel 'SIP/GXP0001-08afcf00' status is 'CHANUNAVAIL'

Unable to Unload module:

test*CLI> module unload chan_iax2.so
Unable to unload resource chan_iax2.so
Command 'module unload chan_iax2.so ' failed.
[Oct 19 16:36:15] WARNING[23807]: loader.c:490 ast_unload_resource: Soft unload failed, 'chan_iax2.so' has use count 1
test*CLI>

Peer is now UNREACHABLE:

test*CLI> iax2 show peers
Name/Username    Host                 Mask             Port          Status
astridtest/astr  192.168.5.253   (S)  255.255.255.255  4569 (T)      UNREACHABLE
1 iax2 peers [0 online, 1 offline, 0 unmonitored]
test*CLI>

test*CLI> iax2 show threads
IAX2 Thread Information
Idle Threads:
Active Threads:
Thread D26: state=2, update=1255923808, actions=1, func='socket_process'
Thread D25: state=2, update=1255923808, actions=1, func='socket_process'
Thread D24: state=2, update=1255923808, actions=1, func='socket_process'
Thread D23: state=2, update=1255923808, actions=1, func='socket_process'
Thread D22: state=2, update=1255923808, actions=1, func='attempt_transmit'
Thread D21: state=2, update=1255923808, actions=1, func='attempt_transmit'
Thread D20: state=2, update=1255923808, actions=1, func='socket_process'
Thread D19: state=2, update=1255923808, actions=1, func='socket_process'
Thread D18: state=2, update=1255923808, actions=1, func='socket_process'
Thread D17: state=2, update=1255923808, actions=1, func='socket_process'
Thread D16: state=2, update=1255923808, actions=1, func='socket_process'
Thread D15: state=2, update=1255923808, actions=1, func='socket_process'
Thread D14: state=2, update=1255923808, actions=1, func='socket_process'
Thread D13: state=2, update=1255923808, actions=1, func='socket_process'
Thread D12: state=2, update=1255923808, actions=1, func='socket_process'
Thread D11: state=2, update=1255923808, actions=1, func='socket_process'
Thread D10: state=2, update=1255923808, actions=1, func='socket_process'
Thread D9: state=2, update=1255923808, actions=1, func='socket_process'
Thread D8: state=2, update=1255923808, actions=1, func='socket_process'
Thread D7: state=2, update=1255923808, actions=1, func='socket_process'
Thread D6: state=2, update=1255923808, actions=1, func='socket_process'
Thread D5: state=2, update=1255923808, actions=1, func='socket_process'
Thread D4: state=2, update=1255923808, actions=1, func='socket_process'
Thread D3: state=2, update=1255923808, actions=1, func='socket_process'
Thread D2: state=2, update=1255923808, actions=1, func='socket_process'
Thread D1: state=2, update=1255923808, actions=1, func='socket_process'
Thread D0: state=2, update=1255923808, actions=1, func='socket_process'
Thread P1: state=2, update=18, actions=15, func='socket_process'
Thread P2: state=2, update=19, actions=15, func='socket_process'
Thread P7: state=2, update=19, actions=14, func='socket_process'
Thread P8: state=2, update=3, actions=14, func='socket_process'
Thread P6: state=2, update=3, actions=15, func='socket_process'
Thread P9: state=2, update=3, actions=15, func='socket_process'
Thread P4: state=2, update=3, actions=15, func='socket_process'
Thread P5: state=2, update=18, actions=15, func='socket_process'
Thread P3: state=2, update=18, actions=15, func='socket_process'
Thread P10: state=2, update=28, actions=14, func='socket_process'
Dynamic Threads:
37 of 10 threads accounted for with 0 dynamic threads
test*CLI>

By: Alec Davis (alecdavis) 2009-10-18 23:10:41

typo in handle_cli_iax2_show_cache

2nd AST_LIST_LOCK instead of AST_LIST_UNLOCK(&dpcache)

Karma = Non trival bug that was not yours ;)

By: Alec Davis (alecdavis) 2009-10-28 15:52:05

Somebody else, please test this 1 liner.

The more tests, confirmed, the quicker it makes it to commit.

By: Alec Davis (alecdavis) 2009-11-04 17:03:12.000-0600

Commit this, and we may be under 500 open bugs.



By: Alec Davis (alecdavis) 2009-11-10 14:56:12.000-0600

dvossel: This is a simple fix.
An obvious mistake in handle_cli_iax2_show_cache.

By: Digium Subversion (svnbot) 2009-11-20 16:46:58.000-0600

Repository: asterisk
Revision: 230726

U   trunk/channels/chan_iax2.c

------------------------------------------------------------------------
r230726 | dvossel | 2009-11-20 16:35:54 -0600 (Fri, 20 Nov 2009) | 8 lines

fixes iax2 show cache locking error, thanks alecdavis!

(closes issue ASTERISK-15007)
Reported by: alecdavis
Patches:
     bug16094.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis, dvossel

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=230726

By: Digium Subversion (svnbot) 2009-11-20 16:47:41.000-0600

Repository: asterisk
Revision: 230727

_U  branches/1.6.2/
U   branches/1.6.2/channels/chan_iax2.c

------------------------------------------------------------------------
r230727 | dvossel | 2009-11-20 16:36:55 -0600 (Fri, 20 Nov 2009) | 15 lines

Merged revisions 230726 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r230726 | dvossel | 2009-11-20 16:35:54 -0600 (Fri, 20 Nov 2009) | 7 lines
 
 fixes iax2 show cache locking error, thanks alecdavis!

 (closes issue ASTERISK-15007)
 Reported by: alecdavis
 Patches:
       bug16094.diff.txt uploaded by alecdavis (license 585)
 Tested by: alecdavis, dvossel
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=230727

By: Digium Subversion (svnbot) 2009-11-20 16:48:27.000-0600

Repository: asterisk
Revision: 230728

_U  branches/1.6.1/
U   branches/1.6.1/channels/chan_iax2.c

------------------------------------------------------------------------
r230728 | dvossel | 2009-11-20 16:37:18 -0600 (Fri, 20 Nov 2009) | 15 lines

Merged revisions 230726 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r230726 | dvossel | 2009-11-20 16:35:54 -0600 (Fri, 20 Nov 2009) | 7 lines
 
 fixes iax2 show cache locking error, thanks alecdavis!

 (closes issue ASTERISK-15007)
 Reported by: alecdavis
 Patches:
       bug16094.diff.txt uploaded by alecdavis (license 585)
 Tested by: alecdavis, dvossel
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=230728

By: Digium Subversion (svnbot) 2009-11-20 16:48:47.000-0600

Repository: asterisk
Revision: 230729

_U  branches/1.6.0/
U   branches/1.6.0/channels/chan_iax2.c

------------------------------------------------------------------------
r230729 | dvossel | 2009-11-20 16:37:42 -0600 (Fri, 20 Nov 2009) | 15 lines

Merged revisions 230726 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r230726 | dvossel | 2009-11-20 16:35:54 -0600 (Fri, 20 Nov 2009) | 7 lines
 
 fixes iax2 show cache locking error, thanks alecdavis!

 (closes issue ASTERISK-15007)
 Reported by: alecdavis
 Patches:
       bug16094.diff.txt uploaded by alecdavis (license 585)
 Tested by: alecdavis, dvossel
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=230729