From owner-svn-src-head@freebsd.org Sun Apr 30 20:13:31 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EABB0D57B85; Sun, 30 Apr 2017 20:13:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90F22D2; Sun, 30 Apr 2017 20:13:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v3UKDP6n046704 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 30 Apr 2017 23:13:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v3UKDP6n046704 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v3UKDPZO046703; Sun, 30 Apr 2017 23:13:25 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 30 Apr 2017 23:13:25 +0300 From: Konstantin Belousov To: Bruce Evans Cc: Alan Somers , Gleb Smirnoff , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r317061 - in head: libexec/rpc.rstatd sys/amd64/amd64 sys/amd64/include sys/arm/arm sys/arm/include sys/arm64/include sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/compat/linprocfs... Message-ID: <20170430201324.GV1622@kib.kiev.ua> References: <201704171734.v3HHYlf5022945@repo.freebsd.org> <20170419130428.J956@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170419130428.J956@besplex.bde.org> User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Apr 2017 20:13:32 -0000 On Wed, Apr 19, 2017 at 02:09:58PM +1000, Bruce Evans wrote: > On Tue, 18 Apr 2017, Alan Somers wrote: > > > On Mon, Apr 17, 2017 at 11:34 AM, Gleb Smirnoff wrote: > > >> head/usr.bin/top/machine.c > >> head/usr.bin/vmstat/vmstat.c > > The previous 2 lines turn out to be relevant. I missed the update to > vmstat and checked a wrong version in my bug report described below > I checked an updated top, but the change seemed too small to help. > systat was not updated. > > > This change broke backwards compatibility with old top binaries. When > > I use a kernel at version 317094 but a top from 14-April, I get the > > error "top: sysctl(vm.stats.vm.v_swappgsin...) failed: Cannot allocate > > memory". I get the same error when running top from an 11.0-RELEASE > > jail. Can you please add backward compatibility shims? > > I sent a much longer (30 times longer) bug report to the author of the > bug. > > Most or all statistics utilities that use vmmeter are broken. vmstat > is too broken to even notice the bug -- it silently ignores the error, > an has type errors which prevent other errors which it doesn't ignore. > The result is silently truncating to 32 bits, like a quick fix would > do intentionally. systat -v detects the errors but prints warning > messages to the status line where they overwrite each other so make > the problem look smaller than it is. The result is unsilently > truncating to 32 bits. > > I've never seen any backwards compatibility shims added for sysctls. > None should be needed, but there are few or no utilities other than > sysctl(8) which use sysctl(3) in a portable way. See vfs.bufspace handled by vfs_bio.c:sysctl_bufspace(). In fact, not only top and vmstat are broken. Quite unexpected and worrying, reboot(8) is broken as well. This is due to get_pageins() failing and system stopping userspace much earlier than it is desirable. I now believe that compat shims to handle int-sized vmstat queries are required.