[Home]

Summary:ASTERISK-27391: Regression: Deadlock between AOR named lock and pjproject grp lock
Reporter:shaurya jain (shaurya)Labels:patch pjsip webrtc
Date Opened:2017-11-03 03:48:27Date Closed:2017-11-09 11:49:24.000-0600
Priority:CriticalRegression?Yes
Status:Closed/CompleteComponents:pjproject/pjsip
Versions:13.18.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Ubuntu Server 16.04,PJSIP,WEBRTCAttachments:( 0) core-asterisk-running-2017-11-03T17-48-09+0530-brief.txt
( 1) core-asterisk-running-2017-11-03T17-48-09+0530-full.txt
( 2) core-asterisk-running-2017-11-03T17-48-09+0530-locks.txt
( 3) core-asterisk-running-2017-11-03T17-48-09+0530-thread1.txt
( 4) full
( 5) jira_asterisk_27391_v13.patch
( 6) log.txt
Description:Version:-13.18.0

Asterisk got stuck after Login and Logout the webrtc:-

 == WebSocket connection from '192.168.1.2:50038' forcefully closed due to fatal write error
 == WebSocket connection from '192.168.1.2:50040' for protocol 'sip' accepted using version '13'
   -- Added contact 'sip:7k9q5qq9@192.168.1.2:50040;transport=ws' to AOR '1001' with expiration of 600 seconds
 == Contact 1001/sip:7k9q5qq9@192.168.1.2:50040;transport=ws has been created
 == Endpoint 1001 is now Reachable
   -- Contact 1001/sip:7k9q5qq9@192.168.1.2:50040;transport=ws is now Unknown.  RTT: 0.000 msec
   -- Removed contact 'sip:7k9q5qq9@192.168.1.2:50040;transport=ws' from AOR '1001' due to request
 == Contact 1001/sip:7k9q5qq9@192.168.1.2:50040;transport=ws has been deleted
 == WebSocket connection from '192.168.1.2:50044' for protocol 'sip' accepted using version '13'

Same thing is working find in 13.17.2 version

Attached are the GDB and full logs in debug mode.
Comments:By: Asterisk Team (asteriskteam) 2017-11-03 03:48:29.696-0500

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.

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].

By: George Joseph (gjoseph) 2017-11-03 06:30:00.579-0500

I think you forgot to attach the logs and backtraces.  

When you say "got stuck" do you mean just for this endpoint or do you mean completely?  

Please recompile asterisk with DEBUG_THREADS turned on, then reproduce the problem and run /var/lib/asterisk/ast_coredumper.  This way we'll get locking information.


By: shaurya jain (shaurya) 2017-11-03 07:23:04.240-0500

attached are the required logs

By: George Joseph (gjoseph) 2017-11-03 10:37:03.382-0500

We're treating this as a regression and working it.


By: Richard Mudgett (rmudgett) 2017-11-06 18:46:57.372-0600

[^jira_asterisk_27391_v13.patch] - This patch should fix the deadlock.  Please test and report back.

The patch applies to the v13 branch and should apply cleanly to 13.18.0.
{{patch -p1 -i jira_asterisk_27391_v13.patch}}

By: shaurya jain (shaurya) 2017-11-07 00:29:59.323-0600

After applying patch jira_asterisk_27391_v13.patch,It's working fine.

Thanks a lot for prompt responses.Thank you Richard Mudgett.

By: Friendly Automation (friendly-automation) 2017-11-09 11:49:25.103-0600

Change 7112 merged by Kevin Harwell:
res_pjsip_registrar.c: Fix AOR and pjproject group deadlock.

[https://gerrit.asterisk.org/7112|https://gerrit.asterisk.org/7112]

By: Friendly Automation (friendly-automation) 2017-11-09 11:49:39.887-0600

Change 7109 merged by Kevin Harwell:
res_pjsip_registrar.c: Fix named AOR and pjproject group deadlock.

[https://gerrit.asterisk.org/7109|https://gerrit.asterisk.org/7109]

By: Friendly Automation (friendly-automation) 2017-11-09 11:49:54.732-0600

Change 7110 merged by Kevin Harwell:
res_pjsip_registrar.c: Fix AOR and pjproject group deadlock.

[https://gerrit.asterisk.org/7110|https://gerrit.asterisk.org/7110]

By: Friendly Automation (friendly-automation) 2017-11-09 11:50:03.011-0600

Change 7111 merged by Kevin Harwell:
res_pjsip_registrar.c: Fix AOR and pjproject group deadlock.

[https://gerrit.asterisk.org/7111|https://gerrit.asterisk.org/7111]

By: Friendly Automation (friendly-automation) 2017-11-09 11:50:13.450-0600

Change 7113 merged by Kevin Harwell:
res_pjsip_registrar.c: Fix named AOR and pjproject group deadlock.

[https://gerrit.asterisk.org/7113|https://gerrit.asterisk.org/7113]

By: Friendly Automation (friendly-automation) 2017-11-09 12:48:04.387-0600

Change 7151 merged by Jenkins2:
res_pjsip_registrar.c: Fix named AOR and pjproject group deadlock.

[https://gerrit.asterisk.org/7151|https://gerrit.asterisk.org/7151]

By: Friendly Automation (friendly-automation) 2017-11-09 14:07:39.253-0600

Change 7153 merged by Kevin Harwell:
res_pjsip_registrar.c: Fix AOR and pjproject group deadlock.

[https://gerrit.asterisk.org/7153|https://gerrit.asterisk.org/7153]

By: Friendly Automation (friendly-automation) 2017-11-09 14:08:07.926-0600

Change 7152 merged by Kevin Harwell:
res_pjsip_registrar.c: Fix AOR and pjproject group deadlock.

[https://gerrit.asterisk.org/7152|https://gerrit.asterisk.org/7152]