Apache Mod-Python - Commented: (MODPYTHON-195) Possible leaking of Win32 event

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > October 2006 > Commented: (MODPYTHON-195) Possible leaking of Win32 event





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Commented: (MODPYTHON-195) Possible leaking of Win32 event
Graham Dumpleton (JIRA)

2006-10-24, 7:12 am

[ http://issues.apache.org/jira/brows...action_12444283 ]

Graham Dumpleton commented on MODPYTHON-195:
--------------------------------------------

But python_init() uses:

apr_pool_userdata_get(&data, userdata_key, s->process->pool);
if (!data) {
apr_pool_userdata_set((const void *)1, userdata_key,
apr_pool_cleanup_null, s->process->pool);
return OK;
}

This is apparently a standard trick used to get around fact that post_config_hook functions are called twice. For example, from mod_auth_digest.c in Apache source code:

/* initialize_module() will be called twice, and if it's a DSO
* then all static data from the first call will be lost. Only
* set up our static data on the second call. */
apr_pool_userdata_get(&data, userdata_key, s->process->pool);
if (!data) {
apr_pool_userdata_set((const void *)1, userdata_key,
apr_pool_cleanup_null, s->process->pool);
return OK;
}

Thus, although it does get called twice, wouldn't expect it to get down to the mutex creation as above should stop it.

Jeff, can you do further debugging to track what happens with access to userdata above on each call and whether it does in fact stop subsequent code from executing the first time through and post any results against this issue in JIRA.

> Possible leaking of Win32 event handles when Apache restarted.
> --------------------------------------------------------------
>
> Key: MODPYTHON-195
> URL: http://issues.apache.org/jira/browse/MODPYTHON-195
> Project: mod_python
> Issue Type: Bug
> Components: core
> Affects Versions: 3.2.10
> Reporter: Graham Dumpleton
>
> Jeff Robins in:
> http://mail-archives.apache.org/mod...dscpl.com.au%3e
> indicates a belief that when an Apache restart is performed on Windows that there are a number of Win32 event handles leaked. His belief is that this seems to be linked to mod_python.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com