[Home]

Summary:ASTERISK-29255: res_rtp_asterisk: Crash when using TURN support
Reporter:Issam RACHDI (issam)Labels:webrtc
Date Opened:2021-01-21 04:27:14.000-0600Date Closed:2021-02-10 15:53:33.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Resources/res_rtp_asterisk
Versions:17.4.0 18.1.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Ubuntu 16.04.6Attachments:( 0) crash.tar.gz
Description:Hello,

I'm having a problem with asterisk that keeps crashing randomly, sometimes up to 7 times a day, with the message "segfault at 90 ip 00007ff3761f768c sp 00007ff301c9c9e0 error 4 in libasteriskpj.so.2[7ff37611a000+1aa000".

I'm using chan_sip, and webrtc. I had this problem with version 17, i upgraded to 18 but still the same problem.

I attaches the files generated by ast_coredumper

Asterisk 18.1.1
Os: Ubuntu 16.04

Thanks
Comments:By: Asterisk Team (asteriskteam) 2021-01-21 04:27:15.041-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: Issam RACHDI (issam) 2021-01-21 04:33:45.454-0600

core dump

By: Joshua C. Colp (jcolp) 2021-01-21 04:36:05.640-0600

The issue appears to be in the TURN functionality which is not used very often, is there a specific reason you are using TURN with Asterisk? Not using such functionality would work around the crash immediately.

By: Issam RACHDI (issam) 2021-01-21 04:40:07.182-0600

Hi

1. I attached the backtrace, i couldn't do it in the creation form.
2 & 3: I have no idea what exactly causes the crash, so i don't really know the specific steps that lead to the crash, or how to reproduce it.

Thank you

By: Issam RACHDI (issam) 2021-01-21 04:43:43.873-0600

Thanks for the quick reply.

Do you mean the configuration in rtp.conf (turnaddr, ...) ? We were having major audio problems after a migration, so i was just testing different options to solve the problem.

I'll disable it and see if it solves the crash, and no audio problems will appear.

Thank you

By: Joshua C. Colp (jcolp) 2021-01-21 04:45:53.752-0600

If firewalls and Asterisk are configured correctly, then there is no need for TURN. It provides a relay if NAT/firewalls won't let traffic through.

By: Issam RACHDI (issam) 2021-01-21 05:30:50.033-0600

Hello again,

Does the problem concern STUN & TURN, or only TURN ? Because when i disable the STUN option, i have no audio.

I think asterisk is configured correctly
{quote}
nat=force_rport,comedia
directmedia=no
canreinvite=no
qualify=yes
icesupport=yes
localnet=10.0.101.0/255.255.255.0
externaddr=my.ex.ternal.ip
media_address=my.ex.ternal.ip
{quote}

We started having problems when we migrated to aws.

Thanks

By: Joshua C. Colp (jcolp) 2021-01-21 05:32:46.191-0600

The problem as shown is in TURN. As for why STUN is required, if behind NAT and you want the ICE candidates to also contain your public IP address you need to configure the ice_host_candidates section in rtp.conf as well:

https://github.com/asterisk/asterisk/blob/master/configs/samples/rtp.conf.sample#L140

Doing so would remove the need for STUN.

By: Issam RACHDI (issam) 2021-01-21 06:15:02.100-0600

Ok, thanks a lot. I'll check that option.

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

By: Issam RACHDI (issam) 2021-02-10 15:22:55.239-0600

Hi,

There has been no crash since disabling TURN in asterisk. So i guess problem solved.

Thanks a lot for your help

By: Asterisk Team (asteriskteam) 2021-02-10 15:22:55.583-0600

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.