Skip to content
Snippets Groups Projects
user avatar
Mark Michelson authored
SIP transaction timeouts are handled in the PJSIP monitor thread. When
this happens on a subscription, and the subscription is destroyed, the
subscription destruction is dispatched synchronously to the threadpool.
The issue is that the PJSIP dialog is locked by the monitor thread,
and then the dispatched task attempts to lock the dialog. This leads
to a deadlock that causes SIP traffic to no longer be accepted on the
Asterisk server.

The fix here is to treat the monitor thread as if it were a threadpool
thread when it attempts to dispatch synchronous tasks. This way, the
dispatched task turns into a simple function call within the same thread,
and the locking issue is averted.

AST-2014-008

ASTERISK-23802 #close
........

Merged revisions 415794 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@415795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
e6cb6974
History
Name Last commit Last update
..
ael
ari
parking
res_pjsip
snmp
stasis
stasis_recording
Makefile
ari.make
res_adsi.c
res_ael_share.c
res_ael_share.exports.in
res_agi.c
res_agi.exports.in
res_ari.c
res_ari.exports.in
res_ari_applications.c
res_ari_asterisk.c
res_ari_bridges.c
res_ari_channels.c
res_ari_device_states.c
res_ari_endpoints.c
res_ari_events.c
res_ari_mailboxes.c
res_ari_model.c
res_ari_model.exports.in
res_ari_playbacks.c
res_ari_recordings.c
res_ari_sounds.c
res_calendar.c
res_calendar.exports.in
res_calendar_caldav.c
res_calendar_ews.c
res_calendar_exchange.c
res_calendar_icalendar.c
res_chan_stats.c
res_clialiases.c
res_clioriginate.c
res_config_curl.c
res_config_ldap.c
res_config_odbc.c
res_config_pgsql.c
res_config_sqlite.c
res_config_sqlite3.c
res_convert.c
res_corosync.c
res_crypto.c
res_crypto.exports.in
res_curl.c
res_fax.c
res_fax.exports.in
res_fax_spandsp.c
res_format_attr_celt.c
res_format_attr_h263.c
res_format_attr_h264.c
res_format_attr_opus.c
res_format_attr_silk.c
res_hep.c
res_hep.exports.in
res_hep_pjsip.c
res_http_post.c
res_http_websocket.c
res_http_websocket.exports.in
res_jabber.c
res_jabber.exports.in
res_limit.c
res_manager_devicestate.c
res_manager_presencestate.c
res_monitor.c
res_monitor.exports.in
res_musiconhold.c
res_mutestream.c
res_mwi_external.c
res_mwi_external.exports.in
res_mwi_external_ami.c
res_odbc.c
res_odbc.exports.in
res_parking.c
res_phoneprov.c
res_pjsip.c
res_pjsip.exports.in
res_pjsip_acl.c
res_pjsip_authenticator_digest.c
res_pjsip_caller_id.c
res_pjsip_diversion.c
res_pjsip_dtmf_info.c
res_pjsip_endpoint_identifier_anonymous.c
res_pjsip_endpoint_identifier_ip.c
res_pjsip_endpoint_identifier_user.c
res_pjsip_exten_state.c
res_pjsip_exten_state.exports.in
res_pjsip_header_funcs.c
res_pjsip_log_forwarder.c
res_pjsip_logger.c
res_pjsip_messaging.c
res_pjsip_multihomed.c
res_pjsip_mwi.c
res_pjsip_mwi_body_generator.c
res_pjsip_nat.c
res_pjsip_notify.c