[Home]

Summary:ASTERISK-10774: [patch] Deadlock in find_session(unsigned long ident)
Reporter:Yuri (ys)Labels:
Date Opened:2007-11-15 05:36:19.000-0600Date Closed:2011-06-07 14:08:14
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/ManagerInterface
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) manager.c.diff
Description:
Missed ast_mutex_unlock(&s->__lock); before exit AST_LIST_TRAVERSE(&sessions, s, list) at break; point.

Found in 1.4 branch, 1.4.13 and trunk.

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

[Nov 15 14:32:12] ERROR[6031]: /usr/home/asterisk/src/asterisk/include/asterisk/lock.h:342 __ast_pthread_mutex_lock: manager.c line 2785 (find_session): '&s->__lock' was locked here.
[Nov 15 14:32:12] ERROR[6031]: /usr/home/asterisk/src/asterisk/include/asterisk/lock.h:338 __ast_pthread_mutex_lock: manager.c line 2785 (find_session): Deadlock? waited 5 sec for mutex '&s->__lock'?
[Nov 15 14:32:12] ERROR[6031]: /usr/home/asterisk/src/asterisk/include/asterisk/lock.h:342 __ast_pthread_mutex_lock: manager.c line 2785 (find_session): '&s->__lock' was locked here.
Comments:By: Eliel Sardanons (eliel) 2007-11-15 08:52:12.000-0600

ys: I think there is a missing ast_mutex_unlock() there because find_session() not only finds the session, also locks the returned session.

By: Yuri (ys) 2007-11-15 11:49:53.000-0600

Yes, You right, this is my workspace issue...
ASTERISK-1090961

Please close this issue.

By: Jason Parker (jparker) 2007-11-15 12:00:13.000-0600

Closing per reporter.