quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Graham Dumpleton (JIRA)" <j...@apache.org>
Subject [jira] Commented: (MODPYTHON-195) Possible leaking of Win32 event handles when Apache restarted.
Date Tue, 24 Oct 2006 11:14:17 GMT
    [ http://issues.apache.org/jira/browse/MODPYTHON-195?page=comments#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_mbox/httpd-python-dev/200610.mbox/%3c3308644A-9EE5-48BA-845F-EF3F43BB68FF@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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message