At Tue, 2 Dec 2008 00:35:32 -0500,
Vinny Abello <[EMAIL PROTECTED]> wrote:

>       For what it's worth, I just want to contribute that I can
>       confirm this behavior on my systems as well. On BIND 9.5.0-P2,

>From an off-list discussion, I found there was indeed memory leak in
the code of 9.5.0-P2 (so I was wrong in suspecting it might be the
FreeBSD thread library).

Can you try the patched copied below to see whether it solves the
problem?

Note: this leak was already fixed in 9.5.1rc1:

2435.   [bug]           Fixed an ACL memory leak affecting win32.

while the change description seems to indicate it's win32 specific,
it can actually happen any build with threads and without atomic
operations.

---
JINMEI, Tatuya
Internet Systems Consortium, Inc.

Index: acl.c
===================================================================
RCS file: /proj/cvs/prod/bind9/lib/dns/acl.c,v
retrieving revision 1.37.2.7
diff -u -r1.37.2.7 acl.c
--- acl.c       29 Apr 2008 01:04:14 -0000      1.37.2.7
+++ acl.c       1 Dec 2008 03:17:36 -0000
@@ -217,6 +217,7 @@
 
        /* Search radix. */
        result = isc_radix_search(acl->iptable->radix, &node, &pfx);
+       isc_refcount_destroy(&pfx.refcount);
 
        /* Found a match. */
        if (result == ISC_R_SUCCESS && node != NULL) {
Index: iptable.c
===================================================================
RCS file: /proj/cvs/prod/bind9/lib/dns/iptable.c,v
retrieving revision 1.5.46.3
diff -u -r1.5.46.3 iptable.c
--- iptable.c   21 Jan 2008 21:02:24 -0000      1.5.46.3
+++ iptable.c   1 Dec 2008 19:25:27 -0000
@@ -74,6 +74,7 @@
        family = bitlen ? pfx.family : AF_INET;
 
        result = isc_radix_insert(tab->radix, &node, NULL, &pfx);
+       isc_refcount_destroy(&pfx.refcount);
 
        if (result != ISC_R_SUCCESS)
                return(result);
_______________________________________________
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Reply via email to