>Number:         3937
>Category:       general
>Synopsis:       Design issues concerning shared memory.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Feb 22 04:10:00 PST 1999
>Last-Modified:
>Originator:     [EMAIL PROTECTED]
>Organization:
apache
>Release:        1.3.4
>Environment:
Linux kerberos.alcyonis.fr 2.0.35 #18 Fri Sep 4 16:19:31 GMT 1998 i586 unknown
>Description:
I've just completed a rewrite of the mod_throttle.c code for Apache 1.3.x that
allows throttling based on virtual servers.  This module requires the use of
shared memory in order to properly keep track of the number of bytes_sent for
a virtual server. 

Now there is no pool management for shared memory, that I can see.  Also there
doesn't not appear to be any module handler called when parent server 
terminates,
which would permit the proper release of shared memory.

As a result, shared memory resources appear to "leak" in that they are consumed
and never released when ever the server is stopped and/or restarted.  User 
intervention is then required to issue an "ipcrm" command.

I believe this is a design-flaw in the module handler structure, lack a 
server termination handler; however, as I've just learned new skills for
this project (how to write an Apache module and use of shared memory) it
may be a covered by some Apache API and/or a fault in my understanding.

>How-To-Repeat:
I can make available my new mod_throttle.c source.
>Fix:
Add another handler entry to the module structure that is called when the
parent server process terminates.

OR

Add some new pool management functions for shared memory that would allow 
Apache to properly handle the resources.
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <[EMAIL PROTECTED]> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]



Reply via email to