www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralf Liebenow <ralf.liebe...@gmx.de>
Subject mod_jserv/5390: Memory-Leak in logging-Function
Date Mon, 29 Nov 1999 20:55:32 GMT

>Number:         5390
>Category:       mod_jserv
>Synopsis:       Memory-Leak in logging-Function
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    jserv
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Nov 29 14:10:00 PST 1999
>Last-Modified:
>Originator:     ralf.liebenow@gmx.de
>Organization:
apache
>Release:        1.1b3
>Environment:
Linux 2.2 glibc 2.1 apache 1.3.9
>Description:
There is a memory-leak in the logging function that takes up memory each
time message logging is called with a level that is lower than the configured
logging level (so the message is not logged in mod_jserv.log). When I setup
DEBUG-Level, all messages are logged, and no memory leaks.

Where is it: src/c/jserv_utils.c function jserv_error_var() 
There p=ap_make_sub_pool(NULL); is called, and after that when the level is
not high enough the function just returns without freeing the Memorypool with
ap_destroy_pool(p); When the message is actually logged, all is okay,
ap_destroy_pool(p); is called then.

I found this, because gjpv12_open is very frequently called and trys to log
a DEBUG message (I compiled with JSERV_DEBUG). Is this right ? When I set 
loglevel notice I got a 51 Megabyte httpd after one night ...
>How-To-Repeat:

>Fix:
See above .. just free the pool before return ...
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <apbugs@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or      ]
["Re: general/1098:").  If the subject doesn't match this       ]
[pattern, your message will be misfiled and ignored.  The       ]
["apbugs" address is not added to the Cc line of messages from  ]
[the database 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!     ]




Mime
View raw message