[Home]

Summary:ASTERISK-29771: Crash occurs when 2 realtime sippeers mysql connections are configured and we have a schema warning
Reporter:Mario Ban (mario.ban@bluewin.ch)Labels:patch
Date Opened:2021-11-22 12:10:44.000-0600Date Closed:2021-11-30 09:48:09.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/Configuration
Versions:16.20.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:OS: Oracle Linux 8.3 MariaDB 10.3 (Galera Cluster) Attachments:( 0) 0001-config.c-Prevent-UB-in-ast_realtime_require_field.patch
( 1) core_info.txt
( 2) debug_log_29771_crash.txt
( 3) extconfig.conf
Description:Crash occurs when starting Asterisk and we have 2 realtime sippeers mysql connections configured (with priorities 1 and 2) and there is a sippeers (sipfriends) schema WARNING logged.

In our case it was column ipaddr varchar(15) was less than 45

After we altered the table and set ipaddr to varchar(45) - no crash anymore
Also if there is only 1 realtime connection but still with ipaddr varchar(15) - no crash

I can provide some debugging output
Comments:By: Asterisk Team (asteriskteam) 2021-11-22 12:10:46.649-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. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

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].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Kevin Harwell (kharwell) 2021-11-22 18:08:18.953-0600

Yes, please provide a debug log (attached as a *.txt file), and a [backtrace|https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace].

Please note that the module you're having difficulty with is in 'extended' support status. As well chan_sip is involved, and it too is in extended support. This means that both of these modules are supported only by community members. Time and effort looking into this problem will be affected by that.

By: Mario Ban (mario.ban@bluewin.ch) 2021-11-27 09:53:27.845-0600

Debug Information

Because {{/usr/share/asterisk/scripts/ast_coredumper}} does not work, I just added the output of {{coredumpctl info ...}}


By: Sean Bright (seanbright) 2021-11-28 14:58:31.921-0600

[~mario.ban@bluewin.ch], can you try [the attached patch|^0001-config.c-Prevent-UB-in-ast_realtime_require_field.patch] and let us know if it fixes the crash?

Edit: Actually I was able to reproduce the crash locally and have confirmed that the patch fixes it. I've put it up for review on gerrit.

By: Friendly Automation (friendly-automation) 2021-11-30 09:48:10.754-0600

Change 17604 merged by Friendly Automation:
config.c: Prevent UB in ast_realtime_require_field.

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

By: Friendly Automation (friendly-automation) 2021-11-30 09:48:25.533-0600

Change 17606 merged by Friendly Automation:
config.c: Prevent UB in ast_realtime_require_field.

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

By: Friendly Automation (friendly-automation) 2021-11-30 09:51:41.091-0600

Change 17589 merged by Friendly Automation:
config.c: Prevent UB in ast_realtime_require_field.

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

By: Friendly Automation (friendly-automation) 2021-11-30 12:57:57.026-0600

Change 17605 merged by Kevin Harwell:
config.c: Prevent UB in ast_realtime_require_field.

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