Opened 10 years ago
Last modified 10 years ago
#17 new defect
memory leak on standard requests
Reported by: | Daniel Kahn Gillmor | Owned by: | Daniel Kahn Gillmor |
---|---|---|---|
Priority: | major | Component: | code |
Version: | 5.10 | Keywords: | needs-test leak valgrind |
Cc: |
Description
imported from mantis, dkg wrote:
Hardy Griech reported what used to be bug 2 here about a recurrent memory leak, which appears to still be a problem:
- http://lists.outoforder.cc/pipermail/modules/2011-September/000424.html
- http://lists.outoforder.cc/pipermail/modules/2012-September/000427.html
The code below makes it possible to reproduce the memory leak directly:
while printf "GET / HTTP/1.1\nHost: %s\n\n" "$(hostname -f)" | gnutls-cli 127.0.1.1 --insecure; do : ; done
This is using packages from debian testing.
Change History (3)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
benbe wrote:
Maybe have a look at it with valgrind. Make sure to install the *-dbg packages so you have debugging symbols available (the output is MUCH nicer then ;-))
Haven't tested this.
comment:3 Changed 10 years ago by
d4sh2007 wrote:
Here's some notes that hopefully will shed some light on resolving this issue.
- http://foertsch.name/ModPerl-Tricks/Measuring-memory-consumption/index.shtml
- http://apache-http-server.18135.n6.nabble.com/Finding-memory-leaks-in-httpd-and-httpd-modules-td4829792.html
- http://carbonshaft.blogspot.com/2011/09/using-valgrind-to-find-apache-httpd.html
- http://linux.die.net/man/3/gnutls_global_init
Note! This function is not thread safe. If two threads call this function simultaneously, they can cause a race between checking the global counter and incrementing it, causing both threads to execute the library initialization code. That would lead to a memory leak. To handle this, your application could invoke this function after aquiring a thread mutex. To ignore the potential memory leak is also an option.
on 2013-03-04 d4sh2007 wrote:
I can not reproduce this bug.
I am using the following shell script to execute requests
The sum of the Virtual-Memory-Size of all of apache's httpd processes does not appear to increase.
Can anyone clarify this?