Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 04 Jul 2014 19:19:20 +0200
From:      Hans Petter Selasky <hps@selasky.org>
To:        David Wolfskill <david@catwhisker.org>, stable@freebsd.org
Subject:   Re: r268244 (stable/9) seems to break "sysctl hw.ncpu"
Message-ID:  <53B6E218.5070009@selasky.org>
In-Reply-To: <20140704123901.GR6056@albert.catwhisker.org>
References:  <20140704123901.GR6056@albert.catwhisker.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 07/04/14 14:39, David Wolfskill wrote:
> After building & installing @r268208 (yesterday), "sysctl hw.ncpu"
> reports a number (e.g., "2" for my laptop).
>
> After building & installing @r268244 (today)...
>
> freebeast(9.3-P)[5] sysctl hw.ncpu | hd
> 00000000  68 77 2e 6e 63 70 75 3a  20 0a                    |hw.ncpu: .|
> 0000000a
> freebeast(9.3-P)[6]
>
> After reverting r268244, then "cd /usr/src/sbin/sysctl && make && make
> install":
>
> g1-252(9.3-P)[8] sysctl hw.ncpu | hd
> 00000000  68 77 2e 6e 63 70 75 3a  20 32 0a                 |hw.ncpu:
> 2.|
> 0000000b
> g1-252(9.3-P)[9]
>
>
> I note that I also track stable/10 and head (on different slices;
> daily) on the machine; haven't seen similar behavior in either
> environment.
>
> Note that it is not uncommon for certain ports builds to expect to get a
> number from "sysctl -n hw.ncpu", and when that doesn't happen, the ports
> builds tend to stop working.

Hi,

I cannot reproduce this. Using the same kernel and running sysctl from. 
My patch to 9-stable will not affect printing of integers. 9-stable and 
10-stable and current "sysctl" code all gives the same result over here 
with 9-stable kernel:

sysctl -n hw.ncpu | hd
00000000  32 0a                                             |2.|

sysctl hw.ncpu | hd
00000000  68 77 2e 6e 63 70 75 3a  20 32 0a                 |hw.ncpu: 2.|

Can you tell me exactly what kernel version you are using, "uname -a" 
and which version of "sysctl" with which version of the kernel is 
failing, so that I can reproduce.

Thank you!

--HPS



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