Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Apr 2017 23:13:25 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        Alan Somers <asomers@freebsd.org>, Gleb Smirnoff <glebius@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@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>
In-Reply-To: <20170419130428.J956@besplex.bde.org>
References:  <201704171734.v3HHYlf5022945@repo.freebsd.org> <CAOtMX2jdNj0du0ZuUKPr16iHK_YeNVzf-nDvwC-MuFM003VVAg@mail.gmail.com> <20170419130428.J956@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <glebius@freebsd.org> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170430201324.GV1622>