RE: [users@httpd] HELP .... apr_pool_t and apr_global_mutex _

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
 
I should have mentioned earlier that "init_module is actually a post_config hook" (I am a newbie as far as apache modules are concerned, thats y i missed it) 
 
yes, you are right "this would be more on-topic for the apache-modules list". I posted over there also, but this appears to be a very normal way to use shared-mutexes and I saw couple of in-built modules and they all (whatever i saw) seem to create and destroy the mutex in same way.  and then I thought If someone already has seen something like this then this mailing list might be very useful. 
 
I would like to apologize if this is completely off the track :(
 
But If anyone of you had seen this error and know some workaround then kindly help me out. I badly need to fix this issue.
 
Thanks in advance.
 
Sudhanshu

	-----Original Message----- 
	From: Nick Kew [mailto:nick@xxxxxxxxxxxx] 
	Sent: Mon 7/18/2005 10:16 PM 
	To: users@xxxxxxxxxxxxxxxx 
	Cc: 
	Subject: Re: [users@httpd] HELP .... apr_pool_t and apr_global_mutex _
	
	


	On Mon, 18 Jul 2005, Sudhanshu Prakash wrote:
	
	> Hi *,
	>
	> I am using apr_* api's in my apache module and scenario is like as
	> follows:
	>
	> 1) In init_module, I am creating one apr_global_mutex_t
	>         and registering a cleanup function which destroys the mutex.
	
	init_module?
	
	The following in a post_config hook works fine for me:
	
	  apr_global_mutex_create(&global_mutex, global_fname,
	        APR_LOCK_DEFAULT, pool) ;
	  unixd_set_global_mutex_perms(global_mutex) ;
	
	  apr_pool_cleanup_register(pool, global_mutex,
	        (void*)apr_global_mutex_destroy, apr_pool_cleanup_null) ;
	
	>
	> 2) In init_child, I am re-opening the same mutex using
	> apr_global_mutex_child_init
	
	Yep, that's right.
	
	> 3) During Graceful restart, there is a race condition between mutex
	> destruction and child-restart i.e. Mutex is destroyed first while old
	> httpd childrens are still running and throws an error "(22), Invalid
	> Argument". (This scenario is easy to replicate when http is pumped with
	> high number of http requests and simultaneously i do graceful restart)
	
	Hmmm, I haven't had that problem.  You need to tell us what hook
	you are referring to as init_module.
	
	BTW, this would be more on-topic for the apache-modules list.
	
	--
	Nick Kew
	
	
	---------------------------------------------------------------------
	The official User-To-User support forum of the Apache HTTP Server Project.
	See <URL:http://httpd.apache.org/userslist.html> for more info.
	To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
	   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
	For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
	
	


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux