[Home]

Summary:ASTERISK-12736: crash in ast_cdr_start, backtraces attached
Reporter:Sean Bright (seanbright)Labels:
Date Opened:2008-09-16 09:41:21Date Closed:2008-09-23 11:32:12
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:CDR/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) bt_full.log
( 1) bt.log
( 2) gdb-27th-sep.txt
( 3) thread_apply_all_bt_full.log
Description:Getting a crash in our production PBX.  The codebase is based on a branch of 1.4 that has some very minor modifications for functionality not related to CDRs (ChanSpy mostly).  I can provide a patch against 1.4 if it is really necessary, but I don't think it will be.  bt, bt full, and thread apply bt full logs are coming shortly.
Comments:By: Joel Vandal (jvandal) 2008-09-16 09:43:01

Hmm, can be related to 13489 that we create few minutes ago ?

By: Joel Vandal (jvandal) 2008-09-16 09:43:19

And yes, if you have a patch, this can be very nice =)

By: Sean Bright (seanbright) 2008-09-16 09:55:27

I do not have a patch.  I'm hoping murf can work some magic for me, though :)

By: Steve Murphy (murf) 2008-09-16 15:56:37

I've attached a 1.4 patch to 13467; please verify it will solve this problem.

By: Doug (doug) 2008-09-17 06:14:58

Have tried this patch and had another crash today.
Added debug (gdb-27th-sep.txt)

By: Steve Murphy (murf) 2008-09-23 11:10:28

OK, this is the same as 13489; the gdb-27th-sep crash may or may not be related.
Since I have reports that the fix I posted definitely prevents crashes in ast_cdr_start during a specialized_reset after a bridge, I'm going to post it and close this bug. Please, after some data can be gathered to help us repeat the crash, post the gdb-27th-sep as a new and separate bug, and future investigation may prove or disprove that it was/is/willbe related to this bug.

By: Digium Subversion (svnbot) 2008-09-23 11:32:08

Repository: asterisk
Revision: 144066

U   branches/1.4/res/res_features.c

------------------------------------------------------------------------
r144066 | murf | 2008-09-23 11:32:04 -0500 (Tue, 23 Sep 2008) | 29 lines

(closes issue ASTERISK-12735)
Reported by: DougUDI
Tested by: murf

(closes issue ASTERISK-12736)
Reported by: seanbright
Tested by: murf

(closes issue ASTERISK-12717)
Reported by: edantie
Tested by: murf, edantie, DougUDI


This crash happens because we are unsafely handling old pointers.
The channel whose cdr is being handled, has been hung up and
destroyed already. I reorganized the code a bit, and tried not
to lose the fork-cdr-chain concepts of the previous code.
I now verify that the 'previous' channel (the channel we
had when the bridge was started), still exists, by looking it up
by name in the channel list. I also do not try to reset the
CDR's of channels involved in bridges.

Testing shows it solves the crash problem, and should not
negatively impact previous fixes involving CDR's generated
during/after blind transfers. (The reason we need to reset
the CDR's on the "beginning" channels in the first place).



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

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