[Asterisk-Dev] Unlocking the unlocked...
Guillermo Winkler
gwinkler at inconcertcc.com
Tue Jun 28 15:12:50 MST 2005
Hi,
Under the following scenario:
6000 outgoing calls/hour(SIP-->ZAP)
75% connected (25% is busy or no answer)
100% of connected calls beign recorded, when LINK event occurs.
P4 2.8 HT.
Krnl 2.4.21
We are having some "Avoid deadlock" issues(This is not happening without
recording)
As you can see in channel_walk_locked
if (retries < 10)
ast_log(LOG_DEBUG, "Avoiding initial deadlock for '%s'\n", l->name);
else
ast_log(LOG_WARNING, "Avoided initial deadlock for '%s', %d
retries!\n", l->name, retries);
ast_mutex_unlock(&chlock);
Ten 1ms retries are done to avoid deadlocks. But when recording is enabled,
the channel gets locked on start:
if (ast_monitor_start(c, format, fname, 1)) {
if (ast_monitor_change_fname(c, fname, 1)) {
Those ten retries are not enough in that case, using lock instead of
try_lock, or increasing the number of retries, solves the problem
temporarily.
I wanted to know if someone else is experimenting something similar?
I think ast_channel_walk_locked and ast_get_channel_by_name_locked could be
rewritten or a new set of functions be added , faster and more reliable (now
you don't know if the channel you're looking for is not there at all or a
deadlock(not so dead) issue on ANOTHER channel was the failure).
If you feel the same I would be glad to help.
Regards,
Guillermo
More information about the asterisk-dev
mailing list