[Home]

Summary:ASTERISK-27542: app_queue: When "queue show" CLI command is executed a crash occurs
Reporter:Miguel Sanz (miguelsanzpardo)Labels:
Date Opened:2018-01-03 02:16:47.000-0600Date Closed:2021-03-22 09:41:14
Priority:MinorRegression?
Status:Closed/CompleteComponents:Applications/app_queue
Versions:13.18.0 Frequency of
Occurrence
Related
Issues:
Environment:I have my operating system installed on an VmWare machine. # uname -a 4.9.0-4-amd64 #1 SMP Debian 4.9.51-1 (2017-09-28) x86_64 GNU/Linux # cat /etc/debian_version 9.2Attachments:( 0) Asterisk.zip
( 1) Bug_queues.zip
( 2) DB_Asterisk.txt
( 3) gdb.txt
( 4) queue_example.txt
Description:I have an Asterisk 13.18.0 which is using realtime with queues config:
- rt_queue_log
- rt_queue_members
- rt_queue_rules
- rt_queues

When I execute CLI> queue show the asterisk service suddenly go down and it is created this coredump:
Comments:By: Asterisk Team (asteriskteam) 2018-01-03 02:16:49.123-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: Joshua C. Colp (jcolp) 2018-01-03 05:19:20.749-0600

In the future please attach backtraces instead of placing them in the description.

By: Joshua C. Colp (jcolp) 2018-01-03 05:21:17.081-0600

Does this happen every time? Can you provide the contents of the database tables?

By: Miguel Sanz (miguelsanzpardo) 2018-01-03 13:15:29.320-0600

Hi Joshua, sorry about doesnt attach the backtraces on a .txt.

It always happen when you execute "CLI>queue show". In this moment I dont have access to the database tables, tomorrow I will send you the contents of my database tables.

By: Miguel Sanz (miguelsanzpardo) 2018-01-05 06:28:19.770-0600

Database contents attached.

By: Joshua C. Colp (jcolp) 2018-01-08 06:09:18.107-0600

You've described the tables but you haven't provided an example of what is in them. Can you do so?

By: Miguel Sanz (miguelsanzpardo) 2018-01-11 09:46:37.291-0600

Added

By: Kevin Harwell (kharwell) 2018-01-17 17:59:04.298-0600

I've been unable to duplicate the crash. Please provide/attach the following as it may relate or could be helpful:

1) A debug log (turn verbose up as well) of the executed scenario of when the crash occurred [1].
2) The following asterisk configuration files: extconfig.conf, res_odbc.conf, queues.conf.
3) The version of mysql being used.
4) What's the exact Asterisk CLI command you are using. For instance are you just executing "queue show" by itself or something like "queue show queue", or "queue show <queuename>"?

[1] https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

Thanks!

By: Kevin Harwell (kharwell) 2018-01-17 17:59:10.005-0600

Also, can you narrow the scope of the scenario some? For instance do you start asterisk, execute the command and then it crashes, or does it only crash after a few things are executed on the system prior to running the command (like calls being made, agents answering a call, etc...)?

By: Miguel Sanz (miguelsanzpardo) 2018-01-24 12:08:35.198-0600

Hi Kevin,

This is the sequence:
1) Asterisk service start
2) I create a realtime queue
3) I execute from console "queue show"  2 times (I thought that executing 1 time was enough but I have needed to execute 2 times)
queue show <ENTER>
queue show <ENTER>
4) And then asterisk crash

If I reboot Asterisk (with the queue created) and then execute again "queue show" 2 times the asterisk service go down again

Mysql version: 10.1.26-MariaDB-0+deb9u1 Debian 9.1
Asterisk version: 13.18.5

I add a .zip with the differents files


By the way I have put verbose and debug to 9 and when I execute "queue show" it appears this info

[Jan 24 19:05:59] DEBUG[813] res_odbc.c: Reusing ODBC handle 0x557760a5fc90 from class 'odbc-asterisk'
[Jan 24 19:05:59] DEBUG[813] res_config_odbc.c: Skip: 0; SQL: SELECT * FROM queues WHERE name LIKE ? ORDER BY name
[Jan 24 19:05:59] DEBUG[813] res_config_odbc.c: Parameter 1 ('name LIKE') = '%'



By: Chris Savinovich (csavinovich) 2018-01-29 08:17:46.525-0600

Mr. Miguel Sanz:

 Please send us the contents of your unixODBC configuration files (following is the equivalent list in my environment).  Also will be helpful if you create a sql dump file with the data contents of your realtime tables.

Thanks

Sample:
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /root/.odbc.ini


By: Chris Savinovich (csavinovich) 2018-02-06 15:18:24.859-0600

This issue cannot be solved until we receive detail information of the odbc drivers version from the reporter.  We will also need the contents of the odbc.ini and odbcinst.int files he used.

Reassigning it back to the reporter.


By: Miguel Sanz (miguelsanzpardo) 2018-02-13 11:22:49.296-0600

Updated.

Attached: Bug_queues.zip

By: Joshua C. Colp (jcolp) 2018-03-19 05:34:53.381-0500

The problem here is that sometimes realtime is returning information that does not include an expected field. We should be tolerant of this.

By: mits (mits) 2018-05-17 00:40:12.145-0500

I am facing same issue on one server. On other servers I am not facing issue. Kindly find major difference in both as below:

Server facing issue:
- Asterisk 13.20.0
- mysql-connector-odbc-8.0.11-1.el6.x86_64
- odbc.ini :
  Driver              = MySQL ODBC 8.0 ANSI Driver
- odbcinst.ini :
  [MySQL ODBC 8.0 ANSI Driver]
  Driver          = /usr/lib64/libmyodbc8a.so
  UsageCount              = 1

Server NOT facing issue:
- Asterisk 13.20.0
- mysql-connector-odbc-5.3.10-1.el6.x86_64
- odbc.ini :
  Driver              = MySQL ODBC 5.3 ANSI Driver
- odbcinst.ini :
  [MySQL ODBC 5.3 ANSI Driver]                                                                                                                                                                                  
  Driver          = /usr/lib64/libmyodbc5a.so                                                                                                                                                                    
  UsageCount              = 1

I hope this will help.
Let me know if you need more information.


By: Friendly Automation (friendly-automation) 2021-03-22 09:41:16.468-0500

Change 15639 merged by Joshua Colp:
app_queue.c: Don't crash when realtime queue name is empty.

[https://gerrit.asterisk.org/c/asterisk/+/15639|https://gerrit.asterisk.org/c/asterisk/+/15639]

By: Friendly Automation (friendly-automation) 2021-03-22 09:41:45.390-0500

Change 15659 merged by Joshua Colp:
app_queue.c: Don't crash when realtime queue name is empty.

[https://gerrit.asterisk.org/c/asterisk/+/15659|https://gerrit.asterisk.org/c/asterisk/+/15659]

By: Friendly Automation (friendly-automation) 2021-03-22 10:11:48.456-0500

Change 15660 merged by Joshua Colp:
app_queue.c: Don't crash when realtime queue name is empty.

[https://gerrit.asterisk.org/c/asterisk/+/15660|https://gerrit.asterisk.org/c/asterisk/+/15660]