[asterisk-bugs] [Asterisk 0018165]: [patch] hint state changes deadlock problem
Asterisk Bug Tracker
noreply at bugs.digium.com
Thu Nov 11 13:29:04 CST 2010
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=18165
======================================================================
Reported By: antonio
Assigned To: jpeeler
======================================================================
Project: Asterisk
Issue ID: 18165
Category: Core/PBX
Reproducibility: have not tried
Severity: major
Priority: normal
Status: assigned
Asterisk Version: 1.6.2.13
JIRA: SWP-2495
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2010-10-19 13:45 CDT
Last Modified: 2010-11-11 13:29 CST
======================================================================
Summary: [patch] hint state changes deadlock problem
Description:
What happens is there are two threads that lock resources in a different
order causing a deadlock.
The threads are:
1. from taskprocessor handle_statechange() is called. This one locks
ast_rdlock_contexts, and then eventually call cb_extensionstate() which
immediately does a sip_pvt_lock()
2. do_monitor calls sipsock_read() which calls handle_request_do() which
calls find_call(), which does a sip_pvt_lock() too. The incoming request is
a subscription, so it calls ast_get_hint(), which calls
ast_hint_extension() which calls ast_rdlock_contexts(). Deadlock.
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
has duplicate 0018205 PBX hangup
has duplicate 0018260 Asterisk stop processing any SIP request
======================================================================
----------------------------------------------------------------------
(0128789) jpeeler (administrator) - 2010-11-11 13:29
https://issues.asterisk.org/view.php?id=18165#c128789
----------------------------------------------------------------------
Yes, I actually did miss a few things and they have been corrected now. The
only one that mattered though was some bad locking in ast_add_hint. I went
ahead and also pulled in the small performance improvement for the number
of buckets too. Stefan you can either wait for my review or look at the
small differences in complete_core_show_hint, handle_show_hint, and
ast_merge_contexts_and_delete.
Issue History
Date Modified Username Field Change
======================================================================
2010-11-11 13:29 jpeeler Note Added: 0128789
======================================================================
More information about the asterisk-bugs
mailing list