[Home]

Summary:ASTERISK-20159: Segfault when starting Confbridge in conf_find_bridge_profile
Reporter:Birger "WIMPy" Harzenetter (wimpy)Labels:
Date Opened:2012-07-20 16:18:42Date Closed:2012-07-21 08:31:21
Priority:MajorRegression?
Status:Closed/CompleteComponents:
Versions:SVN Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) backtrace
( 1) backtrace2
( 2) confbridge_fix.diff
( 3) confbridge_fix2.txt
( 4) confbridge_fix3.txt
Description:Segfault when starting Confbridge in conf_find_bridge_profile
Comments:By: Terry Wilson (twilson) 2012-07-20 17:30:15.101-0500

Does the attached confbridge_fix.diff take care of the issue for you?

By: Birger "WIMPy" Harzenetter (wimpy) 2012-07-20 18:15:01.858-0500

It fixes the segfault when starting Confbridge, yes.

But it now moans about
app_confbridge.c:1429 confbridge_exec: Conference bridge profile default_bridge does not exist
But it does exist.

Additionally, 'module unload app_confbridge' segfaults in internal_type_destroy.


By: Terry Wilson (twilson) 2012-07-20 19:23:43.624-0500

Are you getting any other warning/error messages when app_confbridge loads? Sounds like there might be a parsing error or something? The only way I get the crash on unload is if I have a problem parsing the confbridge.conf file. Obviously I need to fix the handling for that case anyway, but if there is a problem parsing your config file, then it is possible that I messed up converting the config parsing to the new ACO API and I want to make sure that gets fixed as well.

If you aren't getting the warnings, could you post a version of your confbridge.conf that causes the crash on startup/warning about the bridge profile not existing?

By: Terry Wilson (twilson) 2012-07-20 19:34:52.999-0500

confbridge_fix2.txt makes sure that we don't actually load the confbridge when there is an error calling conf_load_config(). This will make it easier to see the errors parsing the config and avoid the crash unloading.

Still guessing there is an issue with the config parsing, though.

By: Birger "WIMPy" Harzenetter (wimpy) 2012-07-20 19:36:01.070-0500

That was the reason I tried to unload the module, but I didn't try to noload it after I got the other segfault.

You're right it has a parsing error:
ERROR[1659]: config_options.c:558 aco_process_var: Error parsing video_mode=none at line 222 of
ERROR[1659]: config_options.c:393 process_category: In confbridge.conf: Processing options for default_bridge failed

However according to the sample config that line should be ok.
But commenting out that line makes Confbridge work again.


By: Terry Wilson (twilson) 2012-07-20 22:32:50.232-0500

Ok, this should fix everything. The problem was that while the option was documented as "none" being valid, the code never actually parsed for "none" and just ignored the setting relying on the default zeroing of the field. The ACO API is actually strict about parsing and I translated it from the existing code instead of the sample config, so "none" was never added as a valid option, so parsing failed.

This patch adds "none" as a valid option and should fix the various crashes. Let me know if everything works for you and I'll get this committed Monday. Thanks for the report and the help!

Terry

By: Birger "WIMPy" Harzenetter (wimpy) 2012-07-21 07:39:27.819-0500

Confirmed working.
Thanks for the quick fix.