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 <gleb...@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. _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"