Deadlock from Trixbox?

Please tell me. Sometimes the logs Trixbox appears like this:

[Oct 15 14:51:04] ERROR[20896] /usr/src/redhat/BUILD/asterisk16-1.6.0.26/include/asterisk/lock.h: chan_sip.c line 20825 (restart_monitor): Deadlock? waited 5 sec for mutex '&monlock'?
[Oct 15 14:51:04] ERROR[20896] /usr/src/redhat/BUILD/asterisk16-1.6.0.26/include/asterisk/lock.h: chan_sip.c line 20806 (do_monitor): '&monlock' was locked here.
[Oct 15 14:51:09] ERROR[20896] /usr/src/redhat/BUILD/asterisk16-1.6.0.26/include/asterisk/lock.h: chan_sip.c line 20825 (restart_monitor): Deadlock? waited 10 sec for mutex '&monlock'?



If the dial command:


/usr/sbin/asterisk -rx "core show locks"


We can see the following:

=======================================================================
=== Currently Held Locks ======================= 1381832881.644731 ====
=======================================================================
=== 
=== <file> <line num> <function> <lock name> <lock addr>
=== <locked at>, <failed at>, <held for> (attempts, times locked)
===
=== Thread ID: 34868112 (do_monitor started at [20836] chan_sip.c restart_monitor())
=== ---> Lock #0 (chan_sip.c): MUTEX 20806 do_monitor &monlock 0x5defc20
=== 1381832782.15513, 1381832779.92700, 99.629218 (1, 52039)
=== -------------------------------------------------------------------
===
=== Thread ID: 36318096 (pbx_thread started at [4006] pbx.c ast_pbx_start())
=== ---> Waiting for Lock #0 (chan_sip.c): MUTEX 20825 restart_monitor &monlock 0x5defc20
=== 1381832786.889034, 1381832786.786326, 94.755697 (1, 4263)
=== --- ---> Locked Here: chan_sip.c line 20806 (do_monitor)
=== -------------------------------------------------------------------
===
=== Thread ID: 77179792 (pbx_thread started at [4006] pbx.c ast_pbx_start())
=== ---> Waiting for Lock #0 (chan_sip.c): MUTEX 20825 restart_monitor &monlock 0x5defc20
=== 1381832786.965409, 1381832786.964463, 94.679322 (1, 821)
=== --- ---> Locked Here: chan_sip.c line 20806 (do_monitor)
=== -------------------------------------------------------------------
===
=======================================================================</held></failed></locked></lock></lock></function></line></file>



All registrations fall off and the problem is solved only by rebooting the server.

How to deal with it?
October 3rd 19 at 03:24
3 answers
October 3rd 19 at 03:26
Solution
Most likely, the problem occurs in the moments when the lag of the DNS.
Thank you.
There is a possibility that I can help some caching DNS
habrahabr.ru/post/159013/
? - Shania_Farrell57 commented on October 3rd 19 at 03:29
Very likely. They usually do so. - rosamond commented on October 3rd 19 at 03:32
October 3rd 19 at 03:28
to start with the update of asterisk. By the way TrixBox is a dead product already. If you still want something like the FreePBX distro.
Thanks for the reply.
I would like to first fix without these global changes, and then to deal with upgrades or transitions to other products. - Shania_Farrell57 commented on October 3rd 19 at 03:31
October 3rd 19 at 03:30
Good afternoon.
Here's a similar problem, but you have not described the version of asterisk. issues.asterisk.org/jira/browse/ASTERISK-17436

In any case, be joined and the previous response, I have also started with the upgrade of asterisk, it's easier than digging through the source code outdated version of Astera and look for bugs there, of which Astaire has always been not enough.

UPD:
In dogonku
asterisk-support.ru/question/41897/perestali-registrirovatsia-tranki/
www.google.com.cy/search?q=Deadlock%3F+waited+10+sec+for+mutex+'%26monlock'&oq=Deadlock%3F+waited+10+sec+for+mutex+'%26monlock'&aqs=chrome.0.69i57j69i58.258j0&sourceid=chrome&ie=UTF-8
Thanks for the reply.
It remains to understand will not clemants whether Trixbox in this update. - Shania_Farrell57 commented on October 3rd 19 at 03:33

Find more questions by tags Asterisk