From owner-freebsd-stable@freebsd.org Mon Feb 4 07:37:10 2019 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D004814C1D9E for ; Mon, 4 Feb 2019 07:37:10 +0000 (UTC) (envelope-from sthaug@nethelp.no) Received: from bizet.nethelp.no (bizet.nethelp.no [IPv6:2001:8c0:9e04:500::1]) by mx1.freebsd.org (Postfix) with ESMTP id 20AD871B09 for ; Mon, 4 Feb 2019 07:37:10 +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 6D86BE6079 for ; Mon, 4 Feb 2019 08:37:00 +0100 (CET) Date: Mon, 04 Feb 2019 08:37:00 +0100 (CET) Message-Id: <20190204.083700.93851595.sthaug@nethelp.no> To: freebsd-stable@freebsd.org Subject: 64-bit integer overflow computing user cpu time in calcru() in kern_resource.c 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-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: Mon, 04 Feb 2019 07:37:11 -0000 Hi, We use FreeBSD 11.2-STABLE for 5 recursive name servers, with PowerDNS recursor as the actual name server software. I recently complained on the pdns-users list that some graphs based on information from the name server process stopped working after a while (typically a week or less): https://mailman.powerdns.com/pipermail/pdns-users/2019-January/025739.html Bert Hubert of PowerDNS led me to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227689 and it definitely looks like this is the bug causing the disappearing graphs that I see. In https://mailman.powerdns.com/pipermail/pdns-users/2019-January/025742.html you can see the effect on the getrusage() call - in short, the values simply stop incrementing after a while. I fixed the problem by following the link from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227689 to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=76972 which has an attachment (kern_resource.c.patch.txt) at https://bz-attachments.freebsd.org/attachment.cgi?id=50537 After adding this patch and rebooting, the problem has not recoccurred in nearly two weeks. I'm reasonably sure that the problem really has been fixed. I checked the code at the same place in HEAD, from https://svnweb.freebsd.org/base/head/sys/kern/kern_resource.c?view=markup and the bug appears to still be present in HEAD. So, I'd love it if somebody could - Update bugs 76972 and 227689 to note that this affects more than one person. - Fix this in HEAD and hopefully also MFC to 11.2-STABLE. Steinar Haug, Nethelp consulting, sthaug@nethelp.no