[Home]

Summary:ASTERISK-16365: [patch] dialplan reload deadlocks in ast_rdlock_contexts when calling ast_hint_state_changed
Reporter:Alan Graham (zerohalo)Labels:
Date Opened:2010-07-14 13:45:16Date Closed:2010-10-12 12:25:57
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
is related toASTERISK-21228 Deadlock in pbx_find_extension when attempting an autoservice stop due to holding the context lock
Environment:Attachments:( 0) 20100726__issue17643.diff.txt
( 1) bt_scrubbed.txt
( 2) bt_scrubbed3.txt
( 3) bt_scrubbed-post-patch.txt
( 4) bt3.txt
( 5) csl.txt
( 6) csl3.txt
( 7) csl-post-patch.txt
Description:asterisk 1.4.33-rc2, odbc-mysql realtime

when reloading, if a devicestate callback for ast_hint_state_changed, asterisk deadlocks chan_sip.

attaching core show locks and backtrace
Comments:By: Tilghman Lesher (tilghman) 2010-07-26 18:13:35

Patch uploaded that should fix this deadlock (due to recursiveness).

By: Alan Graham (zerohalo) 2010-07-26 20:18:04

patched - will let you know how testing goes.

By: Ramon Peek-Fares (ramonpeek) 2010-07-27 07:11:22

I found the same issue on one of our systems, will test this patch too.

By: Tilghman Lesher (tilghman) 2010-08-04 16:18:24

Any results from testing?  It has been a week since.

By: Ramon Peek-Fares (ramonpeek) 2010-08-05 01:05:51

I've been successfully testing this patch since 2010-07-27, before the patch the system would crash about every 1-2 days. It hasn't crashed yet since. ;-)
I guess the patch really resolved the issue.

By: Digium Subversion (svnbot) 2010-08-05 02:28:31

Repository: asterisk
Revision: 280982

U   branches/1.4/main/pbx.c

------------------------------------------------------------------------
r280982 | tilghman | 2010-08-05 02:28:31 -0500 (Thu, 05 Aug 2010) | 8 lines

Change context lock back to a mutex, because functionality depends upon the lock being recursive.

(closes issue ASTERISK-16365)
Reported by: zerohalo
Patches:
      20100726__issue17643.diff.txt uploaded by tilghman (license 14)
Tested by: zerohalo

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=280982

By: Digium Subversion (svnbot) 2010-08-05 02:40:45

Repository: asterisk
Revision: 280983

_U  branches/1.6.2/
U   branches/1.6.2/include/asterisk/pbx.h
U   branches/1.6.2/main/pbx.c

------------------------------------------------------------------------
r280983 | tilghman | 2010-08-05 02:40:45 -0500 (Thu, 05 Aug 2010) | 15 lines

Merged revisions 280982 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r280982 | tilghman | 2010-08-05 02:28:33 -0500 (Thu, 05 Aug 2010) | 8 lines
 
 Change context lock back to a mutex, because functionality depends upon the lock being recursive.
 
 (closes issue ASTERISK-16365)
  Reported by: zerohalo
  Patches:
        20100726__issue17643.diff.txt uploaded by tilghman (license 14)
  Tested by: zerohalo
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=280983

By: Digium Subversion (svnbot) 2010-08-05 02:46:35

Repository: asterisk
Revision: 280984

_U  branches/1.8/
U   branches/1.8/include/asterisk/pbx.h
U   branches/1.8/main/pbx.c

------------------------------------------------------------------------
r280984 | tilghman | 2010-08-05 02:46:35 -0500 (Thu, 05 Aug 2010) | 22 lines

Merged revisions 280983 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
 r280983 | tilghman | 2010-08-05 02:40:47 -0500 (Thu, 05 Aug 2010) | 15 lines
 
 Merged revisions 280982 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r280982 | tilghman | 2010-08-05 02:28:33 -0500 (Thu, 05 Aug 2010) | 8 lines
   
   Change context lock back to a mutex, because functionality depends upon the lock being recursive.
   
   (closes issue ASTERISK-16365)
    Reported by: zerohalo
    Patches:
          20100726__issue17643.diff.txt uploaded by tilghman (license 14)
    Tested by: zerohalo
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=280984

By: Digium Subversion (svnbot) 2010-08-05 02:47:29

Repository: asterisk
Revision: 280985

_U  trunk/
U   trunk/include/asterisk/pbx.h
U   trunk/main/pbx.c

------------------------------------------------------------------------
r280985 | tilghman | 2010-08-05 02:47:28 -0500 (Thu, 05 Aug 2010) | 29 lines

Merged revisions 280984 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
 r280984 | tilghman | 2010-08-05 02:46:36 -0500 (Thu, 05 Aug 2010) | 22 lines
 
 Merged revisions 280983 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.6.2
 
 ................
   r280983 | tilghman | 2010-08-05 02:40:47 -0500 (Thu, 05 Aug 2010) | 15 lines
   
   Merged revisions 280982 via svnmerge from
   https://origsvn.digium.com/svn/asterisk/branches/1.4
   
   ........
     r280982 | tilghman | 2010-08-05 02:28:33 -0500 (Thu, 05 Aug 2010) | 8 lines
     
     Change context lock back to a mutex, because functionality depends upon the lock being recursive.
     
     (closes issue ASTERISK-16365)
      Reported by: zerohalo
      Patches:
            20100726__issue17643.diff.txt uploaded by tilghman (license 14)
      Tested by: zerohalo
   ........
 ................
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=280985

By: Alan Graham (zerohalo) 2010-08-18 12:36:54

looks like this is back, core show locks (post-patch) attached, bt forthcoming.

By: Alan Graham (zerohalo) 2010-08-18 13:17:00

bt attached

By: Tilghman Lesher (tilghman) 2010-08-18 15:17:52

You're not actually showing a deadlock here.  Looks like an unrelated issue.  Please file it as such.

By: Alan Graham (zerohalo) 2010-08-19 09:05:47

sorry about that - that does look different

However, we just had a deadlock this morning that looks exactly like this one in ast_rdlock_contexts after the patch was applied, bt3.txt attached.

By: Tilghman Lesher (tilghman) 2010-08-19 13:04:48

It is STILL not the same deadlock.  Please file a new issue.