Summary: | ASTERISK-30419: pjsip: Crash when sending NOTIFY in PJSIP 2.13 | ||
Reporter: | Ross Beer (rossbeer) | Labels: | patch |
Date Opened: | 2023-02-08 06:08:02.000-0600 | Date Closed: | 2023-02-27 11:04:52.000-0600 |
Priority: | Minor | Regression? | |
Status: | Closed/Complete | Components: | pjproject/pjsip Resources/res_pjsip_pubsub |
Versions: | GIT | Frequency of Occurrence | |
Related Issues: | |||
Environment: | CentOS | Attachments: | ( 0) ASTERISK-30419.diff |
Description: | The latest GIT 18 Commit (19792) causes a segfault while sending notifications.
Core dump and backtrace sent to George Joseph. | ||
Comments: | By: Asterisk Team (asteriskteam) 2023-02-08 06:08:06.515-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: George Joseph (gjoseph) 2023-02-08 07:21:25.844-0600 Ross, were there any errors in the logs before the crash? By: Ross Beer (rossbeer) 2023-02-08 07:34:10.131-0600 Unfortunately, the logs rotated before I noticed the issue. By: Stanislav Abramenkov (silentindark) 2023-02-09 01:23:44.387-0600 Teluu has been released a small fix: https://github.com/pjsip/pjproject/pull/3373 This change for the following commit: Fixed issues with event subscription regarding on_rx_refresh() and unsubscription (#3126) - https://github.com/pjsip/pjproject/pull/3126 If you have the possibility, could you please test this fix? By: Ross Beer (rossbeer) 2023-02-09 05:57:47.354-0600 How should I apply the patch to the bundled PJSIP? By: George Joseph (gjoseph) 2023-02-09 06:05:30.450-0600 Can you try the gerrit review and see if it fixes the crash and also make sure nothing else is affected by it? By: George Joseph (gjoseph) 2023-02-09 07:16:14.136-0600 Heh, I didn't see the earlier comments :) [~rossbeer] You can download the full asterisk patch from gerrit. By: Ross Beer (rossbeer) 2023-02-09 15:11:56.073-0600 Asterisk now starts, I will monitor for a while to confirm if I see any further issues. By: Ross Beer (rossbeer) 2023-02-10 03:44:53.921-0600 Unfortunately this has not resolved the issue: {noformat} Thread 1 (Thread 0x2b37555f8700 (LWP 108742)): #0 0x00002b350365b56e in pjsip_evsub_send_request (sub=0x2b3664272138, tdata=0x0) at ../src/pjsip-simple/evsub.c:1396 status = 0 #1 0x00002b350365ccf4 in on_tsx_state_uas (sub=0x2b3664272138, tsx=0x2b3804c606f8, event=0x2b37555f78c0) at ../src/pjsip-simple/evsub.c:2228 expires = 0x2b35d406b740 tdata = 0x2b38045cbea8 st_code = 200 st_text = 0x0 body = 0x0 old_state = PJSIP_EVSUB_STATE_ACTIVE old_state_str = {ptr = 0x2b350373cf54 "ACTIVE", slen = 6} reason = {ptr = 0x0, slen = 0} rdata = 0x2b35d40112c8 msg = 0x2b35d4021620 res_hdr = {prev = 0x2b37555f76f0, next = 0x2b37555f76f0, type = 1432319792, name = {ptr = 0x2b350373387e <pj_stricmp+135> "211E364203", <incomplete sequence 364>, slen = 47510190471128}, sname = {ptr = 0x2b3664287c18 "", slen = 60304320}, vptr = 0x2b3664272138} status = 0 event_hdr = 0x2b35d406b788 {noformat} Full core dumps have been sent to George. By: George Joseph (gjoseph) 2023-02-10 06:36:21.797-0600 Investigating further. By: Michael Bradeen (mbradeen) 2023-02-14 10:56:27.817-0600 Hi [~rossbeer], I've attached a new patch that includes the one George provided previously, so only need to run the one. Please git it a test and let us know. By: Ross Beer (rossbeer) 2023-02-20 04:52:45.442-0600 Hi Michael, Sorry this has taken me so long to test. I have now applied the latest patch and asterisk has been running for 21 hours with no crashes. I will continue to monitor it, but it is looking good so far. By: Ross Beer (rossbeer) 2023-02-23 05:05:03.798-0600 We are now at the 4-day period and there have been no issues experienced while running the latest patch. By: Friendly Automation (friendly-automation) 2023-02-27 11:04:53.772-0600 Change 19902 merged by Friendly Automation: res_pjsip: Prevent SEGV in pjsip_evsub_send_request [https://gerrit.asterisk.org/c/asterisk/+/19902|https://gerrit.asterisk.org/c/asterisk/+/19902] By: Friendly Automation (friendly-automation) 2023-02-27 11:06:06.490-0600 Change 19901 merged by Friendly Automation: res_pjsip: Prevent SEGV in pjsip_evsub_send_request [https://gerrit.asterisk.org/c/asterisk/+/19901|https://gerrit.asterisk.org/c/asterisk/+/19901] By: Friendly Automation (friendly-automation) 2023-02-27 11:22:23.022-0600 Change 19922 merged by George Joseph: res_pjsip: Prevent SEGV in pjsip_evsub_send_request [https://gerrit.asterisk.org/c/asterisk/+/19922|https://gerrit.asterisk.org/c/asterisk/+/19922] |