[Home]

Summary:ASTERISK-16000: app_queue crashes asterisk
Reporter:David Vazquez (davido)Labels:
Date Opened:2010-04-22 11:23:33Date Closed:2010-05-12 11:11:01
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) debuglog
( 1) debuglog_1
( 2) debuglog_2
( 3) gdb_3.txt
( 4) gdb_wo_optimisations.txt
( 5) gdb.txt
( 6) gdb-with_symbols.txt
Description:If I call a queue (say, Queue(100)) and hang-up before an agent takes my call, asterisk doesn't seem to realise that I hung-up and just goes on; the call stays there, the phone(s) stay(s) ringing and if someone tries to pick up, asterisk crashes.

In syslog I see a segfault:

Apr 22 18:13:36 cross-pbx kernel: [  458.006601] asterisk[1141]: segfault at 36373148 ip 00ee3e81 sp b6f64650 error 4 in asterisk[e8a000+15e000]

Environment:
I'm running Asterisk 1.6.2.5-0ubuntu1 on Ubuntu Lucid

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

Debug info (debug: 10, verbose: 10) --

cross-pbx*CLI>

 == Using SIP RTP CoS mark 5

 == Using UDPTL CoS mark 5

   -- Executing [71910360@from_extern:1] Verbose("SIP/patton-00000002", "1,"Incoming call from "" <017660870850> to 71910360"") in new stack

"Incoming call from "" <017660870850> to 71910360"

   -- Executing [71910360@from_extern:2] Gosub("SIP/patton-00000002", "Q,s,1(100)") in new stack

   -- Executing [s@Q:1] MSet("SIP/patton-00000002", "LOCAL(queue)=100") in new stack

   -- Executing [s@Q:2] Verbose("SIP/patton-00000002", "1,"Call Centre 100"") in new stack

"Call Centre 100"

   -- Executing [s@Q:3] Playback("SIP/patton-00000002", "/opt/crosspbx/sounds/recordings/welcome-100") in new stack

   -- <SIP/patton-00000002> Playing '/opt/crosspbx/sounds/recordings/welcome-100.gsm' (language 'de')

   -- Executing [s@Q:4] Set("SIP/patton-00000002", "workingHours=true") in new stack

   -- Executing [s@Q:5] Set("SIP/patton-00000002", "agents=1") in new stack

   -- Executing [s@Q:6] GotoIf("SIP/patton-00000002", "1?7:19") in new stack

   -- Goto (Q,s,7)

   -- Executing [s@Q:7] Verbose("SIP/patton-00000002", "2,"Calling inside the working hours"") in new stack

 == "Calling inside the working hours"

   -- Executing [s@Q:8] GotoIf("SIP/patton-00000002", "0?9:12") in new stack

   -- Goto (Q,s,12)

   -- Executing [s@Q:12] Verbose("SIP/patton-00000002", "2,"Checking for free members..."") in new stack

 == "Checking for free members..."

   -- Executing [s@Q:13] Gosub("SIP/patton-00000002", "checkQueueMembers,s,1(100)") in new stack

   -- Executing [s@checkQueueMembers:1] MSet("SIP/patton-00000002", "LOCAL(queue)=100") in new stack

   -- Executing [s@checkQueueMembers:2] Verbose("SIP/patton-00000002", "1,"Check Queue Members"") in new stack

"Check Queue Members"

   -- Executing [s@checkQueueMembers:3] Set("SIP/patton-00000002", "memberList=SIP/2") in new stack

   -- Executing [s@checkQueueMembers:4] Set("SIP/patton-00000002", "memberCount=1") in new stack

   -- Executing [s@checkQueueMembers:5] Verbose("SIP/patton-00000002", "2,"1 members in queue. SIP/2"") in new stack

 == "1 members in queue. SIP/2"

   -- Executing [s@checkQueueMembers:6] Set("SIP/patton-00000002", "i=0") in new stack

   -- Executing [s@checkQueueMembers:7] MSet("SIP/patton-00000002", "x=0") in new stack

   -- Executing [s@checkQueueMembers:8] GotoIf("SIP/patton-00000002", "1?9:18") in new stack

   -- Goto (checkQueueMembers,s,9)

   -- Executing [s@checkQueueMembers:9] MSet("SIP/patton-00000002", "i=1") in new stack

   -- Executing [s@checkQueueMembers:10] Set("SIP/patton-00000002", "member=SIP/2") in new stack

   -- Executing [s@checkQueueMembers:11] Verbose("SIP/patton-00000002", "2,"Current Member: SIP/2"") in new stack

 == "Current Member: SIP/2"

   -- Executing [s@checkQueueMembers:12] GotoIf("SIP/patton-00000002", "1?13:15") in new stack

   -- Goto (checkQueueMembers,s,13)

   -- Executing [s@checkQueueMembers:13] Verbose("SIP/patton-00000002", "1,"Found a free member. Exit"") in new stack

"Found a free member. Exit"

   -- Executing [s@checkQueueMembers:14] Return("SIP/patton-00000002", "") in new stack

   -- Executing [s@Q:14] NoOp("SIP/patton-00000002", "Finish if-if-Q-13-14") in new stack

   -- Executing [s@Q:15] Verbose("SIP/patton-00000002", "1,"Stepping out of macro and continuing with queue."") in new stack

"Stepping out of macro and continuing with queue."

   -- Executing [s@Q:16] Queue("SIP/patton-00000002", "100,Ct") in new stack

   -- Started music on hold, class 'default', on SIP/patton-00000002

 == Using SIP RTP CoS mark 5

 == Using UDPTL CoS mark 5

   -- SIP/2-00000003 is ringing

   -- SIP/2-00000003 is ringing

   -- SIP/2-00000003 is ringing

   -- SIP/2-00000003 is ringing

   -- SIP/2-00000003 answered SIP/patton-00000002

   -- Stopped music on hold on SIP/patton-00000002

   -- User hung up set verbose 10

[Apr 22 17:57:04] ERROR[13643]: channel.c:2648 __ast_read: Alertpipe on channel (null) lost O_NONBLOCK?!!

cross-pbx*CLI> core set verbose 10

Disconnected from Asterisk server

Executing last minute cleanups
Comments:By: David Woolley (davidw) 2010-04-22 12:18:30

Please follow the procedures in doc/backtrace.c and/or the bug reporting guidelines.

Note, you may either need to rebuild Asterisk from source, or submit it as a Ubuntu bug report, unless Ubuntu provide a debugging version of the package, and guarantee that they have not made any local changes.



By: Paul Belanger (pabelanger) 2010-04-22 13:19:47

Davidw is correct.  You will need to download and compile Asterisk 1.6.2 directly and reproduce the issue, since the Ubuntu team includes there own custom patches.

By: Leif Madsen (lmadsen) 2010-04-26 11:45:36

Per davidw and pabelanger you will need to provide the backtrace. You will likely not be able to do this with the currently installed Ubuntu package.

I'm going to close this issue for now, but if you're able to reproduce the issue then please feel free to open a new issue. Thanks!

----

Thank you for your bug report. In order to move your issue forward, we require a backtrace from the core file produced after the crash. Please see the doc/backtrace.txt file in your Asterisk source directory.

Also, be sure you have DONT_OPTIMIZE enabled in menuselect within the Compiler Flags section, then:

make install

after enabling, reproduce the crash, and then execute the instructions in doc/backtrace.txt.

When complete, attach that file to this issue report. Thanks!

By: David Vazquez (davido) 2010-05-11 04:19:57

Sorry for the delay, I have read backtrace.txt and now I have all the information it's specified there.

By the way, I should mention that this only happens when the call comes from a Patton Smartnode.

By: Paul Belanger (pabelanger) 2010-05-11 12:09:26

You'll need to regenerate your backtrace, it looks like your symbols we not loaded.

By: David Vazquez (davido) 2010-05-12 03:13:09

Oh, sorry about that, thank you for telling me.

By: Paul Belanger (pabelanger) 2010-05-12 08:32:41

You'll now need to compile Asterisk without optimizations.  See above and docs/backtrace.txt

By: David Vazquez (davido) 2010-05-12 09:24:35

Ah, silly me, I hope this time I got it right...

By: Paul Belanger (pabelanger) 2010-05-12 10:11:56

davido:  Do you mind providing a debug log

http://svn.digium.com/svn/asterisk/trunk/doc/HOWTO_collect_debug_information.txt

I'd like to try my skill at hunting down this issue.

By: David Vazquez (davido) 2010-05-12 10:17:24

pabelanger: yep, here it is...

By: Paul Belanger (pabelanger) 2010-05-12 10:33:53

Looking at your debug log, I don't see you hanging up your phone or the crash.  Could you reproduce the complete crash in the debug log please.  If you have time jump on #asterisk-bugs on IRC.

By: David Vazquez (davido) 2010-05-12 10:39:43

The caller is who hangs up, and the call stays in the queue. So when an agent picks up, the queue crashes...

By: David Vazquez (davido) 2010-05-12 10:51:51

Please see gdb_3 and debuglog_2. Someone calls, there is an agent in the queue, the agent picks up the call (which is still there), and the queue dies.

By: Paul Belanger (pabelanger) 2010-05-12 11:10:20

Davido: Changed of plans.  Since this was fixed in 1.6.2.7, I'll close it.  As for the 2nd issue, try and reproduce it with 1.6.2.7 and open a new issue.