]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip: Move URI validation to use time. 69/1469/1
authorJoshua Colp <jcolp@digium.com>
Wed, 21 Oct 2015 16:44:17 +0000 (13:44 -0300)
committerJoshua Colp <jcolp@digium.com>
Wed, 21 Oct 2015 17:26:53 +0000 (14:26 -0300)
commitf2725c8b77f6e6d6b70c12c4e57e26083530c3be
tree297a90b54666d8d04b35ed48937a8fcb475cb7f4
parent7c560a9a31ce93ae35ac80ca7f098929fbc5c6d5
res_pjsip: Move URI validation to use time.

In a realtime based system with a limited number of threadpool threads
it is possible for a deadlock to occur. This happens when permanent
endpoint state is updated, which will cause database queries to be done.
These queries may result in URI validation being done which is done
synchronously using a PJSIP thread. If all PJSIP threads are in use
processing traffic they themselves may be blocked waiting to get the
permanent endpoint container lock when identifying an endpoint.

This change moves URI validation to occur at use time instead of
configuration time. While this comes at a cost of not seeing a problem
until you use it it does solve the underlying deadlock problem.

ASTERISK-25486 #close

Change-Id: I2d7d167af987d23b3e8199e4a68f3359eba4c76a
include/asterisk/res_pjsip.h
res/res_pjsip.c
res/res_pjsip/location.c
res/res_pjsip/pjsip_configuration.c