[Home]

Summary:ASTERISK-09752: [patch] core show channels command from manager causes seg fault
Reporter:Andrew Pepler (pep)Labels:
Date Opened:2007-06-25 10:11:17Date Closed:2007-06-28 23:40:00
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Core/ManagerInterface
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20070627__bug10055.diff.txt
( 1) asterisk-1.4.5-manager.patch
( 2) dialplan.txt
( 3) ManagerOutput.txt
( 4) output.txt
Description:I have a script running every minute that sends the "core show channels" command to Asterisk.  Roughly once a day it causes Asterisk to crash.
Possibly connected to this is that very occasionally when I use the "core show channels" command from the console it just keeps outputting data showing hundreds of local channels open.  When I exit the console and connect again everything is normal again. (This does not result in a crash).
Comments:By: Andrew Pepler (pep) 2007-06-25 11:32:47

There is a file mentioned in the bt full output which I have now uploaded.  It is the output of the "core show channels" command and it is showing the same call multiple times.

By: Tilghman Lesher (tilghman) 2007-06-25 14:36:57

This patch should solve the crash, but we still need to figure out why you're getting duplicate channels.

By: Andrew Pepler (pep) 2007-06-25 15:50:46

OK, I have applied the patch.  Is there any more information you need from me?

By: Tilghman Lesher (tilghman) 2007-06-25 16:59:18

Well, we still need to figure out what you're doing that is causing these duplicate channels.  What hardware are you using that is Zap/3 and how are you
using the hardware (i.e. dialplan)?

By: Andrew Pepler (pep) 2007-06-26 09:35:10

I am making a call using a call file to a local channel.  This then dials a number over ZAP.  Once this call is connected a macro is called which then dials a second number.  Again when this 2nd number has been connected another macro is called.
I have attached a cut down version of the dialplan.

By: Marcus Hunger (fnordian) 2007-06-27 07:26:14

We also see this problem quite regularly with asterisk 1.4.5. Although I have no idea why the channel list is looping (filesizes are hundreds of megabytes, no "%d active channel%s\n" suffix) I would suggest to test for successfull allocation of memory instead of switching from alloca to ast_calloc.

By: Tilghman Lesher (tilghman) 2007-06-27 07:39:12

fnordian:  alloca() currently does not permit failure detection, so that suggestion is right out.

By: Tilghman Lesher (tilghman) 2007-06-27 07:47:57

However, you're right that we should be checking return values, so I've uploaded a new patch.

By: Marcus Hunger (fnordian) 2007-06-27 08:28:19

Good point. I should have read the manual.



By: Tilghman Lesher (tilghman) 2007-06-28 23:40:00

Fixed in 72556, merged in 72557.