[Home]

Summary:ASTERISK-27270: cdr_mysql: various crashes at second module reload if cdr_mysql.conf is configured
Reporter:Tzafrir Cohen (tzafrir)Labels:patch
Date Opened:2017-09-14 03:34:26Date Closed:2017-10-11 19:10:32
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:Addons/cdr_mysql
Versions:13.17.1 Frequency of
Occurrence
Related
Issues:
is duplicated byASTERISK-27267 Asterisk crashes after module reload
is duplicated byASTERISK-27327 glibc detected
Environment:Centos 7Attachments:( 0) ASTERISK-27270_cdr_mysql.c_revert.patch
Description:Once we upgraded to 13.17.1, we noticed that 'module reload' occasionally causes crashes. Upon further research it seems that a second or third 'module reload' induces a crash.

Note: I did not attach core dumps. Crashes seem to come from random places roughly at the time of configuration reload.

The following work around the issue:
* Downgrading to 13.13.1 fixed the issue.
* avoiding loading cdr_mysql.so
* Empty cdr_mysql.conf or one that only has the line '[global]'
* Build dcr_mysql.c with the patch from f882ca25722b6290dc6e8d786452b0b26adceed1 reverted.

The following cdr_mysql.conf is good enough to induce a crash:
{code}
[global]
hostname=127.0.0.1
{code}
Comments:By: Asterisk Team (asteriskteam) 2017-09-14 03:34:29.474-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: Tzafrir Cohen (tzafrir) 2017-09-14 03:57:41.003-0500

The workaround patch mentioned in the description: reverting commit f882ca25722b6290dc6e8d786452b0b26adceed1 for cdr_mysql.c alone.

By: PowerPBX (PowerPBX) 2017-10-09 14:34:12.812-0500

Happens in v13.17.2 as well.

Will this be fixed?  I understand that cdr_mysql is deprecated which is why I am asking.

By: Tzafrir Cohen (tzafrir) 2017-10-10 09:56:26.235-0500

Generally those modules are left for the community to support, I guess. Anyway, I've just submitted a review with a fix. Please test it.

By: Friendly Automation (friendly-automation) 2017-10-11 19:10:33.162-0500

Change 6754 merged by Jenkins2:
cdr_mysql: avoid releasing a config string

[https://gerrit.asterisk.org/6754|https://gerrit.asterisk.org/6754]

By: Friendly Automation (friendly-automation) 2017-10-11 19:13:35.230-0500

Change 6721 merged by Jenkins2:
cdr_mysql: avoid releasing a config string

[https://gerrit.asterisk.org/6721|https://gerrit.asterisk.org/6721]

By: Friendly Automation (friendly-automation) 2017-10-11 19:23:58.865-0500

Change 6758 merged by Jenkins2:
cdr_mysql: avoid releasing a config string

[https://gerrit.asterisk.org/6758|https://gerrit.asterisk.org/6758]

By: Friendly Automation (friendly-automation) 2017-10-11 19:46:24.467-0500

Change 6755 merged by Jenkins2:
cdr_mysql: avoid releasing a config string

[https://gerrit.asterisk.org/6755|https://gerrit.asterisk.org/6755]