Summary: | ASTERISK-30363: Crash during srtp session | ||
Reporter: | Vitezslav Novy (vnovy) | Labels: | |
Date Opened: | 2022-12-19 09:07:22.000-0600 | Date Closed: | 2023-01-02 12:00:01.000-0600 |
Priority: | Minor | Regression? | |
Status: | Closed/Complete | Components: | Resources/res_rtp_asterisk |
Versions: | 18.10.1 | Frequency of Occurrence | One Time |
Related Issues: | |||
Environment: | Debian 11 | Attachments: | ( 0) bt.txt |
Description: | On one of our sites asterisk crashed once with attached backtrace.
I have core dump available and I noticed that in __rtp_recvfrom() rtp->dtls.ssl is NULL It points to some race because there is a test in the function which returns immediately when rtp->dtls.ssl == NULL. Probably short unlock/lock sequence allowing timer manipulation is the reason. I guess it is a race with ast_rtp_dtls_stop() which destroys ssl and sets ssl to NULL. I created a patch for us which checks rtp->dtls,ssl again after unlock/lock sequence. I cannot afford a lawyer so I do not attach it | ||
Comments: | By: Asterisk Team (asteriskteam) 2022-12-19 09:07:25.361-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: Vitezslav Novy (vnovy) 2022-12-19 09:08:48.978-0600 Backtrace By: Joshua C. Colp (jcolp) 2022-12-19 09:17:09.231-0600 I would strongly suggest ensuring this doesn't happen in the latest 18, because I remember something like this being resolved already. By: Vitezslav Novy (vnovy) 2022-12-19 09:30:33.996-0600 Thank you, we are moving to latest 18 now. But there is no relevant change in res_rtp_asterisk.c even between 18.10.1 and master. By: Joshua C. Colp (jcolp) 2022-12-19 09:38:04.725-0600 I know, but I remember there being threading changes in PJSIP land involving this as well. I could be wrong of course, but when filing issues in general we really really really prefer it be done on the latest version so we aren't chasing old issues needlessly. By: Asterisk Team (asteriskteam) 2023-01-02 12:00:01.041-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 |