Files
asterisk/main
Alexei Gradinari ecad35e147 pjsip: Fix deadlock with suspend taskprocessor on masquerade
If both channels which should be masqueraded
are in the same serializer:
1st channel will be locked waiting condition 'complete'
2nd channel will be locked waiting condition 'suspended'

On heavy load system a chance that both channels will be in
the same serializer 'pjsip/distibutor' is very high.

To reproduce compile res_pjsip/pjsip_distributor.c with
DISTRIBUTOR_POOL_SIZE=1

Steps to reproduce:
1. Party A calls Party B (bridged call 'AB')
2. Party B places Party A on hold
3. Party B calls Voicemail app (non-bridged call 'BV')
4. Party B attended transfers Party A to voicemail using REFER.
5. When asterisk masquerades calls 'AB' and 'BV',
   a deadlock is happened.

This patch adds a suspension indicator to the taskprocessor.
When a session suspends/unsuspends the serializer
it sets the indicator to the appropriate state.
The session checks the suspension indicator before
suspend the serializer.

ASTERISK-26145 #close

Change-Id: Iaaebee60013a58c942ba47b1b4930a63e686663b
2016-08-10 15:14:56 -05:00
..
2016-08-03 16:41:04 -04:00
2016-08-03 16:41:04 -04:00
2016-06-08 20:37:08 +03:00
2016-07-22 03:11:47 -05:00
2016-06-22 12:23:44 -05:00
2015-06-10 18:06:15 -05:00
2016-06-02 22:57:49 +03:00
2016-07-14 15:59:49 -05:00
2016-04-08 13:52:02 -05:00
2015-06-08 09:44:04 -05:00
2016-06-22 12:23:44 -05:00
2016-06-08 20:37:08 +03:00