[Home]

Summary:ASTERISK-25475: PJSIP tab completion of 'pjsip show endpoint' results in query storm and takes a very long time
Reporter:mdu113 (mdu113)Labels:
Date Opened:2015-10-17 18:22:50Date Closed:2017-12-13 11:23:41.000-0600
Priority:MinorRegression?Yes
Status:Closed/CompleteComponents:Channels/chan_pjsip Resources/res_pjsip
Versions:13.6.0 Frequency of
Occurrence
Related
Issues:
Environment:linux 64bit kernel 3.10.17 distro slackware64 14.1 pjproject 2.4.5 asterisk 13.6.0Attachments:( 0) pjsip_show_endpoint.gif
Description:If I type "pjsip show endpoint" in the console and then
press "Tab" asking for name completion then asterisk hangs for over a minute and I register over 300 queries like this in the db log:

SELECT * FROM pjsip_endpoints_v WHERE id LIKE '%' ORDER BY id

At the moment of test I have 173 endpoints in the database.
Issue was commented by Matthew Jordan here:
http://lists.digium.com/pipermail/asterisk-dev/2015-October/075127.html
Comments:By: Asterisk Team (asteriskteam) 2015-10-17 18:22:51.310-0500

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: Carl Fortin (phonefxg) 2017-02-15 14:24:34.222-0600

I'm running 14.2.1 and the pjsip show endpoint with tab completion makes the CPU go to a 100 % and the asterisk console stop responding.
I would be very careful with tab completion on a production system, because in my case I have to restart asterisk to fix the problem.
I have about 1200 endpoints in ps_endpoints.

By: Carl Fortin (phonefxg) 2017-02-15 14:28:09.126-0600

Here is what happen when I run pjsip show endpoint and TAB.
Look at the CPU.
A picture is worth a thousands words.

By: Sean Bright (seanbright) 2017-12-13 11:23:41.142-0600

Fixed by https://gerrit.asterisk.org/#/c/7495/