[Home]

Summary:ASTERISK-29289: Asterisk randomly crashes with a segmentation fault
Reporter:Kevin Godwin (kevin_godwin_610)Labels:
Date Opened:2021-02-11 03:07:46.000-0600Date Closed:2021-02-26 12:00:01.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip
Versions:18.1.0 Frequency of
Occurrence
Occasional
Related
Issues:
Environment:Amazon Linux 2, Linux version 4.14.209-160.339.amzn2.x86_64 (mockbuild@ip-10-0-1-32) (gcc version 7.3.1 20180712 (Red Hat 7.3.1-12) (GCC)) #1 SMP Wed Dec 16 22:44:04 UTC 2020. EC2 instance with 16 cores and 64GB ramAttachments:( 0) core.13204-brief.txt
( 1) core.13204-full.txt
( 2) core.13204-info.txt
( 3) core.13204-locks.txt
( 4) core.13204-thread1.txt
Description:Asterisk will randomly crash, sometimes a couple of times a week, other times nothing for 2-3 weeks.

The syslog message is:

kernel: asterisk\[29725\]: segfault at 7fdf58411858 ip 00007fe23ca6f707 sp 00007fe050d36578 error 4 in res_pjsip.so\[7fe23ca4b000+65000\]


The gdb back trace frame output is:

#0  0x00007fe23ca6f707 in ast_str_hash (
   str=0x7fdf58411858 <error: Cannot access memory at address 0x7fdf58411858>)
   at /usr/src/asterisk-18.1.0/include/asterisk/strings.h:1210
1210 while (*str) {

A full core dump file can be provided if required.
Comments:By: Asterisk Team (asteriskteam) 2021-02-11 03:07:48.512-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: Joshua C. Colp (jcolp) 2021-02-11 04:10:54.600-0600

Thank you for the crash report. However, we need more information to investigate the crash. Please provide:

1. A backtrace generated from a core dump using the instructions provided on the Asterisk wiki [1].
2. Specific steps taken that lead to the crash.
3. All configuration information necesary to reproduce the crash.

Thanks!

[1]: https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace



By: Joshua C. Colp (jcolp) 2021-02-11 04:11:16.894-0600

As well, please ensure you are using the latest version - which would be 18.2.0.

By: Kevin Godwin (kevin_godwin_610) 2021-02-11 07:17:36.756-0600

Files from the ast_coredumper command

By: Kevin Godwin (kevin_godwin_610) 2021-02-11 07:24:29.138-0600

Hi,

I have attached the files produced when running ast_coredumper

There is no pattern to the crashes it is completely random and so I cannot confirm the steps needed to be taken to reproduce the crash.

Kevin


By: Kevin Harwell (kharwell) 2021-02-11 13:04:36.335-0600

This appears to be pjsip releasing the underlying transport before we're done with it. There have been some changes that might affect this. If you haven't already, as [~jcolp] stated please upgrade to 18.2.0 and see if you are still having the issue. Thanks!

By: Kevin Harwell (kharwell) 2021-02-11 13:12:28.820-0600

Also what kind of transport(s) are you using exactly: TCP, TLS, and/or websocket?

By: Asterisk Team (asteriskteam) 2021-02-26 12:00:00.597-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