Summary:ASTERISK-07681: Asterisk crashing when using custom application when JB is enabled
Reporter:inspired (inspired)Labels:
Date Opened:2006-09-06 06:52:56Date Closed:2011-06-07 14:00:38
Versions:Frequency of
Environment:Attachments:( 0) gdb.txt
Description:I have tested this on:
Asterisk 1.2.0 and up to 1.2.11 - Asterisk not crashing
Asterisk 1.2.0 and up to 1.2.11+jitterbuffer - Asterisk crashing
Asterisk 1.2-SVN+jitterbuffer - Asterisk crashing
Asterisk SVN - Module won't compile

I am using an application app_mcc2.c which rates calls, chooses trunk, does prepaid/postpaid handling etc. This application was developed by my programmer and has worked flawlessly since Asterisk 1.0.5 with minor code changes from 1.0.X to 1.2.X.

What happens is that as soon as I enable the jitterbuffer in Makefile (GENERIC_JB = -DAST_JB) Asterisk will crash when my application is run. I have debugged this a lot and it seems to me that custom applications are no longer able to access chan->cdr-> variables when Asterisk is compiled with the Abstract Jitterbuffer. When accessing chan->cdr->src for instance, it is always NULL. Accountcode is also not accessible from the app. If I recompile asterisk and uncomment AST_JB in Makefile, then the application runs exactly like it should.

Attached is the bt + the application. Crash in Additional information

There's something fishy happening in the abstract jitterbuffer


   -- Executing Set("IAX2/2-001-4", "CALLERID(number)=004799355151") in new stack
   -- Executing Set("IAX2/2-001-4", "CALLERID(ANI)=004799355151") in new stack
   -- Executing Set("IAX2/2-001-4", "CDR(accountcode)=2") in new stack
   -- Executing NoOp("IAX2/2-001-4", "004799355151") in new stack
   -- Executing mcc2("IAX2/2-001-4", "0047993551") in new stack
Sep  6 13:51:06 NOTICE[19854]: app_mcc2.c:817 mcc2_exec: Answering channel
Sep  6 13:51:06 NOTICE[19854]: app_mcc2.c:230 mcc2_ivr_authorize: app_mcc2: Date: 2006-09-06, time: 13:51:06
cd->source: b70e782c
size: 30
chan->cdr->src: 00000050
chan->accountcode: 083253d0
Minnesegmentsfeil (core dumped)
Comments:By: inspired (inspired) 2006-09-06 06:57:18

Jitterbuffer patch also uploaded. I have tested with Slav's original 1.2.6 patch on 1.2.6 too, and the outcome is the same.

By: Serge Vecher (serge-v) 2006-09-06 08:54:12

inspired: you have been told in issue 7716 that the bug-tracker is only to be used for reporting bugs in unmodified Asterisk sources, yet you persist on reporting issues that involve custom applications and unsupported backports of trunk patches. This is the last warning for -- you either read and comply with the bug guidelines and directions given by bug marshalls or your account on this bug-tracker will be terminated.