From owner-freebsd-stable@freebsd.org Sun Apr 19 13:46:30 2020 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 280052C66AC for ; Sun, 19 Apr 2020 13:46:30 +0000 (UTC) (envelope-from sthaug@nethelp.no) Received: from bizet.nethelp.no (bizet.nethelp.no [195.1.209.33]) by mx1.freebsd.org (Postfix) with ESMTP id 494rhj2fZlz4JFf for ; Sun, 19 Apr 2020 13:46:29 +0000 (UTC) (envelope-from sthaug@nethelp.no) Received: from localhost (bizet.nethelp.no [IPv6:2001:8c0:9e04:500::1]) by bizet.nethelp.no (Postfix) with ESMTP id 4B36DE6079 for ; Sun, 19 Apr 2020 15:46:27 +0200 (CEST) Date: Sun, 19 Apr 2020 15:46:27 +0200 (CEST) Message-Id: <20200419.154627.114207144.sthaug@nethelp.no> To: freebsd-stable@freebsd.org Subject: BIND 9.16.1/9.16.2 memory leak? From: sthaug@nethelp.no X-Mailer: Mew version 6.7 on Emacs 26 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 494rhj2fZlz4JFf X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of sthaug@nethelp.no designates 195.1.209.33 as permitted sender) smtp.mailfrom=sthaug@nethelp.no X-Spamd-Result: default: False [2.99 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.17)[-0.169,0]; IP_SCORE(0.24)[asn: 2116(1.22), country: NO(-0.02)]; RWL_MAILSPIKE_GOOD(0.00)[33.209.1.195.rep.mailspike.net : 127.0.0.18]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[nethelp.no]; MV_CASE(0.50)[]; RCVD_IN_DNSWL_MED(-0.20)[33.209.1.195.list.dnswl.org : 127.0.6.2]; NEURAL_SPAM_LONG(0.82)[0.821,0]; FROM_NO_DN(0.00)[]; MID_CONTAINS_FROM(1.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:2116, ipnet:195.1.0.0/16, country:NO]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Apr 2020 13:46:30 -0000 >From https://lists.isc.org/pipermail/bind-users/2020-April/102998.html > We have what appears to be a significant memory leak in BIND-9.16.1. > > Environment: > FreeBSD 12.1-STABLE. > BIND-9.16.1 installed from packages. > Also uses libuv-1.35.0 installed from packages. > Authoritative only. > Around 800 zones of varying sizes. DNSSEC in use. > > Running a ps command for the named process every minute and logging > the result, I see the named virtual memory size (VSZ) increasing at > around 1.2 Mbyte/minute, and the resident size (RSS) increasing at > around 0.85 Mbyte/minute. No problems due to this so far, but pretty > obviously it's not viable in the long run. > > I tried reading the CHANGES from 9.16.2, and didn't see anything which > suggested a fix for a memory leak problem. I now have a pcap file of queries that I can replay with the "drool" application, and I'm consistently seeing similar memory leak problems (i.e. the problems are reproducible). The memory leak rate seems to be very approximately linear with the query rate - so replaying at 10 times the original speed means we also leak around 10 times as much per minute. Upgrading to 9.16.2 (and also libuv 1.36.0) makes no difference - the same memory leak is observed. Any suggestions? Steinar Haug, Nethelp consulting, sthaug@nethelp.no