On Thu, Aug 05, 1999, David Harris wrote:

> I think I'm seeing a memory leak in mod_ssl with versions 2.3.5-1.3.6 and
> 2.3.6-1.3.6 and 2.3.11-1.3.6.
> [...]
> Without mod_ssl (notice lack of -DSSL on the command line) Apache does not leak
> memory:
> 
> [root@hobbes 1]#  kill `cat httpd.pid`; sleep 3; httpd -f
> /var/serverctl/servers/1/httpd-bare.conf.new -DDSO; sleep 20; grep "^Vm"
> /proc/`cat httpd.pid`/status; kill -HUP `cat httpd.pid`; echo; sleep 10; grep
> "^Vm" /proc/`cat httpd.pid`/status; kill -HUP `cat httpd.pid`; echo; sleep 10;
> grep "^Vm" /proc/`cat httpd.pid`/status
> [...]
> However, when I enable mod_ssl with the -DSSL command line flag, after each
> restart the parent Apache process uses slightly more memory:
> 
> [root@hobbes 1]#  kill `cat httpd.pid`; sleep 3; httpd -f
> /var/serverctl/servers/1/httpd-bare.conf.new -DSSL -DDSO; sleep 20; grep "^Vm"
> /proc/`cat httpd.pid`/status; kill -HUP `cat httpd.pid`; echo; sleep 10; grep
> "^Vm" /proc/`cat httpd.pid`/status; kill -HUP `cat httpd.pid`; echo; sleep 10;
> grep "^Vm" /proc/`cat httpd.pid`/status
> VmSize:    50396 kB
> VmLck:         0 kB
> VmRSS:     49124 kB
> VmData:    47744 kB
> VmStk:        28 kB
> VmExe:       412 kB
> VmLib:      2080 kB
> 
> VmSize:    50396 kB
> VmLck:         0 kB
> VmRSS:     49132 kB
> VmData:    47744 kB
> VmStk:        28 kB
> VmExe:       412 kB
> VmLib:      2080 kB
> 
> VmSize:    50420 kB
> VmLck:         0 kB
> VmRSS:     49156 kB
> VmData:    47768 kB
> VmStk:        28 kB
> VmExe:       412 kB
> VmLib:      2080 kB
> [root@hobbes 1]#
> 
> Any thoughts on this?

Some weeks ago I've fixed a few memory leaks in mod_ssl and also looked over
the whole code to find more. I was not able to find more, altough I observed a
few KB of leaking memory myself, too. I guessed this memory is leaked by
OpenSSL, but a few quick peeks and pokes in the OpenSSL source which are
involved didn't show any obvious bugs. The OpenSSL team has fixed a few memory
leaks the last time, perhaps its now gone. You can test it by using the latest
OpenSSL snapshot. mod_ssl since 2.3.10 works with this, too. I'm happy
for any hints where the memory leak is located!

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to