my Asterisk is hanging up from time to time - sometimes it works for hours, sometimes ten minutes.
It simple stops reacting on incoming and outgoing calls, the CLI does not log anything, sip show peers works until some reload (dialplan reload for example) takes place, after that, the CLI does not execute any command.
Make sure that you are running the latest version.
Make sure that it is compiled with no optimisation and with lock debugging enabled.
The next time it stalls, atempt to start a new CLI process and run “core show locks”.
Then use gcore to get a core dump.
Create backtraces as described in doc/backtrace.txt.
Search issues.asterisk.org to see if there is a known bug that matches the details of yours.
Otherwise, create a new issue on issues.asterisk.org, attaching the information obtained above, and providing any clues as to what you were doing at the time, or what may be unusual about your configuration, trying to find a subject that better describes the circumstances, possibly using the core show locks output as a guide.
Originally I used an AsteriskNow installation, but when the need for core debugging came up, I decided to compile my own * (from the latest 1.6 branch) and install it last night.
Today the deadlock happened again when I was at the customers site.
They’d have killed me literally if I’d started to debug the * while they can’t use the phone, but at least I captured a core show locks.
I dare to post this longish dump here, maybe one of you with more experience than me have an idea where the problem might be. Actually, it happened twice, and both dumps looked the same (same locks, but in different order).
The locking cannot be reproduced by any means I know of, sometimes it happens twice within one hour, sometimes it does not occur within two days of heave usage.
=======================================================================
=== Currently Held Locks ==============================================