freebsd-update not updating kernel?

160 views
Skip to first unread message

Matthew Pounsett

unread,
Sep 7, 2016, 8:38:54 AM9/7/16
to freebsd-...@freebsd.org
It looks to me from what I'm pasting below as if there is a kernel out
there somewhere for 9.3-RELEASE-p45, but freebsd-update is unable/unwilling
to fetch it. I've also got Virtualbox segfaulting, which frequently
happens to me mid-upgrade when there's a kernel/package mismatch.

Does anyone have an explanation for what's happening here?

% uname -a
FreeBSD localhost 9.3-RELEASE-p43 FreeBSD 9.3-RELEASE-p43 #0: Sat May 28
00:19:32 UTC 2016
ro...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
amd64

% sudo freebsd-update -F fetch install
Looking up update.FreeBSD.org mirrors... 4 mirrors found.
Fetching metadata signature for 9.3-RELEASE from update6.freebsd.org...
done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

No updates needed to update system to 9.3-RELEASE-p45.
No updates are available to install.
Run '/usr/sbin/freebsd-update fetch' first.

% sudo pkg install -f lsof
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be REINSTALLED:
lsof-4.90.e,8

Number of packages to be reinstalled: 1

111 KiB to be downloaded.

Proceed with this action? [y/N]: y
Fetching lsof-4.90.e,8.txz: 100% 111 KiB 113.9kB/s 00:01
Checking integrity... done (0 conflicting)
[1/1] Reinstalling lsof-4.90.e,8...
[1/1] Extracting lsof-4.90.e,8: 100%

% lsof >/dev/null
lsof: WARNING: compiled for FreeBSD release 9.3-RELEASE-p45; this is
9.3-RELEASE-p43.
_______________________________________________
freebsd-...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questi...@freebsd.org"

Patrick Hess

unread,
Sep 11, 2016, 2:47:45 PM9/11/16
to freebsd-...@freebsd.org
On 07.09.2016 14:38, Matthew Pounsett wrote:
> It looks to me from what I'm pasting below as if there is a kernel out
> there somewhere for 9.3-RELEASE-p45

There's no -p45 kernel, as both -p44 and -p45 were only affecting
the userland.

> % lsof >/dev/null
> lsof: WARNING: compiled for FreeBSD release 9.3-RELEASE-p45; this is
> 9.3-RELEASE-p43.

Seems like lsof is not aware of the difference between kernel and
userland patch levels and ends up checking for the wrong one.

Patrick

--
If you'd like to send me a private message, make sure to remove
the "_lists" part from my address.

twilight

unread,
Sep 11, 2016, 10:37:36 PM9/11/16
to Matthew Pounsett, freebsd-...@freebsd.org
> It looks to me from what I'm pasting below as if there is a kernel out
> there somewhere for 9.3-RELEASE-p45, but freebsd-update is
unable/unwilling
> to fetch it. I've also got Virtualbox segfaulting, which frequently
> happens to me mid-upgrade when there's a kernel/package mismatch.
>
> Does anyone have an explanation for what's happening here?
>
> % uname -a
> FreeBSD localhost 9.3-RELEASE-p43 FreeBSD 9.3-RELEASE-p43 #0: Sat May 28
> 00:19:32 UTC 2016
> ro...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
> amd64

Consider checking freebsd-version(1) output as:

> The following options are available:
> -k Print the version and patch level of the installed kernel.
> Unlike uname(1), if a new kernel has been installed but the system
has not yet rebooted, freebsd-version will print the version and patch
level of the new kernel.

And as you get from this quote, the following:

> % lsof >/dev/null
> lsof: WARNING: compiled for FreeBSD release 9.3-RELEASE-p45; this is
> 9.3-RELEASE-p43.

might occur if you forgot to reboot.

Yeah, it's a stupid advice and you've probably rebooted, but just in case.
--
Cheers~

PGP key fingerprint:
07B3 2177 3E27 BF41 DC65 CC95 BDA8 88F1 E9F9 CEEF

You can retrieve my public key at pgp.mit.edu.

Ian Jefferson

unread,
Sep 22, 2016, 6:41:05 AM9/22/16
to freebsd-...@freebsd.org
I was having a similar issue with freebsd-update not being aware (able?) to patch up to 9.3-RELEASE-p45.

I am continually getting messages from freebsd-update cron like this:

******************************************************************************


Looking up update.FreeBSD.org mirrors... 4 mirrors found.
Fetching metadata signature for 9.3-RELEASE from update6.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

The following files will be removed as part of updating to 9.3-RELEASE-p45:
********************************************************************************

I can run freebsd-update fetch and install all day long with reboots and uname still reports 9.3-RELEASE-p43.

For fun I installed lsof and I can reproduce Matt’s problem exactly.

So does uname(3) or uname(1) report on the kernel or does it simply report back an environment variable? It looks to me like the latter and perhaps there is something about this p43 to p45 update that is not setting this environment variable up.

Both "freebsd-update cron" and “lsof" don’t seem to think the upgrade/patch has occurred. In the case "freebsd-update cron” every day it reports by email that some update is required to get to p43. Is this a bug?

Ian

Steve O'Hara-Smith

unread,
Sep 22, 2016, 7:02:21 AM9/22/16
to Ian Jefferson, freebsd-...@freebsd.org
On Thu, 22 Sep 2016 06:14:28 -0400
Ian Jefferson <ij...@sandbox.ca> wrote:

> I was having a similar issue with freebsd-update not being aware (able?)
> to patch up to 9.3-RELEASE-p45.

Not all updates change the kernel so it is very possible for the
kernel version (which uname reports) to be older than the latest update
installed. In 10.3 there's freebsd-version which reports the system version
as distinct from the kernel version to resolve this problem, I'm not sure
if it has been backported to 9.3 though - try it and see.

--
Steve O'Hara-Smith <st...@sohara.org>

Ian Jefferson

unread,
Sep 22, 2016, 7:28:04 AM9/22/16
to freebsd-...@freebsd.org

> On Sep 22, 2016, at 7:01 AM, Steve O'Hara-Smith <st...@sohara.org> wrote:
>
> On Thu, 22 Sep 2016 06:14:28 -0400
> Ian Jefferson <ij...@sandbox.ca> wrote:
>
>> I was having a similar issue with freebsd-update not being aware (able?)
>> to patch up to 9.3-RELEASE-p45.
>
> Not all updates change the kernel so it is very possible for the
> kernel version (which uname reports) to be older than the latest update
> installed. In 10.3 there's freebsd-version which reports the system version
> as distinct from the kernel version to resolve this problem, I'm not sure
> if it has been backported to 9.3 though - try it and see.
>

Thanks,

It doesn’t seem like freebsd-version is backported to 9.3 but I’m not sure that would fix the freebsd-update problem nor the lsof issue either.

I also found this:

"The updates distributed by freebsd-update do not always involve the kernel. It is not necessary to rebuild a custom kernel if the kernel sources have not been modified by freebsd-update install. However, freebsd-update will always update/usr/src/sys/conf/newvers.sh. The current patch level, as indicated by the -p number reported by uname -r, is obtained from this file. Rebuilding a custom kernel, even if nothing else changed, allows uname to accurately report the current patch level of the system. This is particularly helpful when maintaining multiple systems, as it allows for a quick assessment of the updates installed in each one. “

here: https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-upgrading-freebsdupdate.html

Indeed it looks to me like /usr/src/sys/conf/newvers.sh on my system “knows” that I am at patch level 45 but freebsd-update doesn’t nor does uname. I think you are saying that uname get’s its information from the kernel but that is contradicted by the handbook points above so I’m unclear and regardless freebsd-update seems broken in this patch.

My newvers.sh file contains the following:

TYPE="FreeBSD"
REVISION="9.3"
BRANCH="RELEASE-p45"
if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
BRANCH=${BRANCH_OVERRIDE}
fi
RELEASE="${REVISION}-${BRANCH}"
VERSION="${TYPE} ${RELEASE}”

I suppose the ultimate answer is we need to move off 9.3 since it is just about EOL anyway but I wonder… if freebsd-update is confused will it perform the upgrade correctly?

Ian

Steve O'Hara-Smith

unread,
Sep 22, 2016, 7:49:31 AM9/22/16
to Ian Jefferson, freebsd-...@freebsd.org
On Thu, 22 Sep 2016 07:27:40 -0400
Ian Jefferson <ij...@sandbox.ca> wrote:

> It doesn’t seem like freebsd-version is backported to 9.3 but I’m not
> sure that would fix the freebsd-update problem nor the lsof issue either.

It was part of a fix for that problem - in 9.3 the kernel version
is all there is later a userspace version was added along with
freebsd-version.

> I also found this:
>
> "The updates distributed by freebsd-update do not always involve the
> kernel. It is not necessary to rebuild a custom kernel if the kernel
> sources have not been modified by freebsd-update install. However,
> freebsd-update will always update/usr/src/sys/conf/newvers.sh. The
> current patch level, as indicated by the -p number reported by uname -r,
> is obtained from this file. Rebuilding a custom kernel, even if nothing
> else changed, allows uname to accurately report the current patch level
> of the system. This is particularly helpful when maintaining multiple
> systems, as it allows for a quick assessment of the updates installed in
> each one. “

Yep that's the full version.

> Indeed it looks to me like /usr/src/sys/conf/newvers.sh on my system
> “knows” that I am at patch level 45 but freebsd-update doesn’t nor does
> uname.

Right - so if you do a kernel build and install then the whole
system will know about it otherwise it's just tucked away in an unused
source file.

> I think you are saying that uname get’s its information from the
> kernel but that is contradicted by the handbook points above so I’m
> unclear and regardless freebsd-update seems broken in this patch.

Yep uname gets the version data from the kernel, which gets it from
newvers.sh when the kernel is built - which is what that handbook section
is telling you in a roundabout and not entirely clear way.

> I suppose the ultimate answer is we need to move off 9.3 since it is just
> about EOL anyway but I wonder… if freebsd-update is confused will it
> perform the upgrade correctly?

Yes it will.

--
Steve O'Hara-Smith <st...@sohara.org>

William A. Mahaffey III

unread,
Sep 22, 2016, 9:35:15 AM9/22/16
to freebsd-...@freebsd.org
On 09/22/16 05:20, Ian Jefferson wrote:
> I was having a similar issue with freebsd-update not being aware (able?) to patch up to 9.3-RELEASE-p45.
>
> I am continually getting messages from freebsd-update cron like this:
>
> ******************************************************************************
> Looking up update.FreeBSD.org mirrors... 4 mirrors found.
> Fetching metadata signature for 9.3-RELEASE from update6.freebsd.org... done.
> Fetching metadata index... done.
> Inspecting system... done.
> Preparing to download files... done.
>
> The following files will be removed as part of updating to 9.3-RELEASE-p45:
> ********************************************************************************
>
> I can run freebsd-update fetch and install all day long with reboots and uname still reports 9.3-RELEASE-p43.
>
> For fun I installed lsof and I can reproduce Matt’s problem exactly.
>
> So does uname(3) or uname(1) report on the kernel or does it simply report back an environment variable? It looks to me like the latter and perhaps there is something about this p43 to p45 update that is not setting this environment variable up.
>
> Both "freebsd-update cron" and “lsof" don’t seem to think the upgrade/patch has occurred. In the case "freebsd-update cron” every day it reports by email that some update is required to get to p43. Is this a bug?
>
> Ian


No. That update updated various system libraries & utilities, but not
the kernel. The message about patch level comes from the kernel, so it
reports it is still at -p43. I see the same thing with this update & w/
various earlier updates that didn't update the kernel. No problema at
all, relax ;-) ....

--

William A. Mahaffey III

----------------------------------------------------------------------

"The M1 Garand is without doubt the finest implement of war
ever devised by man."
-- Gen. George S. Patton Jr.

Reply all
Reply to author
Forward
0 new messages