Project

General

Profile

Bug #251

closed

Memory leak in 1.4.3

Added by Anonymous about 15 years ago. Updated over 13 years ago.

Status:
Fixed
Priority:
Normal
Category:
core
Target version:
-
ASK QUESTIONS IN Forums:

Description

Attached will be a valgrind log of lighttpd 1.4.3 memory leanking on a server.
BTW, there is no 1.4.3 version to choose from in trac (yet).

-- matthias


Files

lighttpd.pid26823.gz (2.6 KB) lighttpd.pid26823.gz valgrind output (following the instructions given to track down memleaks) -- matthias Anonymous, 2005-09-05 16:35
#1

Updated by jan about 15 years ago

  • Status changed from New to Assigned

Please replace hashme() in stat_cache.c with this function and check if it solves the problem for you.


static uint32_t hashme(buffer *str) {
        uint32_t hash = 0;
        const char *s;
        for (s = str->ptr; *s; s++) {
                hash = hash * 53 + *s;
        }

        hash &= ~(1 << 31); /* strip the highest bit */

        return hash;
}
#2

Updated by Anonymous about 15 years ago

Forgot to set my email in the previous note...

-- bgs

#3

Updated by Anonymous about 15 years ago

There is quite a bit of improvement. But on a server which is getting 700 req/s the memory used increased very quickly to about 30MB, has now mostly stabilised, but still keeps growing by about 100k every few seconds. Still, much, much better.

-- matthias

#4

Updated by jan about 15 years ago

  • Status changed from Assigned to Fixed
  • Resolution set to fixed

fixed in r702

Also available in: Atom