[Home]

Summary:ASTERISK-18163: DeadLock in asterisk manager interface
Reporter:Abhay Gupta (agupta)Labels:
Date Opened:2011-07-22 02:14:41Date Closed:2011-09-14 10:34:03
Priority:MajorRegression?
Status:Closed/CompleteComponents:Core/ManagerInterface
Versions:1.4.42 Frequency of
Occurrence
Frequent
Related
Issues:
Environment:Linux centos , with originate on local channels via manager interfaceAttachments:( 0) lock.txt
Description:Asterisk locks up and become non responsive .

When the manager interface is closed from where we are issuing fast_originate it start to work again .

The output of core show locks is attached
Comments:By: Abhay Gupta (agupta) 2011-07-22 02:15:45.458-0500

Output of core show locks

By: Abhay Gupta (agupta) 2011-07-22 02:38:31.515-0500

Do we have a problem in manager.c

int manager_event(int category, const char *event, const char *fmt, ...)

/* Append event to master list and wake up any sleeping sessions */
02697    AST_LIST_LOCK(&sessions);
02698    append_event(buf->str, category);
02699    AST_LIST_TRAVERSE(&sessions, s, list) {
02700       ast_mutex_lock(&s->__lock);
02701       if (s->waiting_thread != AST_PTHREADT_NULL)
02702          pthread_kill(s->waiting_thread, SIGURG);
02703       else
02704          /* We have an event to process, but the mansession is
02705           * not waiting for it. We still need to indicate that there
02706           * is an event waiting so that get_input processes the pending
02707           * event instead of polling.
02708           */
02709          s->pending_event = 1;
02710       ast_mutex_unlock(&s->__lock);
02711    }
02712    AST_LIST_UNLOCK(&sessions);

We have AST_LIST_LOCK and then again ast_mutex_lock(&s->__lock); . Is it required to take a ast_mutex_lock and AST_LIST_LOCK is already in place .


By: Leif Madsen (lmadsen) 2011-08-30 13:23:01.513-0500

Per the Asterisk maintenance timeline page at http://www.asterisk.org/asterisk-versions maintenance (bug) support for the 1.4 and 1.6.x branches has ended. For continued maintenance support please move to the 1.8 branch which is a long term support (LTS) branch. For more information about branch support, please see https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions.  After testing with Asterisk 1.8, if you find this problem has not been resolved, please open a new issue against Asterisk 1.8.



By: Leif Madsen (lmadsen) 2011-09-14 10:32:19.304-0500

Suspended due to lack of activity. Please request a bug marshal in #asterisk-bugs on the IRC network irc.freenode.net to reopen the issue should you have the additional information requested.  Further information can be found at http://www.asterisk.org/developers/bug-guidelines