Summary: | ASTERISK-27241: libc segfault upon entry into app_directory | ||
Reporter: | David Moore (dmoore) | Labels: | patch |
Date Opened: | 2017-09-01 09:42:54 | Date Closed: | 2017-09-05 08:22:32 |
Priority: | Critical | Regression? | |
Status: | Closed/Complete | Components: | Applications/app_directory |
Versions: | 13.17.1 | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | Tested on fresh installs of debian 8 and debian 9, using .deb install and installing from source | Attachments: | ( 0) 0001-app_directory-Handle-a-NULL-mailbox-without-crashing.patch ( 1) core-brief.txt ( 2) core-full.txt ( 3) core-locks.txt ( 4) core-thread1.txt |
Description: | backtrace will be attached shortly
asterisk realtime environment with odbc voicemail storage, attempting to upgrade from 13.4, not making any config changes - using official mysql odbc libs i dial in to our asterisk server, i hear a Playback() and then i hit a WaitExten() and I press 1 to enter app_directory - asterisk segfaults reliably every single time [ 1240.827310] asterisk[10983]: segfault at 0 ip 00007f3894626c3a sp 00007f38939bd308 error 4 in libc-2.19.so[7f38945a5000+1a1000] | ||
Comments: | By: Asterisk Team (asteriskteam) 2017-09-01 09:42:55.469-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: David Moore (dmoore) 2017-09-01 09:43:47.542-0500 output from ast_coredumper By: Sean Bright (seanbright) 2017-09-01 09:50:54.994-0500 Do you have {{NULL}} in your database's {{mailbox}} column for any of your rows? By: David Moore (dmoore) 2017-09-01 09:53:26.692-0500 I do not have any NULL entries in the mailbox column, but I do have empty string entries By: Sean Bright (seanbright) 2017-09-01 09:56:24.106-0500 Proposed patch By: David Moore (dmoore) 2017-09-01 10:09:46.001-0500 This patch fixes the issue. Thank you, Sean. [2017-09-01 05:06:15] WARNING[3024][C-00000000]: app_directory.c:515 realtime_directory: Skipping result with missing or empty mailbox [2017-09-01 05:06:15] WARNING[3024][C-00000000]: app_directory.c:515 realtime_directory: Skipping result with missing or empty mailbox [2017-09-01 05:06:15] WARNING[3024][C-00000000]: app_directory.c:515 realtime_directory: Skipping result with missing or empty mailbox [2017-09-01 05:06:15] WARNING[3024][C-00000000]: app_directory.c:515 realtime_directory: Skipping result with missing or empty mailbox [2017-09-01 05:06:15] WARNING[3024][C-00000000]: app_directory.c:515 realtime_directory: Skipping result with missing or empty mailbox [2017-09-01 05:06:15] WARNING[3024][C-00000000]: app_directory.c:515 realtime_directory: Skipping result with missing or empty mailbox [2017-09-01 05:06:15] WARNING[3024][C-00000000]: app_directory.c:515 realtime_directory: Skipping result with missing or empty mailbox [2017-09-01 05:06:15] WARNING[3024][C-00000000]: app_directory.c:515 realtime_directory: Skipping result with missing or empty mailbox [2017-09-01 05:06:15] WARNING[3024][C-00000000]: app_directory.c:515 realtime_directory: Skipping result with missing or empty mailbox By: Sean Bright (seanbright) 2017-09-01 10:13:28.999-0500 Is there a use-case for an empty mailbox? By: David Moore (dmoore) 2017-09-01 10:27:06.038-0500 I need to get back to you on that. We have external business logic at play here, we have a concept of 'workgroups' that is outside of asterisk, and the answer to your question is not immediately obvious in that context - this may be something we can fix in our code, or we may indeed have such a use case By: Friendly Automation (friendly-automation) 2017-09-05 08:22:33.573-0500 Change 6370 merged by Joshua Colp: app_directory: Handle a NULL mailbox without crashing [https://gerrit.asterisk.org/6370|https://gerrit.asterisk.org/6370] By: Friendly Automation (friendly-automation) 2017-09-05 08:29:26.944-0500 Change 6371 merged by Jenkins2: app_directory: Handle a NULL mailbox without crashing [https://gerrit.asterisk.org/6371|https://gerrit.asterisk.org/6371] By: Friendly Automation (friendly-automation) 2017-09-05 08:39:46.351-0500 Change 6372 merged by Jenkins2: app_directory: Handle a NULL mailbox without crashing [https://gerrit.asterisk.org/6372|https://gerrit.asterisk.org/6372] By: Friendly Automation (friendly-automation) 2017-09-05 08:43:27.130-0500 Change 6373 merged by Joshua Colp: app_directory: Handle a NULL mailbox without crashing [https://gerrit.asterisk.org/6373|https://gerrit.asterisk.org/6373] |