Summary: | ASTERISK-23297: Asterisk 12, pbx_config.so segfaults if res_parking.so is not loaded, or if res_parking.conf has no configuration | ||
Reporter: | CJ Oster (lordvadr) | Labels: | |
Date Opened: | 2014-02-13 11:50:08.000-0600 | Date Closed: | 2014-02-15 21:32:01.000-0600 |
Priority: | Major | Regression? | |
Status: | Closed/Complete | Components: | PBX/pbx_config Resources/res_parking |
Versions: | 12.0.0 | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | CentOS 6.5, running as a KVM vm on top of a CentOS 5.10 cluster. Linux localhost 2.6.32-431.5.1.el6.x86_64 #1 SMP Wed Feb 12 00:41:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux | Attachments: | ( 0) ASTERISK-23297-12.diff ( 1) backtrace.txt |
Description: | Pretty straight forward. If you try to turn off parking, either by not loading the module, or commenting out the modules config, pbx_config (at least that's what it appears to do) segfaults on startup. Below is the out put of 'asterisk -fvvvvvdddddd' when it crashes (I have removed all config from extensions.conf/ael/lua):
{noformat} ------------ <snip> Loading pbx_config.so. == Parsing '/etc/asterisk/extensions.conf': Found == Setting global variable 'CONSOLE' to 'Console/dsp' == Setting global variable 'IAXINFO' to 'guest' == Setting global variable 'TRUNK' to 'DAHDI/G2' == Setting global variable 'TRUNKMSD' to '1' (Segfault) ------------- {noformat} Here's the same section when it doesn't crash: {noformat} <snip> Loading pbx_config.so. == Parsing '/etc/asterisk/extensions.conf': Found == Setting global variable 'CONSOLE' to 'Console/dsp' == Setting global variable 'IAXINFO' to 'guest' == Setting global variable 'TRUNK' to 'DAHDI/G2' == Setting global variable 'TRUNKMSD' to '1' -- Registered extension context 'parkedcalls'; registrar: res_parking/default -- merging incls/swits/igpats from old(parkedcalls) to new(parkedcalls) context, registrar = pbx_config -- Added extension '720' priority 1 to parkedcalls -- Added extension '719' priority 1 to parkedcalls (...etc...) -- Added extension '700' priority 1 to parkedcalls -- Time to scan old dialplan and merge leftovers back into the new: 0.002096 sec -- Time to restore hints and swap in new dialplan: 0.000003 sec -- Time to delete the old dialplan: 0.000012 sec -- Total time merge_contexts_delete: 0.002111 sec pbx_config.so => (Text Extension Configuration) (...continues to load normally...) {noformat} ------------------ STEPS TO REPRODUCE ------------------ 1) Freshly install system, and update. 2) Install asterisk yum repo. 3) Install asterisk and asterisk-config. 3.5) Remove all valid contexts from extensions.conf 4) Asterisk should start fine. 5) Add "noload => res_parking.so" to /etc/asterisk/modules.conf 6) Asterisk will now crash on startup. 7) Remove the noload, asterisk will start normally. 8) Comment out the 3 uncommented-lines in res_parking.conf 9) Asterisk will now crash on startup. 10) Repeat steps 5-9 as needed. | ||
Comments: | By: Matt Jordan (mjordan) 2014-02-13 12:32:55.406-0600 Thanks for reporting this bug. Do you mind attaching the backtrace from the crash you've had? Instructions on generating a backtrace are on the Asterisk wiki here - https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace By: CJ Oster (lordvadr) 2014-02-13 16:25:49.214-0600 Backtrace from crash as requested. By: CJ Oster (lordvadr) 2014-02-13 16:27:07.103-0600 Backtrace attahed. ALSO, I should point out that I discovered that you have to have an empty (e.g. no valid contexts) in extensions.conf to cause the crash. By: Matt Jordan (mjordan) 2014-02-13 18:55:55.125-0600 So, right now I have: * An empty {{extensions.conf}} * An empty {{res_parking.conf}} I'm using Asterisk 12 from the current SVN branch (r407875) Starting Asterisk with {{res_parking}} - no crash. (modules are set to autoload) Modifying {{modules.conf}} with a {{noload => res_parking.so}} - no crash. I noticed that there was still some of the {{pbx_ael}} stuff loaded, so I added a {{noload => pbx_ael.so}} as well. Crash! By: Matt Jordan (mjordan) 2014-02-13 19:15:34.855-0600 Attached is a patch that fixes the issue for me. If you could please test it, that'd be great. With this patch, I was able to unload, noload, module load, and generally muck with things that provide dialplan - including {{pbx_ael}}, {{pbx_config}}, {{res_parking}} - all starting with no configuration. By: CJ Oster (lordvadr) 2014-02-14 00:45:07.758-0600 Matt, I neither have the man-power, nor the expertise to mix built vs. package-manged installations. You are welcome to my VM's. I'll find you on freenode tomorrow and you can have all the fun want with my VM's. |