Avoiding deadlock

Home » Asterisk Users » Avoiding deadlock
Asterisk Users 6 Comments

For some reason we are seeing “Avoiding deadlock for channel” in our
Asterisk logs, the logs are getting filled up with an amazing speed around
12000 lines a second, and all of them are “Avoiding deadlock”. What could be
the potential reason for this to be happening? The Asterisk is used as auto
dialler, therefore different channel types are involved SIP, DAHDI, Local’s.

[Nov 15 14:20:01] DEBUG[21740] channel.c: Avoiding deadlock for channel
‘0x9f17c88’
[Nov 15 14:20:01] DEBUG[21740] channel.c: Avoiding deadlock for channel
‘0x9f17c88’
[Nov 15 14:20:01] DEBUG[21740] channel.c: Avoiding deadlock for channel
‘0x9f17c88’
[Nov 15 14:20:01] DEBUG[21740] channel.c: Avoiding deadlock for channel
‘0x9f17c88’
[Nov 15 14:20:01] DEBUG[21740] channel.c: Avoiding deadlock for channel
‘0x9f17c88’
[Nov 15 14:20:01] DEBUG[21740] channel.c: Avoiding deadlock for channel
‘0x9f17c88’
[Nov 15 14:20:01] DEBUG[21740] channel.c: Avoiding deadlock for channel
‘0x9f17c88’
[Nov 15 14:20:01] DEBUG[21740] channel.c: Avoiding deadlock for channel
‘0x9f17c88’
[Nov 15 14:20:01] DEBUG[21740] channel.c: Avoiding deadlock for channel
‘0x9f17c88’
[Nov 15 14:20:01] DEBUG[21740] channel.c: Avoiding deadlock for channel
‘0x9f17c88’
[Nov 15 14:20:01] DEBUG[21740] channel.c: Avoiding deadlock for channel
‘0x9f17c88’
[Nov 15 14:20:01] DEBUG[21740] channel.c: Avoiding deadlock for channel
‘0x9f17c88’
[Nov 15 14:20:01] DEBUG[21740] channel.c: Avoiding deadlock for channel
‘0x9f17c88’

Asterisk: 1.4.33.1
DAHDI: dahdi-2.3.0.1-3

Regards,
Vilius.

6 thoughts on - Avoiding deadlock

  • You can safely ignore these messages, if you are not trying to fix a broader
    problem. Generally speaking, any messages that are at a DEBUG level are
    considered to be okay to ignore, unless you’re working on tracking down a
    specific problem, in which case they may be helpful in determining a
    problem; however, they do not, in themselves, indicate any problem.

  • On Tue, 16 Nov 2010 14:08:45 +0000
    Vilius Adamkavicius wrote:

    Turn off debugging.

    On the asterisk CLI, run this command:

    core set debug 0

    Also, check the command line in your init script, or however you run
    asterisk, and if there is a -d option, remove it. Otherwise, debugging
    will come back on next time you restart asterisk.

  • Hi Chad,

    Thanks for your suggestions.

    However I believe decreasing logging, its just like closing your eyes and
    ignoring what happening behind you, the problem is still there. Also
    decreased logging will prevent from troubleshooting any other problems in
    the future.

    Would you happen to know any potential causes for this message?

    Regards,
    Vilius.

  • On Wed, Nov 17, 2010 at 9:56 AM, Vilius Adamkavicius <

    href=”mailto:vilius.adamkavicius@invade.net”>vilius.adamkavicius@invade.net> wrote:

    The problem is you were just told by a Digium engineer who knows the code
    from many years back that is a debug message and there is nothing to worry
    about and you insist in believing this is a problem.

    If you want to know what the message means and why you should not worry you
    must understand what a lock is, what lock contention is and what a deadlock
    is.

    Moises Silva
    Senior Software Engineer
    Sangoma Technologies Inc. | 100 Renfrew Drive, Suite 100, Markham ON L3R 9R6
    Canada
    t. 1 905 474 1990 x128 | e.
    href=”mailto:moy@sangoma.com”>moy@sangoma.com

  • Hi Moises,

    Thanks for your opinion.

    However I still wouldn’t want to agree that reducing debug logging is a
    solution. Let me explain why, we are driving Asterisk using AMI and verbose
    logging is simply not enough to investigate issues that arises with our
    software or Asterisk itself. Also we are getting valuable information from
    the debug logs in order to verify activities in our own logs. Printing
    Avoiding deadlock message 12000 times in the logs makes system less
    efficient and causes performance degradation due to massive I/O activity.
    Would you say this should be ignored too?

    I’m not implying that Avoiding deadlock is the problem here, maybe its
    Asterisk debug logging?

    Regards,
    Vilius.

    href=”mailto:vilius.adamkavicius@invade.net”>vilius.adamkavicius@invade.net> wrote:
    href=”mailto:moy@sangoma.com”>moy@sangoma.com

  • The problem is that you’re unwilling to deal with the verbosity that debug
    logging provides. Either you deal with it, or you turn it off. Those are
    your options. Of, you can edit the source and remove any debug messages
    that you find offensive. You DO have the source, after all.