[Home]

Summary:ASTERISK-06108: chan_sip.c deadlock?
Reporter:Kenneth Holm (saitech)Labels:
Date Opened:2006-01-17 07:55:48.000-0600Date Closed:2011-06-07 14:10:30
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) siplock.diff
Description:chan_sip.c[xxx]: Failed to grab lock... Trying againg."

This error keeps coming in my debug log. I have looked in the source, and it seems to happen while to instances of asterisk tries to lock the same sip messsage. Only one instance is capable of doing so, so the otrher retries infinite amount of times, until the first instance has unlocked the message.

I have tried to make a patch for chan_sip.c to avoid this retrylock to looping into a deadlock, so i have limited it for maximum 5 retries, and then it destroys the sip peer.

it seems to work, but i got some hangs, that i cant recognice. I'm still testing on this.

Could anyone help me out, in this issue, is the patch usable, or is it just some  lazy shit?

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

I have posted this error a couple of times, and i have tried to solve it by myself, due to lack of interest on this issue.

Further i can add, that i have tried to use ODBC Realtime indstead of MySQL Realtime, this seemed to work for some time, but i was wrong. Under some load, the problem pops up again. This solution seems only to delay the problem, and makes it harder to reproduce. But it still occurs.
Comments:By: Serge Vecher (serge-v) 2006-01-17 08:03:01.000-0600

saitech: what bug # have you reported this under? This will help to reference those notes...

By: Kenneth Holm (saitech) 2006-01-17 10:06:11.000-0600

Its poster with id 6181, see this link.

http://bugs.digium.com/view.php?id=6181

By: Kenneth Holm (saitech) 2006-01-19 17:04:19.000-0600

After some thoughts, im actually beginning to suspekt the MySQL server to this problem.

How does asterisk react, if there are some delay on a SQL retrievel for the dialplan?

Im only getting the error while using a realtime module.

Today, i have sat up a new asterisk server, for internal telephony, so its not very loaded. Its running on the standalone db, with small tables, so now 10K lines  diaplans. I have'nt seen the error on this server, and i cant really reproduce it.

By: Olle Johansson (oej) 2006-01-30 04:39:36.000-0600

Try adding caching to cdr.conf. With that, cdr logging to mysql will happen in a separate thread. Please try that and report your findings here. THanks!

/O

By: Kevin P. Fleming (kpfleming) 2006-02-14 14:30:05.000-0600

Suspended due to lack of response. If this is still an issue for you and you can reproduce it, please request the bug to be reopened and provide details on how to reproduce it.