[asterisk-bugs] [JIRA] (ASTERISK-27006) app_queue: Crash when hanging up with realtime queues
Niklas Larsson (JIRA)
noreply at issues.asterisk.org
Tue Aug 29 02:57:09 CDT 2017
[ https://issues.asterisk.org/jira/browse/ASTERISK-27006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=238279#comment-238279 ]
Niklas Larsson commented on ASTERISK-27006:
-------------------------------------------
I can now reproduce it - and changed the patch to:
{noformat}
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -6255,13 +6255,16 @@ static void handle_hangup(void *userdata, struct stasis_subscription *sub,
ast_debug(3, "Detected hangup of queue %s channel %s\n", reason == CALLER ? "caller" : "member",
channel_blob->snapshot->name);
- ast_queue_log(queue_data->queue->name, caller_snapshot->uniqueid, queue_data->member->membername,
+ ast_queue_log(queue_data->queue->name, queue_data->caller_uniqueid, queue_data->member->membername,
reason == CALLER ? "COMPLETECALLER" : "COMPLETEAGENT", "%ld|%ld|%d",
(long) (queue_data->starttime - queue_data->holdstart),
(long) (time(NULL) - queue_data->starttime), queue_data->caller_pos);
- send_agent_complete(queue_data->queue->name, caller_snapshot, member_snapshot, queue_data->member,
+ if(caller_snapshot){
+ send_agent_complete(queue_data->queue->name, caller_snapshot, member_snapshot, queue_data->member,
queue_data->holdstart, queue_data->starttime, reason);
+ }
+
update_queue(queue_data->queue, queue_data->member, queue_data->callcompletedinsl,
queue_data->starttime);
remove_stasis_subscriptions(queue_data);
{noformat}
I will miss the AMI event AgentComplete - but asterisk is not segfaulting and not leaving any channels around.
The bug must be in ast_channel_snapshot_get_latest and missing data in Stasis Message Bus API cache.
> app_queue: Crash when hanging up with realtime queues
> -----------------------------------------------------
>
> Key: ASTERISK-27006
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-27006
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Applications/app_queue
> Affects Versions: 13.15.0, 14.6.0
> Environment: Debian 8, Asterisk 13.15 (13.14 did not present issue)
> Reporter: Niklas Larsson
> Attachments: backtrace_core.uc02.nguc.weblink.se-2017-05-17T08-02-12+0200.txt, backtrace_core.uc02.nguc.weblink.se-2017-05-17T13-38-19+0200.txt, backtrace_core.uc02.nguc.weblink.se-2017-05-23T13-31-52+0200.txt, backtrace_core.uc02.nguc.weblink.se-2017-05-26T09-10-53+0200.txt, backtrace_core.uc02.nguc.weblink.se-2017-05-30T16-04-54+0200.txt, C-00000345.txt, log.txt, queue_4.txt
>
>
> Segfault in at hangup:
> [2017-05-17 08:02:12] VERBOSE[12389][C-000003ea] bridge_channel.c: Channel PJSIP/ngcore-00000cd3 left 'simple_bridge' basic-bridge <098609d0-4ae7-47e3-980b-06a3b24f3014>
> Happens around ones a day.
> Running asterisk 13 branch, commit ddbc68b (Thu May 11 10:49:04 2017)
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list