[Home]

Summary:ASTERISK-26590: Inconsistent crashes in ast_json_free at json.c
Reporter:Ada Vlachou (ada)Labels:
Date Opened:2016-11-14 06:36:58.000-0600Date Closed:2020-01-14 11:13:46.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:
Versions:13.8.0 Frequency of
Occurrence
Occasional
Related
Issues:
is related toASTERISK-29984 Crash in stasis_message_dtor on ast_json_free
Environment:OS details: Description: Ubuntu 16.04.1 LTS Release: 16.04 Codename: xenial jansson 2.4Attachments:( 0) backtrace.txt
( 1) backtrace-threads.txt
Description:Asterisk will crash occasionally, sometimes it might keep going for a month or two without problems, sometimes it might crash a few hours after restarting it. We haven't been able to spot any event or pattern that might point us in the right direction.

I followed the insctructions as best I could from "Getting a backtrace" article and am attaching the logs.


Comments:By: Asterisk Team (asteriskteam) 2016-11-14 06:36:59.371-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.

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: Ada Vlachou (ada) 2016-11-14 06:40:27.938-0600

Please let me know if you need any more information or if the backtrace isn't correctly prepared.

By: Rusty Newton (rnewton) 2016-11-14 11:29:18.511-0600

[~ada] Thanks for the report and the backtrace.

What helps is to provide an Asterisk log along with the backtrace so that we can see what Asterisk was doing when the crash happened.

https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

That guide will show you how to grab a full log with all the log channels.

We typically need: warning,error,notice,verbose,debug. Verbose and Debug should be turned up to 5 or higher.

Try to grab the log and the backtrace from the same incident. If possible, remember to recompile with the flags suggested on the [Getting a Backtrace|https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace] page.

Additionally, what Jansson version are you using and can you test with the latest 13?

To summarize:

* Grab a log, along with a new backtrace, make sure the log channels are what we need.
* Make sure to recompile with the appropriate compiler flags as mentioned in documentation.
* What Jansson version are you using?
* Can you test to see if these crashes occur with the latest 13?



By: Ada Vlachou (ada) 2016-11-18 05:18:42.932-0600

Not in the same order:
- we are using jansson 2.4
- we were thinking about updating to the latest version so we'll see what happens then
- Getting a log will be a bit problematic. As I said, these crashes don't happen very often and we don't know what triggers them, which would mean leaving the logging on and possibly waiting for quite a while. Maybe even a month or so. We were hoping we might get some information before that from the backtrace.

If that is not possible, we will go with your suggestion and upgrade. We'll also need to find a way to automatically rotate the logs periodically.

By: Rusty Newton (rnewton) 2016-11-23 16:16:32.360-0600

[~kharwell] looked over the backtrace you currently have.

It appears that we can't easily locate the problem with the current data. The crash appears to happen when a stasis message is being destroyed, so if we can tell which message is being destroyed and what is happening at that time then we have a better chance of finding the root issue.

I'll leave the issue in Waiting on Feedback for a while to see if you are able to capture a log.

By: Asterisk Team (asteriskteam) 2016-12-08 12:00:01.739-0600

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines