[asterisk-users] Fwd: Re: Asterisk CLI unresponsive

Jonas Kellens jonas.kellens at telenet.be
Mon Feb 6 04:45:35 CST 2012


Hello,

is there anyone that can give me some more information on these 
"deadlocks" ?!

How can these deadlocks occur and what is "good practise" to avoid these 
problems ??


Jonas.



-------- Original Message --------
Subject: 	Re: [asterisk-users] Asterisk CLI unresponsive
Date: 	Fri, 03 Feb 2012 16:43:35 +0100
From: 	Jonas Kellens <jonas.kellens at telenet.be>
Reply-To: 	Asterisk Users Mailing List - Non-Commercial Discussion 
<asterisk-users at lists.digium.com>
To: 	Asterisk Users Mailing List - Non-Commercial Discussion 
<asterisk-users at lists.digium.com>



On 02/03/2012 04:32 PM, Paul Belanger wrote:
> On 12-02-03 09:53 AM, Jonas Kellens wrote:
>> On 02/03/2012 03:48 PM, Paul Belanger wrote:
>>> On 12-02-03 09:05 AM, Jonas Kellens wrote:
>>>> On 02/03/2012 02:52 PM, Paul Belanger wrote:
>>>>> On 12-02-03 07:55 AM, Jonas Kellens wrote:
>>>>>> This is a production server. Will it affect theserver ?I already 
>>>>>> have
>>>>>> "dont_optimize" checked in the debug options.
>>>>>>
>>>>> Yes, reproduce the issue on your test infrastructure. then generate a
>>>>> backtrace [1].
>>>>>
>>>>> [1] https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace
>>>>>
>>>>
>>>> How can I reproduce when I don't know what causes the "deadlock" ??
>>>>
>>>> That is part of my question : what can have caused this "deadlock" ?
>>>> I can go on for weeks without any problem, and then suddenly there's
>>>> what appears to be a "deadlock".
>>>>
>>> That's what the backtrace will tell us. If you already have
>>> DONT_OPTIMIZED compiled on your production server, then attach gdb to
>>> the process and generate the backtrace.
>>
>> I can not reproduce a problem which I don't know what causes it.
>>
>> These seems like the chicken and the egg.
>>
>> There is no core-file generated. It's just the CLI that freezes, not a
>> restart of Asterisk.
>>
> You don't need a core-file for a deadlock, you are confusing it was a 
> crash.
>
> Regardless, my previous comment was not complete.  There is nothing 
> you can do until you recompile and enable DEBUG_THREADS (information 
> available from the previous wiki link). And yes, this will cause a 
> performance hit to your system,

But in general, are there no general causes to a "deadlock" or the 
Asterisk-CLI that freezes ??

I read on the wiki :
/A program is in deadlock when it is in a state where one or more of its 
components are waiting on something they will never get. I don't now the 
internal structure of Asterisk but I believe it is multi-threaded. A 
simple example of a deadlock is if a thread A were waiting on a resource 
that thread B has locked, and thread B is waiting for something thread A 
has locked./

But I see no such information in my verbose/messages/debug-logfiles

Can I create a deadlock with bad programming in the dialplan ?? I have 
already replaced all macro's with GoSub where possible.

There were 36 calls... Only 15% CPU (8 cores) and Asterisk uses about 
750000Kb of memory (4 GB available).


Jonas.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120206/df512acf/attachment.htm>


More information about the asterisk-users mailing list