Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Nov 2023 01:04:00 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 275048] System prints "reboot: v_swappgsin" twice when rebooting
Message-ID:  <bug-275048-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D275048

            Bug ID: 275048
           Summary: System prints "reboot: v_swappgsin" twice when
                    rebooting
           Product: Base System
           Version: 14.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: freebsd@kumba.dev

Unsure what is exactly going on here.  One of my systems that's been testing
the 14.0-RC releases out prints "reboot: v_swappgsin" exactly two times when
the system is rebooting via manual command.  No crashes, no ill effects
observed.  Reboot comes back up normally, too.

I looked at reboot.c's source code and the specific output is a 'warnx()' c=
all
in function 'get_pageins', and only prints the string "v_swappgsin" when sy=
sctl
tunable 'vm.stats.vm.v_swappgsin' is not equal to 0:

sbin/reboot/reboot.c:284:

> static u_int
> get_pageins(void)
> {
>         u_int pageins;
>         size_t len;
>=20
>         len =3D sizeof(pageins);
>         if (sysctlbyname("vm.stats.vm.v_swappgsin", &pageins, &len, NULL,=
 0)
>             !=3D 0) {
>                 warnx("v_swappgsin");
>                 return (0);
>         }
>         return pageins;
> }

Actual commands and output, over SSH:

> # reboot
> reboot: v_swappgsin
> reboot: v_swappgsin

It doesn't always happen, but it started with 14.0-RC3 (at least).  I never=
 saw
this under 13.2-RELEASE.  The system does run a Squid proxy, so it sees a g=
ood
amount of filesystem activity and I'm sure RAM is thrashed pretty good.

The specific bit of code first appeared in 2001:
https://cgit.freebsd.org/src/commit/sbin/reboot/reboot.c?id=3D85ae580ccbfa0=
0573031dff5c8ce078c37144523

>From my read of that, it looks like reboot is simply waiting for processes =
to
finish cleaning up and exiting.  Squid has a built-in 30-second hold before=
 it
will exit, but I usually shut it down manually before initiating a reboot.

In any event, as far as I can tell, the function appears to be doing its jo=
b.=20
But I think the 'warnx()' message could be a bit more informative as to wha=
t it
is doing?

--=20
You are receiving this mail because:
You are the assignee for the bug.=



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