Summary:ASTERISK-20507: MWI Refcount Error causing segfault
Reporter:Andrew Parisio (parisioa)Labels:
Date Opened:2012-10-03 13:03:25Date Closed:2012-10-19 12:46:31
Versions: Frequency of
Environment:Debian 2.6.26-2-686 #1 SMP Wed Sep 21 04:35:47 UTC 2011 i686 GNU/Linux Attachments:( 0) backtrace_10-2.txt
( 1) backtrace_10-3.txt
Description:A few weeks ago asterisk started randomly segfaulting with so I updated to  It always happens when the AMI originates a call, this is what the console log outputs, including 500 to 700 refcount errors on every single one of these crashes (it's happened 15 or so times now):

[2012-10-03 10:54:34] VERBOSE[11631] manager.c:   == Manager 'Admin' logged on from
[2012-10-03 10:54:34] VERBOSE[11632] pbx.c:     -- Executing [1811@inside-leg:1] SIPAddHeader("Local/1811@inside-leg-6afa;2", "Call-Info:<sip:>;answer-after=0") in new stack
[2012-10-03 10:54:34] VERBOSE[11632] pbx.c:     -- Executing [1811@inside-leg:2] Dial("Local/1811@inside-leg-6afa;2", "SIP/1811,20") in new stack
[2012-10-03 10:54:34] ERROR[11632] astobj2.c: refcount -1 on object 0xacc24608
[2012-10-03 10:54:34] ERROR[11632] astobj2.c: refcount -2 on object 0xacc24608
[2012-10-03 10:54:34] ERROR[11632] astobj2.c: refcount -3 on object 0xacc24608

After the last refcount error the log ends, and asterisk core dumps.  
Comments:By: Andrew Parisio (parisioa) 2012-10-03 13:03:44.468-0500

Backtrace from a crash yesterday

By: Andrew Parisio (parisioa) 2012-10-03 13:04:00.871-0500

Another backtrace from a crash today

By: Andrew Parisio (parisioa) 2012-10-03 13:23:37.272-0500

file thinks it may be related to ASTERISK-20119 so I'm testing against the 1.8 branch now.

By: Matt Jordan (mjordan) 2012-10-19 11:04:23.894-0500

What was the result of your testing?

By: Andrew Parisio (parisioa) 2012-10-19 12:14:37.765-0500

No segfaults, but i had a very interesting lock up, i had to kill 9 it, i forgot to get a core show locks.  I'm waiting to see if it will happen again.  I haven't had a lock up like that in years.

By: Matt Jordan (mjordan) 2012-10-19 12:46:20.307-0500

If you can reproduce it lets go ahead and file that as another issue.  Repurposing issues in JIRA gets confusing very quickly :-)

I'm going to go ahead and close this out as a duplicate of ASTERISK-20119 - if it turns out not to be the case, please let me know (or another bug marshal in #asterisk-bugs or the asterisk-bugs mailing list) and we'll reopen it.