squid-1782

Version:

2.5

Bug link:

http://bugs.squid-cache.org/show_bug.cgi?id=1782

Symptom:

memory leak on ncsa_auth process up to 300M per month.

How is this diagnosed?

We did not reproduce it but relied on analyzing the code and discussions.

Root cause:

Squid basically forgot to free the memory on a path. N


Index: helpers/basic_auth/NCSA/ncsa_auth.c
===================================================================
RCS file: /cvsroot/squid/squid/helpers/basic_auth/NCSA/ncsa_auth.c,v
retrieving revision 1.4.8.4
diff -u -p -r1.4.8.4 ncsa_auth.c
--- helpers/basic_auth/NCSA/ncsa_auth.c 22 Sep 2006 07:31:58 -0000      1.4.8.4
+++ helpers/basic_auth/NCSA/ncsa_auth.c 27 Sep 2006 18:44:58 -0000
@@ -73,6 +73,7 @@ read_passwd_file(const char *passwdfile)
    char *passwd;
    if (hash != NULL) {
       hashFreeItems(hash, my_free);
+       hashFreeMemory(hash);
    }
    /* initial setup */
    hash = hash_create((HASHCMP *) strcmp, 7921, hash_string);

Failure type:

memory leak

Is there Error Message?

No

Can Errlog anticipate with a msg?

Yes. We can use Errlog-AG to adaptively sample the resource usage.