Sean Bright 5c1ea3ebbd 
	
	
	astobj2: Prevent potential deadlocks with ao2_global_obj_release ... 
			The ao2_global_obj_release() function holds an exclusive lock on the
global object while it is being dereferenced. Any destructors that
run during this time that call ao2_global_obj_ref() will deadlock
because a read lock is required.
Instead, we make the global object inaccessible inside of the write
lock and only dereference it once we have released the lock. This
allows the affected destructors to fail gracefully.
While this doesn't completely solve the referenced issue (the error
message about not being able to create an IQ continues to be shown)
it does solve the backtrace spew that accompanied it.
ASTERISK-21009 #close
Reported by: Marcello Ceschia
Change-Id: Idf40ae136b5070dba22cb576ea8414fbc9939385 
		
	 
		2017-03-30 13:59:11 -04:00 
	 
	
	
	
		 
	
	
		
			
			
			
			
			
			2016-06-07 09:32:11 +02:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-03-01 09:30:43 -07:00 
		 
	
		
			
			
			
			
			
			2017-01-17 17:08:53 -06:00 
		 
	
		
			
			
			
			
			
			2016-12-22 12:25:15 -06:00 
		 
	
		
			
			
			
			
			
			2014-05-09 22:49:26 +00:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-01-24 14:05:05 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-03-22 15:43:33 -05:00 
		 
	
		
			
			
			
			
			
			2014-04-23 15:02:39 +00:00 
		 
	
		
			
			
			
			
			
			2016-05-03 07:56:18 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-13 11:33:15 -05:00 
		 
	
		
			
			
			
			
			
			2015-04-27 18:37:26 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2015-04-27 18:37:26 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-03-30 13:59:11 -04:00 
		 
	
		
			
			
			
			
			
			2017-03-20 13:01:52 -06:00 
		 
	
		
			
			
			
			
			
			2017-03-15 17:18:55 -06:00 
		 
	
		
			
			
			
			
			
			2017-02-02 13:02:03 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-11-04 15:50:41 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-23 10:34:58 -07:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-13 11:33:15 -05:00 
		 
	
		
			
			
			
			
			
			2017-03-22 07:49:51 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-03-27 19:54:44 +00:00 
		 
	
		
			
			
			
			
			
			2017-03-27 19:54:44 +00:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-22 14:32:23 +00:00 
		 
	
		
			
			
			
			
			
			2016-11-16 14:56:18 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-03-27 19:54:44 +00:00 
		 
	
		
			
			
			
			
			
			2016-11-20 09:19:18 +11:00 
		 
	
		
			
			
			
			
			
			2016-11-20 09:19:18 +11:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-11-20 09:19:18 +11:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2015-04-10 13:32:24 +00:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-11-20 09:19:18 +11:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-20 09:53:24 +11:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-11-15 21:21:59 -05:00 
		 
	
		
			
			
			
			
			
			2017-01-17 17:08:53 -06:00 
		 
	
		
			
			
			
			
			
			2017-01-17 17:08:53 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-13 07:49:25 -07:00 
		 
	
		
			
			
			
			
			
			2017-01-25 13:46:41 -06:00 
		 
	
		
			
			
			
			
			
			2016-11-06 15:56:58 +01:00 
		 
	
		
			
			
			
			
			
			2017-02-24 10:20:33 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-03-20 08:55:05 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-03 10:28:14 +02:00 
		 
	
		
			
			
			
			
			
			2017-01-17 17:08:53 -06:00 
		 
	
		
			
			
			
			
			
			2016-11-14 13:51:56 -05:00 
		 
	
		
			
			
			
			
			
			2017-01-24 11:25:19 -06:00 
		 
	
		
			
			
			
			
			
			2017-02-03 10:28:14 +02:00 
		 
	
		
	
		
			
			
			
			
			
			2017-03-27 10:36:08 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-03-27 10:36:08 -04:00 
		 
	
		
			
			
			
			
			
			2016-11-14 17:03:09 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-31 14:46:54 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-03-20 08:55:05 -04:00 
		 
	
		
			
			
			
			
			
			2015-04-17 15:58:07 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-03-08 17:26:41 -06:00 
		 
	
		
			
			
			
			
			
			2014-07-20 22:06:33 +00:00 
		 
	
		
			
			
			
			
			
			2017-03-21 08:45:37 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-11-01 11:48:06 +02:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-13 11:33:15 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-02-13 11:33:15 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-07-21 13:58:26 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-03-14 17:09:53 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-03-22 15:43:33 -05:00 
		 
	
		
			
			
			
			
			
			2017-03-06 15:59:49 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-03-14 12:26:32 -06:00 
		 
	
		
			
			
			
			
			
			2017-03-14 12:26:32 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-03-14 12:26:32 -06:00 
		 
	
		
			
			
			
			
			
			2017-03-14 12:26:32 -06:00 
		 
	
		
			
			
			
			
			
			2017-03-14 12:26:32 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
	
		
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2015-03-26 22:24:26 +00:00 
		 
	
		
			
			
			
			
			
			2017-02-07 12:13:23 -06:00 
		 
	
		
			
			
			
			
			
			2016-11-14 17:03:09 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-03-14 08:40:54 -06:00 
		 
	
		
			
			
			
			
			
			2017-02-03 16:42:52 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2013-01-19 20:54:07 +00:00 
		 
	
		
			
			
			
			
			
			2017-03-14 12:26:32 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-01-23 10:25:58 -07:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-01-13 21:36:54 -06:00 
		 
	
		
			
			
			
			
			
			2017-02-17 17:00:24 -06:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-07-13 11:47:56 -05:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2017-01-23 13:25:31 +01:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2014-08-21 14:42:12 +00:00 
		 
	
		
			
			
			
			
			
			2016-11-30 14:18:05 -05:00 
		 
	
		
			
			
			
			
			
			2014-12-17 10:23:32 +00:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00 
		 
	
		
			
			
			
			
			
			2016-10-27 09:53:55 -04:00