Comments on: Why does Asterisk consume 100% CPU? https://moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/ Abandon All Hope, Ye Who Read This Blog Fri, 14 Aug 2020 20:06:49 +0000 hourly 1 https://wordpress.org/?v=5.1.9 By: Murugaperumal https://moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/comment-page-1/#comment-14576 Mon, 03 Apr 2017 12:56:33 +0000 http://www.moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/#comment-14576 Please let me know how you have fixed this issue.

]]>
By: Snowy https://moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/comment-page-1/#comment-13500 Fri, 03 Feb 2017 12:42:56 +0000 http://www.moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/#comment-13500 Phemnneoal breakdown of the topic, you should write for me too!

]]>
By: araza https://moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/comment-page-1/#comment-12382 Fri, 16 Sep 2016 15:06:06 +0000 http://www.moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/#comment-12382 can someone let me know whey this is taking more and more Core, sometimes shooting upto 500% t0 600% for asterisk process…

Thread 11 (Thread 0x2b26ca678940 (LWP 26060)):
#0 0x00000031c48cc116 in poll () from /lib64/libc.so.6
#1 0x0000000000437aa7 in ast_waitfor_nandfds ()
#2 0x0000000000437e42 in ast_waitfor ()
#3 0x000000000044f1a2 in ?? ()
#4 0x000000000044f596 in ast_waitstream ()
#5 0x0000000000474281 in ?? ()
#6 0x000000000046dce5 in pbx_exec ()
#7 0x00000000004717e7 in ?? ()
#8 0x0000000000471c73 in ast_spawn_extension ()
#9 0x0000000000475c17 in ?? ()
#10 0x0000000000477019 in ?? ()
#11 0x00000000004a12de in ?? ()
#12 0x00000031c500683d in start_thread () from /lib64/libpthread.so.0
#13 0x00000031c48d503d in clone () from /lib64/libc.so.6

]]>
By: vfonseca https://moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/comment-page-1/#comment-11616 Thu, 14 Jul 2016 15:48:21 +0000 http://www.moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/#comment-11616 Hi there
This helped me a lot, in my case the thread using CPU was asterisk itself and had to do with an selinux issue. Fixed now 🙂 Many thanks.

Just a side note to those who don’t find pstack, in CentOS7(2016) pstack is part of gdb, install with `yum install gdb`.

]]>
By: Jerry W https://moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/comment-page-1/#comment-1920 Thu, 18 Sep 2014 20:16:58 +0000 http://www.moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/#comment-1920 I have no idea what I’m looking at here, but I suddenly have the 100% CPU problem. Problem started today but restoring from a backup from 3 days ago didn’t resolve it. The output of ps -LlFm -p `pidof asterisk` was:

4 – asterisk 2481 2480 – 90 17 – – – 17335 – 51616 – 14:53 pts/0 00:00:51 /usr/
1 D asterisk – – 2498 90 17 49 – – – log_wa – 0 14:53 – 00:00:51 –

So I assume the LWP I’m looking for is 2498? If so, this is the result of pstack:

Thread 5 (Thread -1212511312 (LWP 2498)):
#0 0x0050f7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x005eb1d4 in poll () from /lib/tls/libc.so.6
#2 0x0070b677 in __libc_res_nsend () from /lib/libresolv.so.2
#3 0x0070a126 in __libc_res_nquery () from /lib/libresolv.so.2
#4 0x0070a3f8 in __libc_res_nquerydomain () from /lib/libresolv.so.2
#5 0x0070a95e in __libc_res_nsearch () from /lib/libresolv.so.2
#6 0x00a272ce in _nss_dns_gethostbyname3_r () from /lib/libnss_dns.so.2
#7 0x00a27538 in _nss_dns_gethostbyname_r () from /lib/libnss_dns.so.2
#8 0x0060a454 in gethostbyname_r@@GLIBC_2.1.2 () from /lib/tls/libc.so.6
#9 0x080b22c6 in ast_gethostbyname ()

What the heck does that tell me and what’s my next step? Thanks.

]]>
By: Matt https://moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/comment-page-1/#comment-1917 Sat, 30 Aug 2014 14:57:40 +0000 http://www.moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/#comment-1917 This helped me track down 100% CPU issue. Turned out it was streaming music-on-hold setup I did. I deleted that setting and it went back down to normal. — thanks for the post.

]]>
By: Jase https://moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/comment-page-1/#comment-1892 Tue, 25 Mar 2014 12:23:45 +0000 http://www.moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/#comment-1892 I dont see where the issue lies, am I missing something?

Thread 6 (Thread 0x7f6e673e1700 (LWP 24181)):
#0 0x00007f6f7defa343 in poll () from /lib64/libc.so.6
#1 0x000000000043f599 in ast_waitfor_nandfds ()
#2 0x000000000044656f in __ast_request_and_dial ()
#3 0x0000000000489cd4 in ast_pbx_outgoing_exten ()
#4 0x0000000000478ce4 in action_originate ()
#5 0x00000000004752ea in process_message ()
#6 0x0000000000476c9f in do_message ()
#7 0x0000000000476d68 in session_do ()
#8 0x00000000004b746a in dummy_start ()
#9 0x00007f6f7e8759d1 in start_thread () from /lib64/libpthread.so.0
#10 0x00007f6f7df03b6d in clone () from /lib64/libc.so.6
Thread 5 (Thread 0x7f6e62379700 (LWP 24182)):
#0 0x00007f6f7defa343 in poll () from /lib64/libc.so.6
#1 0x000000000043f599 in ast_waitfor_nandfds ()
#2 0x000000000043faa7 in ast_waitfor_n ()
#3 0x00007f6e6d2ec6cd in dial_exec_full () from /usr/lib/asterisk/modules/app_dial.so
#4 0x00007f6e6d2f1115 in dial_exec () from /usr/lib/asterisk/modules/app_dial.so
#5 0x0000000000487850 in pbx_extension_helper ()
#6 0x0000000000488b62 in __ast_pbx_run ()
#7 0x000000000048a2d9 in pbx_thread ()
#8 0x00000000004b746a in dummy_start ()
#9 0x00007f6f7e8759d1 in start_thread () from /lib64/libpthread.so.0
#10 0x00007f6f7df03b6d in clone () from /lib64/libc.so.6
Thread 4 (Thread 0x7f6e66005700 (LWP 24197)):
#0 0x00007f6f7defa343 in poll () from /lib64/libc.so.6
#1 0x000000000043f599 in ast_waitfor_nandfds ()
#2 0x000000000044656f in __ast_request_and_dial ()
#3 0x0000000000489cd4 in ast_pbx_outgoing_exten ()
#4 0x0000000000478ce4 in action_originate ()
#5 0x00000000004752ea in process_message ()
#6 0x0000000000476c9f in do_message ()
#7 0x0000000000476d68 in session_do ()
#8 0x00000000004b746a in dummy_start ()
#9 0x00007f6f7e8759d1 in start_thread () from /lib64/libpthread.so.0
#10 0x00007f6f7df03b6d in clone () from /lib64/libc.so.6

]]>
By: » Asterisk CPU usage at 100% with FreePBX – SysAdminMan Blog https://moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/comment-page-1/#comment-531 Thu, 18 Oct 2012 11:30:41 +0000 http://www.moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/#comment-531 […] http://www.moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/ […]

]]>
By: moy https://moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/comment-page-1/#comment-522 Tue, 31 Jul 2012 15:12:40 +0000 http://www.moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/#comment-522 I’m glad it helped you Mike. Indeed, using strace on the LWP is another cool way of seeing what your multi-threaded app is doing.

]]>
By: Mike https://moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/comment-page-1/#comment-520 Mon, 30 Jul 2012 10:03:21 +0000 http://www.moythreads.com/wordpress/2009/05/06/why-does-asterisk-consume-100-cpu/#comment-520 This really helps, in my case after find out the thread id consuming CPU, strace on the thread found there’s futex flood, and finally figure out the problem was caused by leap second on June 30, 2012 at 23:59:60.

Really appreciate.

]]>