Commented: (MODPYTHON-195) Possible leaking of Win32 event
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Mod-Python > Commented: (MODPYTHON-195) Possible leaking of Win32 event




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Commented: (MODPYTHON-195) Possible leaking of Win32 event  
Jeff Robbins (JIRA)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
11-07-06 06:12 AM

[ http://issues.apache.org/jira/brows...244
7681 ]

Jeff Robbins commented on MODPYTHON-195:
----------------------------------------


[[ Old comment, sent from unregistered email on Tue, 24 Oct 2006 09:
13:26 -0400 ]]

Graham,

I added a printout after the call to apr_pool_user_data_get.  What I think
is happening is that the hook python_init() is called "again" in the parent
process (so data is already 1) and then called the expected 2 times in the
child process (wherein the usual protection works and the bulk of
python_init() only runs through on the second time in.  The problem is that
the parent process on windows is long-lived and is just there to spin up and
down the child process that does the real web serving.  It is the parent
process run through python_init() that needs to be defeated, and the usual
protection does no good there.

code in mod_python.c:
rc = apr_pool_userdata_get(&data, userdata_key, s->process->pool);
// JSR
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, s, "python_init:
apr_pool_userdata_get() rc=%d data=%x", rc, data);

error log fragment: (with my comments added):
[Tue Oct 24 09:04:41 2006] [notice] Parent: Received restart signal 
--
Restarting the server.
[Tue Oct 24 09:04:41 2006] [notice] Child 1952: Exit event signaled.
 Child
process is ending.
[Tue Oct 24 09:04:41 2006] [error] python_init: apr_pool_userdata_ge
t() rc=0
data=1 // this is the call in the parent process that we need to skip
[Tue Oct 24 09:04:41 2006] [notice] Parent: Created child process 96
88
[Tue Oct 24 09:04:41 2006] [error] python_init: apr_pool_userdata_ge
t() rc=0
data=0 // these are the two calls in the new child process
[Tue Oct 24 09:04:41 2006] [error] python_init: apr_pool_userdata_ge
t() rc=0
data=1
[Tue Oct 24 09:04:41 2006] [notice] mod_python: Creating 8 session m
utexes
based on 0 max processes and 50 max threads.
[Tue Oct 24 09:04:41 2006] [notice] Child 9688: Child process is run
ning
[Tue Oct 24 09:04:42 2006] [notice] Child 1952: Released the start m
utex
[Tue Oct 24 09:04:42 2006] [notice] Child 9688: Acquired the start m
utex.
[Tue Oct 24 09:04:42 2006] [notice] Child 9688: Starting 50 worker t
hreads.

Given the long-lived nature of the parent process, I'm beginning to think
that your idea of a static might be better than checking for the
environmental.

- Jeff



> 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 link
ed to mod_python.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 04:56 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register