[Home]

Summary:ASTERISK-06412: crashed under heavy load with group_count
Reporter:rchen (rchen)Labels:
Date Opened:2006-02-24 08:44:02.000-0600Date Closed:2011-06-07 14:00:50
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Functions/func_groupcount
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:extensions.conf

exten => _9088.,n,Set(GROUP(${count})=OUTBOUND_GROUP)
exten => _9088.,n,GotoIf($[${GROUP_COUNT(OUTBOUND_GROUP@${count})} > 1]?nextchannel)
exten => _9088.,n,Set(GROUP(${count})=OUTBOUND_GROUP)

gdb

#0  ast_var_name (var=0x38) at chanvars.c:68
68              if (name[0] == '_') {
(gdb) bt
#0  ast_var_name (var=0x38) at chanvars.c:68
#1  0x080872b8 in pbx_builtin_getvar_helper (chan=0xb6820120, name=0xb6a8ac20 "GROUP_47") at pbx.c:5473
#2  0x080a1cb4 in ast_app_group_get_count (group=0xb6a8ad10 "OUTBOUND_GROUP", category=0xb6a8acc0 "GROUP_47") at app.c:1067
#3  0xb7be7b40 in group_count_function_read (chan=0xb758ff50, cmd=0xb6a8bde0 "GROUP_COUNT",
   data=0xffffffff <Address 0xffffffff out of bounds>, buf=0xffffffff <Address 0xffffffff out of bounds>, len=4294967295)
   at func_groupcount.c:58
#4  0x080868b7 in ast_func_read (chan=0xffffffff, function=0xb6a8bde0 "GROUP_COUNT",
   workspace=0xffffffff <Address 0xffffffff out of bounds>, len=4294967295) at pbx.c:1239
ASTERISK-1  0x0808b835 in pbx_substitute_variables_helper_full (c=0xb758ff50, headp=0xb7590240,
   cp1=0xb6a8ee80 "${GROUP_COUNT(OUTBOUND_GROUP@${count})} > 1", cp2=0xb6a8de70 "", count=4095) at pbx.c:1375
ASTERISK-2  0x0808bae6 in pbx_substitute_variables_helper_full (c=0xb758ff50, headp=0xb7590240,
   cp1=0x89e20a8 "$[${GROUP_COUNT(OUTBOUND_GROUP@${count})} > 1]?IncCount", cp2=0xb6a940a0 "", count=8191) at pbx.c:1435
ASTERISK-3  0x0808fd1d in pbx_extension_helper (c=0xb758ff50, con=Variable "con" is not available.
) at pbx.c:1455
ASTERISK-4  0x08091296 in __ast_pbx_run (c=0xb758ff50) at pbx.c:2060
ASTERISK-5  0x08092d4c in pbx_thread (data=0xffffffff) at pbx.c:2346
ASTERISK-6 0x008cb341 in start_thread () from /lib/tls/libpthread.so.0
Comments:By: Tilghman Lesher (tilghman) 2006-02-24 12:39:04.000-0600

What SVN revision are you running?

By: rchen (rchen) 2006-02-24 12:41:52.000-0600

I am running SVN-trunk-r10989M.  tried 1.2.4 and a few other versions of svn trunk, all have the same problem.

By: Tilghman Lesher (tilghman) 2006-02-24 12:53:47.000-0600

That revision number tells me you changed something in Asterisk.  What did you change?

By: rchen (rchen) 2006-02-24 12:57:59.000-0600

nothing cause the crash, just a dirty fix to make sure asterisk return "200 OK" when OPTIONS received.


static int handle_request_options(struct sip_pvt *p, struct sip_request *req, int debug)
{
       int res;

       res = get_destination(p, req);
       build_contact(p);
       /* XXX Should we authenticate OPTIONS? XXX */
       if (ast_strlen_zero(p->context))
               ast_string_field_set(p, context, default_context);
       //if (res < 0)
       //        transmit_response_with_allow(p, "404 Not Found", req, 0);
       //else if (res > 0)
       //        transmit_response_with_allow(p, "484 Address Incomplete", req, 0);
       //else
               transmit_response_with_allow(p, "200 OK", req, 0);
       /* Destroy if this OPTIONS was the opening request, but not if
          it's in the middle of a normal call flow. */
       if (!p->lastinvite)
               ast_set_flag(p, SIP_NEEDDESTROY);

       return res;
}

By: Clod Patry (junky) 2006-04-11 23:10:29

what do you have before your first priority n?
Still an issue with current svn?

i cant duplicate this crash so far.

By: Serge Vecher (serge-v) 2006-05-02 10:55:16

second try: are you still having this issue?

By: Serge Vecher (serge-v) 2006-05-10 11:12:49

no response from the reporter. If this issue still exists in latest trunk / 1.2, please feel free to reopen with a new backtrace from unmodified, non-optimized build.

Thanks.