Summary: | ASTERISK-27608: Asterisk threads consume cpu usage waiting on pj_ioqueue_poll | ||
Reporter: | Cristian Paul Peñaranda Rojas (kristianpaul) | Labels: | pjsip |
Date Opened: | 2018-01-22 10:18:01.000-0600 | Date Closed: | 2020-01-06 14:46:31.000-0600 |
Priority: | Major | Regression? | |
Status: | Closed/Complete | Components: | Channels/chan_rtp Channels/chan_sip/General |
Versions: | 13.18.4 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ( 0) asterisk-ASTERISK-27608-results.tar.gz ( 1) core_show_taskprocessors.txt ( 2) core_show_threads.txt | |
Description: | Thread 224 (Thread 0x7f0969259700 (LWP 11400)):
#0 0x00007f09d2b2d19d in nanosleep () from /lib64/libc.so.6 #1 0x00007f09d2b5de74 in usleep () from /lib64/libc.so.6 #2 0x00007f0989e62ed2 in pj_thread_sleep () from /usr/lib64/libpj.so.2 #3 0x00007f0989e619fa in pj_ioqueue_poll () from /usr/lib64/libpj.so.2 #4 0x00007f096f9bf3fd in ioqueue_worker_thread (data=0x7f09c0032110) at res_rtp_asterisk.c:1205 #5 0x00007f0989e62bba in thread_main () from /usr/lib64/libpj.so.2 #6 0x00007f09d35f7de5 in start_thread () from /lib64/libpthread.so.0 Threads just keep growing until cpu performance degrades and asterisk gets killed | ||
Comments: | By: Asterisk Team (asteriskteam) 2018-01-22 10:18:02.200-0600 Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report. Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process]. By: George Joseph (gjoseph) 2018-01-22 10:31:55.687-0600 There should ever only be maximum of 2 of those threads, one from res_rtp_asterisk and one from res_pjsip if you're using chan_pjsip, and they do run every 10 milliseconds . Are you saying there are more of them? There really isn't enough information to diagnose any further. Providing a full backtrace will help as will the output of "core show threads" and "core show taskprocessors" By: Cristian Paul Peñaranda Rojas (kristianpaul) 2018-01-22 12:09:12.489-0600 Not usig chan_pjsip, only chap_sip, not sure if there are more of then but there are a pile of threads just doing nanosleep as the one i pasted for opening the bug, and they exponentially keep growing. As requested: See [^core_show_threads.txt] See [^core_show_taskprocessors.txt] Edit: Extracted the pasted log output from this comment and attached as files per issue guidelines. By: Cristian Paul Peñaranda Rojas (kristianpaul) 2018-01-22 13:30:06.569-0600 core dump By: George Joseph (gjoseph) 2018-01-22 14:31:19.826-0600 It looks like there are a lot of pending ICE/STUN requests but you're not using the bundled version of pjproject so it's going to be hard to debug. Can you reconfigure with {{./configure --with-pjproject-bundled}} and see if the problem persists? Even though you're using chan_sip, we still use pjproject for ICE. Also make sure DONT_OPTIMIZE and BETTER_BACKTRACES are set in menuselect under Compiler Flags. By: Cristian Paul Peñaranda Rojas (kristianpaul) 2018-01-23 08:58:41.632-0600 Will do an get back to you By: Asterisk Team (asteriskteam) 2018-02-06 12:00:00.694-0600 Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1]. [1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines |