[Home]

Summary:ASTERISK-13893: [patch] http Queue Actions Crash Asterisk
Reporter:Sebastian Gutierrez (sum)Labels:
Date Opened:2009-04-03 17:18:53Date Closed:2009-05-08 08:23:11
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Core/HTTP
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) malloc_debug1.txt
( 1) patchreset.patch
( 2) valgrind1.txt
Description:The system is crashing when using Http rawman QueueSummary, QueueStatus,QueueReset,QueueReload etc.
After some querys Asterisk crashes. I upload valgrind1 and malloc1.
I also notice that QueueReset doesn't reset agents data, I think that it should reset also the agent data to get consistent numbers.



****** ADDITIONAL INFORMATION ******

(gdb) bt full
#0  0x00dd3fc7 in ?? ()
No symbol table info available.
#1  0xb708a628 in ?? ()
No symbol table info available.
#2  0x00d30890 in ?? ()
No symbol table info available.
#3  0xb708a658 in ?? ()
No symbol table info available.
#4  0x080918e7 in ast_cdr_init (cdr=0xa2283a8, c=0xa225a18) at cdr.c:824
       chan = 0x1 <Address 0x1 out of bounds>
ASTERISK-1  0x080989a6 in ast_waitfor_nandfds (c=0xa2283a8, n=13087192, fds=0x0, nfds=76342532, exception=0xa1af1e4, outfd=0xb708a6e3, ms=0xb708a6f8) at channel.c:2019
       start = {tv_sec = 160, tv_usec = 160}
       pfds = (struct pollfd *) 0xb708a6f8
       res = 169858345
       rms = 13826289
       x = 5261651
       y = 825241649
       max = 2797
       sz = 170070940
       now = {tv_sec = 170034088, tv_usec = 170023448}
       whentohangup = {tv_sec = -1224169816, tv_usec = 134842790}
       diff = {tv_sec = 170034088, tv_usec = 160}
       winner = (struct ast_channel *) 0xa225a18
       fdmap = (struct fdmap *) 0xa228440
       __PRETTY_FUNCTION__ = "ast_waitfor_nandfds"
ASTERISK-2  0x08099279 in ast_waitfordigit_full (c=0xa2283a8, ms=2, audiofd=-1224160632, cmdfd=1969583473) at channel.c:2370
       rchan = (struct ast_channel *) 0x56bf34c
       outfd = 0
       __PRETTY_FUNCTION__ = "ast_waitfordigit_full"
ASTERISK-3  0x056b54cd in ?? ()
No symbol table info available.
ASTERISK-4  0x0a2283a8 in ?? ()
No symbol table info available.
ASTERISK-5  0x00000002 in ?? ()
No symbol table info available.
ASTERISK-6 0xb708ca88 in ?? ()
No symbol table info available.
ASTERISK-7 0x75657571 in ?? ()
No symbol table info available.
ASTERISK-8 0x6f6c5f65 in ?? ()
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
ASTERISK-9 0x0a230067 in ?? ()
No symbol table info available.
ASTERISK-10 0x0a234210 in ?? ()
No symbol table info available.
ASTERISK-11 0x00000000 in ?? ()
No symbol table info available.
Comments:By: Sebastian Gutierrez (sum) 2009-04-03 17:41:43

I also notice that abandon calls doesn`t affect service level, is this right? if it is, where can I find the service level calculations.

By: Mark Michelson (mmichelson) 2009-04-08 11:06:55

The valgrind output points to the error happening in the music on hold system. Specifically, it appears that there is a reference-counting error. It looks as though the reference count for an mohclass reaches 0, so the class is destroyed. The problem is that there is still a pointer to the freed memory inside the container which held this class.

As far as your question about the service level, it is only affected by completed calls, so you are correct that abandoned calls do not affect the service level. There are two calculations performed regarding service level. First, in update_queue, if a call is completed within the service level, then the count is increased by one. In queue_set_vars, we output a percentage by dividing the number of calls completed in the service level by the total number of completed calls and multiplying that value by 100. Note that the word "completed" in this case means that the calls were answered and bridged. Abandoned calls do not factor into the calculations at all.

By: Mark Michelson (mmichelson) 2009-04-08 14:01:25

Is your music on hold configured using the Realtime Interface or do you use musiconhold.conf for your music on hold configuration?

By: Sebastian Gutierrez (sum) 2009-04-08 15:32:28

I'm using realtime (not using cache because of this issue ASTERISK-1450661 )

What about reseting queue agents data?



By: Mark Michelson (mmichelson) 2009-04-08 15:51:56

Ah, realtime MOH makes a difference here. I'll try labbing that up since I was using a static config earlier.

As far as resetting queue member data goes, what data do you want to reset? The only items that make sense to me are the number of calls and the time of the last call. It wouldn't be very hard to add the enhancement you want, though.

By: Sebastian Gutierrez (sum) 2009-04-08 16:14:32

Those numbers about members on a queue they don't seem to reset, I can see that the queue numbers are reset ok, but no the numbers on the members that get with the response from ami. So you have queues that has 0 calls and members with calls.
tell me if you want more detail (like an example of ami output).

By: Sebastian Gutierrez (sum) 2009-04-09 19:05:01

after the new MOH changes this isn't crashing, sorry about the wrong diagnostic, I'll be more careful next time. regarding the enhacement is exactly as you mention, I think this would get the numbers better, I add here an example

Response: Success
Message: Queue status will follow

Event: QueueParams
Queue: Pedidos
Max: 10
Strategy: rrmemory
Calls: 0
Holdtime: 5
TalkTime: 8
Completed: 2
Abandoned: 0
ServiceLevel: 8
ServicelevelPerf: 50.0
Weight: 10

Event: QueueMember
Queue: Pedidos
Name: 1001
Location: SIP/1001
Membership: static
Penalty: 0
CallsTaken: 6
LastCall: 1239314388
Status: 1
Paused: 0

Event: QueueMember
Queue: Pedidos
Name: 1003
Location: IAX/1003
Membership: static
Penalty: 0
CallsTaken: 0
LastCall: 0
Status: 4
Paused: 0

Event: QueueStatusComplete



QueueReset


Response: Success
Message: Queue status will follow

Event: QueueParams
Queue: Pedidos
Max: 10
Strategy: rrmemory
Calls: 0
Holdtime: 0
TalkTime: 8    --> this isn't reset???
Completed: 0
Abandoned: 0
ServiceLevel: 8
ServicelevelPerf: 0.0
Weight: 10

Event: QueueMember
Queue: Pedidos
Name: 1001
Location: SIP/1001
Membership: static
Penalty: 0
CallsTaken: 6            --> this isn't reset???
LastCall: 1239314388     --> this isn't reset???
Status: 1
Paused: 0

Event: QueueMember
Queue: Pedidos
Name: 1003
Location: IAX/1003
Membership: static
Penalty: 0
CallsTaken: 0
LastCall: 0
Status: 4
Paused: 0

Event: QueueStatusComplete

By: Sebastian Gutierrez (sum) 2009-04-22 17:46:58

any comments about the reset??

By: Sebastian Gutierrez (sum) 2009-04-25 00:40:25

I attached a patch with the following:

(func clear_queue)
queue talktime reset
members statics reset

let me know if I missed something
(the patch was made against trunk)



By: Sebastian Gutierrez (sum) 2009-04-27 13:24:05

any comment?

By: Sebastian Gutierrez (sum) 2009-05-04 18:05:29

how can I help to get this commited or aproved?

By: Leif Madsen (lmadsen) 2009-05-07 12:23:53

I have assigned this issue to dvossel to see if there is anything he can do to move this issue along. Please reassign if necessary. Thanks!

By: Mark Michelson (mmichelson) 2009-05-08 08:22:34

I'm reassigning this to myself.

@sum: Sorry, I had been away and did not have a chance to check on bugs for awhile. It appears that the crash you reported here has been fixed, so I am going to close this report. Could you please open a new report with your queue patches since they are unrelated to this report? Thank you.