Re: top: sysctl(vfs.bufspace...) expected 8, got 4

2018-02-22 Thread Mateusz Guzik
On Thu, Feb 22, 2018 at 8:34 PM, O. Hartmann  wrote:

> Mateusz provided me with this patch, which solved the issue:
>
> Index: sys/kern/vfs_bio.c
> ===
> --- sys/kern/vfs_bio.c  (revision 329832)
> +++ sys/kern/vfs_bio.c  (working copy)
> @@ -423,7 +423,7 @@
> lvalue = 0;
> for (i = 0; i < clean_domains; i++)
> lvalue += bdclean[i].bd_bufspace;
> -   return (sysctl_handle_int(oidp, , 0, req));
> +   return (sysctl_handle_long(oidp, , 0, req));
>  }
>  #endif


Thanks for testing, committed in r329837.


-- 
Mateusz Guzik 
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: top: sysctl(vfs.bufspace...) expected 8, got 4

2018-02-22 Thread O. Hartmann
Am Thu, 22 Feb 2018 19:56:26 +0100
"O. Hartmann" <ohartm...@walstatt.org> schrieb:

> Am Thu, 22 Feb 2018 10:53:46 -0700
> Ian Lepore <i...@freebsd.org> schrieb:
> 
> > On Thu, 2018-02-22 at 18:41 +0100, O. Hartmann wrote:  
> > > Am Wed, 21 Feb 2018 20:05:24 +0100
> > > "O. Hartmann" <o.hartm...@walstatt.org> schrieb:
> > > 
> > > > 
> > > > On CURRENT ( 12.0-CURRENT FreeBSD 12.0-CURRENT #196 r329679: Tue
> > > > Feb 20 23:06:15 CET
> > > > 2018 amd64) I'm honored by this nice bug when calling top:
> > > > 
> > > > top: sysctl(vfs.bufspace...) expected 8, got 4
> > > > 
> > > > 
> > > > Regards,
> > > > 
> > > > oh
> > > I still can not use "top", it quits with the error mentioned above.
> > > Whats is wrong with
> > > my setup?
> > > 
> > 
> > It seems like the two big candidates must be mismatch between kernel
> > and userland, or maybe 32/64-bit mismatch between the kernel and top.
> > 
> > What's the output of
> > 
> >   uname -pmUK  
> amd64 amd64 1200058 1200058
> 
> >   file `which top`  
> /usr/bin/top: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), 
> dynamically
> linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 12.0 (1200058), 
> FreeBSD-style,
> stripped
> >   ldd `which top`  
> /usr/bin/top:
> libncursesw.so.8 => /lib/libncursesw.so.8 (0x800258000)
> libm.so.5 => /lib/libm.so.5 (0x8002bd000)
> libkvm.so.7 => /lib/libkvm.so.7 (0x8002ed000)
> libjail.so.1 => /lib/libjail.so.1 (0x80030)
> libc.so.7 => /lib/libc.so.7 (0x800309000)
> libelf.so.2 => /lib/libelf.so.2 (0x800712000)
> > 
> > -- Ian
> >   
> 
> ... so ...
> 
> @ Mateusz Guzik: I missed your patch - didn't apply clean, was rejected and I
> accidentally build a "usual" kernel. Will try again. 
> 
> At revision 329831, the target line in question is at line 414, not 423 as of 
> your patch
> (old source?).
> 

Stupid me ... 

The patch, Mateusz provided, worked! My sight is some kinf of "bend", so I 
missed the
correct line.

Mateusz provided me with this patch, which solved the issue:

Index: sys/kern/vfs_bio.c
===
--- sys/kern/vfs_bio.c  (revision 329832)
+++ sys/kern/vfs_bio.c  (working copy)
@@ -423,7 +423,7 @@
lvalue = 0;
for (i = 0; i < clean_domains; i++)
lvalue += bdclean[i].bd_bufspace;
-   return (sysctl_handle_int(oidp, , 0, req));
+   return (sysctl_handle_long(oidp, , 0, req));
 }
 #endif


-- 
O. Hartmann

Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).


pgpi_MwxbTXpK.pgp
Description: OpenPGP digital signature


Re: top: sysctl(vfs.bufspace...) expected 8, got 4

2018-02-22 Thread O. Hartmann
Am Thu, 22 Feb 2018 10:53:46 -0700
Ian Lepore <i...@freebsd.org> schrieb:

> On Thu, 2018-02-22 at 18:41 +0100, O. Hartmann wrote:
> > Am Wed, 21 Feb 2018 20:05:24 +0100
> > "O. Hartmann" <o.hartm...@walstatt.org> schrieb:
> >   
> > > 
> > > On CURRENT ( 12.0-CURRENT FreeBSD 12.0-CURRENT #196 r329679: Tue
> > > Feb 20 23:06:15 CET
> > > 2018 amd64) I'm honored by this nice bug when calling top:
> > > 
> > > top: sysctl(vfs.bufspace...) expected 8, got 4
> > > 
> > > 
> > > Regards,
> > > 
> > > oh  
> > I still can not use "top", it quits with the error mentioned above.
> > Whats is wrong with
> > my setup?
> >   
> 
> It seems like the two big candidates must be mismatch between kernel
> and userland, or maybe 32/64-bit mismatch between the kernel and top.
> 
> What's the output of
> 
>   uname -pmUK
amd64 amd64 1200058 1200058

>   file `which top`
/usr/bin/top: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), 
dynamically linked,
interpreter /libexec/ld-elf.so.1, for FreeBSD 12.0 (1200058), FreeBSD-style, 
stripped
>   ldd `which top`
/usr/bin/top:
libncursesw.so.8 => /lib/libncursesw.so.8 (0x800258000)
libm.so.5 => /lib/libm.so.5 (0x8002bd000)
libkvm.so.7 => /lib/libkvm.so.7 (0x8002ed000)
libjail.so.1 => /lib/libjail.so.1 (0x80030)
libc.so.7 => /lib/libc.so.7 (0x800309000)
libelf.so.2 => /lib/libelf.so.2 (0x800712000)
> 
> -- Ian
> 

... so ...

@ Mateusz Guzik: I missed your patch - didn't apply clean, was rejected and I
accidentally build a "usual" kernel. Will try again. 

At revision 329831, the target line in question is at line 414, not 423 as of 
your patch
(old source?).

-- 
O. Hartmann

Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).


pgpZisRXFpEvJ.pgp
Description: OpenPGP digital signature


Re: top: sysctl(vfs.bufspace...) expected 8, got 4

2018-02-22 Thread Ian Lepore
On Thu, 2018-02-22 at 18:41 +0100, O. Hartmann wrote:
> Am Wed, 21 Feb 2018 20:05:24 +0100
> "O. Hartmann" <o.hartm...@walstatt.org> schrieb:
> 
> > 
> > On CURRENT ( 12.0-CURRENT FreeBSD 12.0-CURRENT #196 r329679: Tue
> > Feb 20 23:06:15 CET
> > 2018 amd64) I'm honored by this nice bug when calling top:
> > 
> > top: sysctl(vfs.bufspace...) expected 8, got 4
> > 
> > 
> > Regards,
> > 
> > oh
> I still can not use "top", it quits with the error mentioned above.
> Whats is wrong with
> my setup?
> 

It seems like the two big candidates must be mismatch between kernel
and userland, or maybe 32/64-bit mismatch between the kernel and top.

What's the output of

  uname -pmUK
  file `which top`
  ldd `which top`

-- Ian

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: top: sysctl(vfs.bufspace...) expected 8, got 4

2018-02-22 Thread Mateusz Guzik
On Thu, Feb 22, 2018 at 6:41 PM, O. Hartmann <ohartm...@walstatt.org> wrote:

> Am Wed, 21 Feb 2018 20:05:24 +0100
> "O. Hartmann" <o.hartm...@walstatt.org> schrieb:
>
> > On CURRENT ( 12.0-CURRENT FreeBSD 12.0-CURRENT #196 r329679: Tue Feb 20
> 23:06:15 CET
> > 2018 amd64) I'm honored by this nice bug when calling top:
> >
> > top: sysctl(vfs.bufspace...) expected 8, got 4
> >
> >
> > Regards,
> >
> > oh
>
> I still can not use "top", it quits with the error mentioned above. Whats
> is wrong with
> my setup?
>
>
Looks like a fallout from r329612.

Try this, untested:

 diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index a2a1736a24f4..7cb6aa15ddc5 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -423,7 +423,7 @@ sysctl_bufspace(SYSCTL_HANDLER_ARGS)
lvalue = 0;
for (i = 0; i < clean_domains; i++)
lvalue += bdclean[i].bd_bufspace;
-   return (sysctl_handle_int(oidp, , 0, req));
+   return (sysctl_handle_long(oidp, , 0, req));
 }
 #endif
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: top: sysctl(vfs.bufspace...) expected 8, got 4

2018-02-22 Thread O. Hartmann
Am Wed, 21 Feb 2018 20:05:24 +0100
"O. Hartmann" <o.hartm...@walstatt.org> schrieb:

> On CURRENT ( 12.0-CURRENT FreeBSD 12.0-CURRENT #196 r329679: Tue Feb 20 
> 23:06:15 CET
> 2018 amd64) I'm honored by this nice bug when calling top:
> 
> top: sysctl(vfs.bufspace...) expected 8, got 4
> 
> 
> Regards,
> 
> oh

I still can not use "top", it quits with the error mentioned above. Whats is 
wrong with
my setup?

-- 
O. Hartmann

Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).


pgpElXx3PU815.pgp
Description: OpenPGP digital signature


top: sysctl(vfs.bufspace...) expected 8, got 4

2018-02-21 Thread O. Hartmann
On CURRENT ( 12.0-CURRENT FreeBSD 12.0-CURRENT #196 r329679: Tue Feb 20 
23:06:15 CET 2018
 amd64) I'm honored by this nice bug when calling top:

top: sysctl(vfs.bufspace...) expected 8, got 4


Regards,

oh
-- 
O. Hartmann

Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).


pgpGq73wGLtKr.pgp
Description: OpenPGP digital signature