BIND 9.16 (named) :: Possible Memory Leak ?!

I'm running the following version:
BIND 9.16.13 (Stable Release) <id:072e758>
running on FreeBSD amd64 12.2-RELEASE-p4 FreeBSD 12.2-RELEASE-p4 GENERIC

Since this version 9.16.x is running on my server the process memory blows up to 52 GB (TOP: SIZE/RES column) of memory. Some configuration options to limit the cache memory fails but now I have used the option "-M" with the value "external". After the named process was restarted the memory is pinned at 125 MB of memory. Have anybody the same issue? My nameserver is NOT under heavy load.

Code:
Here the part of "named" manual:
-M option
              This option sets the default memory context options. If set to
              "external", the internal memory manager is bypassed in favor of
              system-provided memory allocation functions. If set to "fill",
              blocks of memory are filled with tag values when allocated or
              freed, to assist debugging of memory problems. nofill disables
              this behavior, and is the default unless named has been compiled
              with developer options.
 
That rings bells. I had serious memory bloat issues since a couple of recent versions of bind.

My issue came from greatly expanded zone statistics, and has to be workarounded with zone-statistics terse;
 
Code:
Mar 22 18:01:04 shadow pkg-static[82675]: bind916-9.16.12 deinstalled
Mar 22 18:01:10 shadow pkg-static[82874]: bind916-9.16.13 installed

PID USERNAME    THR PRI NICE   SIZE    RES  STATE    C   TIME    WCPU COMMAND
82951 bind        14    52    0       188M   152M sigwai      0   1:20       0.00% named

ps -ax | grep named
82951  -  Is        1:20.64 /usr/local/sbin/named -u bind -c /usr/local/etc/namedb/named.conf

grep named /etc/rc.conf
named_enable="YES"

Doesn't seem any different to me,
 
I'm seeing this issue as well on an authoritative nameserver with only a few small zones. I'm not using it for recursion, I have an unbound instance running for that.

After only four days of uptime top reported the RES size as 10G. I've added zone-statistics terse but what should I look at if that doesn't solve it?
 
That rings bells. I had serious memory bloat issues since a couple of recent versions of bind.

My issue came from greatly expanded zone statistics, and has to be workarounded with zone-statistics terse;
I made this change on two systems almost two weeks ago so far it has solved the issue for me.
 
I have the same problem with named 9.16.13, used as recursive resolver. Not seen on non-recursive servers. It was fixed by adding

Code:
named_flags="-M external"

to /etc/rc.conf. Playing with zone-statistics did not help.

Interesting this only occurs on 12-stable. It doesn't occur on 11-stable, identical config and usage.
 
Back
Top