Summary: | ASTERISK-27571: res_pjsip: If SIP response is received during shutdown a crash may occur | ||
Reporter: | Joshua C. Colp (jcolp) | Labels: | pjsip |
Date Opened: | 2018-01-10 07:44:51.000-0600 | Date Closed: | 2018-01-31 17:10:21.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Resources/res_pjsip |
Versions: | 13.18.5 15.1.5 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ( 0) backtrace_388.txt ( 1) full.txt | |
Description: | During shutdown various things are unregistered, including res_pjsip_session. Unfortunately it is unregistered before res_pjsip. This causes a brief window where traffic may come in that is still associated with res_pjsip_session. Attempting to access the session will produce the wrong result as the index value present on res_pjsip_session will have been reset to -1 instead of its true position. This causes a crash.
Crash caught by testsuite: tests/channels/pjsip/transfers/attended_transfer/nominal/caller_local_app. | ||
Comments: | By: Joshua C. Colp (jcolp) 2018-01-10 07:45:53.815-0600 [~coreyfarrell] It seems as though we need to squash handling of traffic during shutdown. By: Friendly Automation (friendly-automation) 2018-01-31 17:10:21.735-0600 Change 8109 merged by Jenkins2: res_pjsip_session: Prevent crash during shutdown. [https://gerrit.asterisk.org/8109|https://gerrit.asterisk.org/8109] By: Friendly Automation (friendly-automation) 2018-01-31 17:11:47.927-0600 Change 8108 merged by Jenkins2: res_pjsip_session: Prevent crash during shutdown. [https://gerrit.asterisk.org/8108|https://gerrit.asterisk.org/8108] By: Friendly Automation (friendly-automation) 2018-01-31 17:13:18.734-0600 Change 8110 merged by Jenkins2: res_pjsip_session: Prevent crash during shutdown. [https://gerrit.asterisk.org/8110|https://gerrit.asterisk.org/8110] |