[Home]

Summary:ASTERISK-17389: Asterisk hangs and takes 100% cpu usage
Reporter:Evgeniy Kozhuhovskiy (ugenk)Labels:
Date Opened:2011-02-11 04:25:40.000-0600Date Closed:2011-06-07 14:04:57
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_mixmonitor
Versions:1.8.2 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Sometimes asterisk stops processing requests, and eats 100% cpu (on one core).

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

callcenter1*CLI> core show locks

=======================================================================
=== Currently Held Locks ==============================================
=======================================================================
===
=== <pending> <lock#> (<file>): <lock type> <line num> <function> <lock name> <lock addr> (times locked)
===
=== Thread ID: 139680892671760 (do_monitor           started at [24468] chan_sip.c restart_monitor())
=== ---> Lock #0 (chan_sip.c): MUTEX 24440 do_monitor &monlock 0x7f0a01c6f4c0 (1)
asterisk(ast_bt_get_addresses+0x1d) [0x4e5a12]
asterisk(__ast_pthread_mutex_lock+0xaf) [0x4debf5]
/usr/lib/asterisk/modules/chan_sip.so(+0x7ee53) [0x7f0a01a24e53]
asterisk() [0x5604dc]
/lib/libpthread.so.0(+0x68ba) [0x7f0a334018ba]
/lib/libc.so.6(clone+0x6d) [0x7f0a30e8b02d]
=== ---> Lock #1 (chan_sip.c): MUTEX 3617 __sip_autodestruct p 0x295f9e0 (1)
asterisk(ast_bt_get_addresses+0x1d) [0x4e5a12]
asterisk(__ast_pthread_mutex_lock+0xaf) [0x4debf5]
asterisk(__ao2_lock+0x5a) [0x444d5c]
/usr/lib/asterisk/modules/chan_sip.so(+0x15bdf) [0x7f0a019bbbdf]
asterisk(ast_sched_runq+0x19a) [0x54424a]
/usr/lib/asterisk/modules/chan_sip.so(+0x7ee65) [0x7f0a01a24e65]
asterisk() [0x5604dc]
/lib/libpthread.so.0(+0x68ba) [0x7f0a334018ba]
/lib/libc.so.6(clone+0x6d) [0x7f0a30e8b02d]
=== -------------------------------------------------------------------
===
=== Thread ID: 139680876939024 (pbx_thread           started at [ 5035] pbx.c ast_pbx_start())
=== ---> Lock #0 (channel.c): MUTEX 3636 __ast_read chan 0x297ec40 (1)
asterisk(ast_bt_get_addresses+0x1d) [0x4e5a12]
asterisk(__ast_pthread_mutex_trylock+0xaf) [0x4def78]
asterisk(__ao2_trylock+0x5a) [0x444e1e]
/usr/lib/asterisk/modules/chan_sip.so(+0x7d309) [0x7f0a01a23309]
/usr/lib/asterisk/modules/chan_sip.so(+0x7cfcf) [0x7f0a01a22fcf]
asterisk(ast_io_wait+0x1c4) [0x4d9042]
/usr/lib/asterisk/modules/chan_sip.so(+0x7edb3) [0x7f0a01a24db3]
asterisk() [0x5604dc]
/lib/libpthread.so.0(+0x68ba) [0x7f0a334018ba]
/lib/libc.so.6(clone+0x6d) [0x7f0a30e8b02d]
=== -------------------------------------------------------------------
===
=======================================================================


one more time:


callcenter1*CLI> core show locks

=======================================================================
=== Currently Held Locks ==============================================
=======================================================================
===
=== <pending> <lock#> (<file>): <lock type> <line num> <function> <lock name> <lock addr> (times locked)
===
=== Thread ID: 139680892671760 (do_monitor           started at [24468] chan_sip.c restart_monitor())
=== ---> Lock #0 (chan_sip.c): MUTEX 24440 do_monitor &monlock 0x7f0a01c6f4c0 (1)
asterisk(ast_bt_get_addresses+0x1d) [0x4e5a12]
asterisk(__ast_pthread_mutex_lock+0xaf) [0x4debf5]
/usr/lib/asterisk/modules/chan_sip.so(+0x7ee53) [0x7f0a01a24e53]
asterisk() [0x5604dc]
/lib/libpthread.so.0(+0x68ba) [0x7f0a334018ba]
/lib/libc.so.6(clone+0x6d) [0x7f0a30e8b02d]
=== ---> Lock #1 (chan_sip.c): MUTEX 3617 __sip_autodestruct p 0x295f9e0 (1)
asterisk(ast_bt_get_addresses+0x1d) [0x4e5a12]
asterisk(__ast_pthread_mutex_lock+0xaf) [0x4debf5]
asterisk(__ao2_lock+0x5a) [0x444d5c]
/usr/lib/asterisk/modules/chan_sip.so(+0x15bdf) [0x7f0a019bbbdf]
asterisk(ast_sched_runq+0x19a) [0x54424a]
/usr/lib/asterisk/modules/chan_sip.so(+0x7ee65) [0x7f0a01a24e65]
asterisk() [0x5604dc]
/lib/libpthread.so.0(+0x68ba) [0x7f0a334018ba]
/lib/libc.so.6(clone+0x6d) [0x7f0a30e8b02d]
=== -------------------------------------------------------------------
===
=== Thread ID: 139680876939024 (pbx_thread           started at [ 5035] pbx.c ast_pbx_start())
=== ---> Lock #0 (channel.c): MUTEX 3636 __ast_read chan 0x297ec40 (1)
asterisk(ast_bt_get_addresses+0x1d) [0x4e5a12]
asterisk(__ast_pthread_mutex_trylock+0xaf) [0x4def78]
asterisk(__ao2_trylock+0x5a) [0x444e1e]
/usr/lib/asterisk/modules/chan_sip.so(+0x7d309) [0x7f0a01a23309]
/usr/lib/asterisk/modules/chan_sip.so(+0x7cfcf) [0x7f0a01a22fcf]
asterisk(ast_io_wait+0x1c4) [0x4d9042]
/usr/lib/asterisk/modules/chan_sip.so(+0x7edb3) [0x7f0a01a24db3]
asterisk() [0x5604dc]
/lib/libpthread.so.0(+0x68ba) [0x7f0a334018ba]
/lib/libc.so.6(clone+0x6d) [0x7f0a30e8b02d]
=== -------------------------------------------------------------------
===
=======================================================================


callcenter1*CLI> dialplan show default
[ Context 'default' created by 'pbx_config' ]
 '123' =>          1. Answer()                                   [pbx_config]
                   2. Wait(1)                                    [pbx_config]
                   3. Set(_RUID=${EPOCH}-${CALLERID(number)})    [pbx_config]
                   4. MYSQL(Connect connid int asteriskcdruser asteriskcdr123 asteriskcdrdb) [pbx_config]
                   5. Set(_ECONNID=${connid})                    [pbx_config]
                   6. MYSQL(Query resultid ${connid} INSERT INTO logs (callerid,uniqid, reallyuniqeid) VALUES ("${CALLERID(number)}", "${UNIQUEID}", "${RUID}")) [pbx_config]
                   7. Background(beltel4)                        [pbx_config]
                   8. Set(__QAZ=${CALLERID(num)})                [pbx_config]
                   9. Queue(supportq,cC)                         [pbx_config]
                   10. MYSQL(Query resultid ${connid} UPDATE logs set username=substr("${MEMBERINTERFACE}" from 5),disconnectdate=now(),filename="${UNIQUEID}.wav",state=1,holdtime=time_to_sec(timediff(disconnectdate, answerdate)),speaktime=time_to_sec(timediff(disconnectdat [pbx_config]
                   11. Set(CDR(userfield)=${MEMBERINTERFACE})    [pbx_config]
                   12. MYSQL(Disconnect ${connid})               [pbx_config]
                   13. Hangup()                                  [pbx_config]
 'h' =>            1. MYSQL(Query resultid ${connid} UPDATE logs set state=2,disconnectdate=now(),holdtime=time_to_sec(timediff(disconnectdate, answerdate)), speaktime=time_to_sec(timediff(disconnectdate,answerbyopdate)),filename="${UNIQUEID}.wav" WHERE reallyuniqeid="${RUI [pbx_config]
                   2. MYSQL(Disconnect ${connid})                [pbx_config]
 Alt. Switch =>    'Lua/'                                        [pbx_lua]


PBX Core settings
-----------------
 Version:                     1.8.2.3
 Build Options:               DONT_OPTIMIZE, DEBUG_THREADS, LOADABLE_MODULES
 Maximum calls:               Not set
 Maximum open file handles:   Not set
 Verbosity:                   6
 Debug level:                 1
 Maximum load average:        0.000000
 Minimum free memory:         0 MB
 Startup time:                23:39:05
 Last reload time:            23:39:05
 System:                      Linux/2.6.32-5-amd64 built by root on x86_64 2011-02-10 17:40:12 UTC
 System name:                
 Entity ID:                   00:15:17:e7:38:58
 Default language:            en
 Language prefix:             Enabled
 User name and group:         /
 Executable includes:         Disabled
 Transcode via SLIN:          Enabled
 Internal timing:             Enabled
 Transmit silence during rec: Disabled
 Generic PLC:                 Enabled

* Subsystems
 -------------
 Manager (AMI):               Enabled
 Web Manager (AMI/HTTP):      Enabled
 Call data records:           Enabled
 Realtime Architecture (ARA): Disabled
Comments:By: Leif Madsen (lmadsen) 2011-02-11 12:28:14.000-0600

Can you test the latest 1.8 branch? This may already be resolved.

By: Evgeniy Kozhuhovskiy (ugenk) 2011-02-17 07:51:29.000-0600

ok, i'll try

By: Evgeniy Kozhuhovskiy (ugenk) 2011-02-17 08:56:45.000-0600

You mean svn branch? Because i'm already using latest 1.8.2.3

By: Leif Madsen (lmadsen) 2011-03-09 14:08:36.000-0600

Yes I'm saying check out the latest 1.8 branch because 1.8.2.x is getting fairly stale now.

Please test at least 1.8.4-rc2 or later.