Summary: | ASTERISK-26974: res_pjsip: Deadlock in T.38 framehook | ||||
Reporter: | Richard Mudgett (rmudgett) | Labels: | |||
Date Opened: | 2017-04-29 18:10:09 | Date Closed: | 2017-05-02 09:14:48 | ||
Priority: | Major | Regression? | |||
Status: | Closed/Complete | Components: | Resources/res_pjsip_t38 | ||
Versions: | 13.15.0 | Frequency of Occurrence | One Time | ||
Related Issues: |
| ||||
Environment: | Attachments: | ( 0) backtrace-threads-PJSIP.txt | |||
Description: | A deadlock can happen while T.38 is active and a re-INVITE happens. The thread processing the re-INVITE is trying to update the channel's format capabilities while the channel thread is trying to send a frame. The thread processing the re-INVITE has the session's media container lock and wants the channel lock and the channel thread has the channel lock and wants the session's media container lock. | ||||
Comments: | By: Richard Mudgett (rmudgett) 2017-04-29 18:12:42.480-0500 [^backtrace-threads-PJSIP.txt] - Initially attached to ASTERISK-26445 but it was a different deadlock than the other backtraces. By: Ross Beer (rossbeer) 2017-05-02 08:41:31.160-0500 I have just had an out-of-memory issue while running Asterisk Asterisk GIT-13-13.15.0-rc1-121-gbf7cf10M Patched with 5561 + 5560. Asterisk crashed but didn't generate a core dump, however, the following is shown the log: {noformat} May 2 14:14:50 host01 kernel: Out of memory: Kill process 24767 (asterisk) score 904 or sacrifice child May 2 14:14:50 host01 kernel: Killed process 24767 (asterisk) total-vm:27741128kB, anon-rss:15694096kB, file-rss:0kB {noformat} Memory Debug shows the memory growing: {noformat} memory show summary res_pjsip_t38.c 160 bytes in 4 allocations by t38_attach_framehook() line 529 of res_pjsip_t38.c 448 bytes in 4 allocations by t38_state_get_or_alloc() line 237 of res_pjsip_t38.c 608 bytes allocated in 8 selected allocations 22326454 bytes in all allocations 216784 bytes in deferred free large allocations 16719 bytes in deferred free small allocations 233503 bytes in deferred free allocations 22559957 bytes in all allocations and deferred free allocations {noformat} By: Friendly Automation (friendly-automation) 2017-05-02 09:14:49.293-0500 Change 5560 merged by Jenkins2: res_pjsip_t38.c: Fix deadlock in T.38 framehook. [https://gerrit.asterisk.org/5560|https://gerrit.asterisk.org/5560] By: Friendly Automation (friendly-automation) 2017-05-02 09:22:37.523-0500 Change 5562 merged by Jenkins2: res_pjsip_t38.c: Fix deadlock in T.38 framehook. [https://gerrit.asterisk.org/5562|https://gerrit.asterisk.org/5562] By: Friendly Automation (friendly-automation) 2017-05-02 09:23:46.963-0500 Change 5563 merged by Jenkins2: res_pjsip_t38.c: Fix deadlock in T.38 framehook. [https://gerrit.asterisk.org/5563|https://gerrit.asterisk.org/5563] |