Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1029720: monitoring-plugins-contrib: false positive w bookworm kernel: "running kernel does not match on-disk kernel image'

19 views
Skip to first unread message

Holger Levsen

unread,
Jan 26, 2023, 11:52:19 AM1/26/23
to
Package: monitoring-plugins-contrib
Version: 37.20211217
Severity: normal
x-debbugs-cc: mat...@debian.org

Dear Maintainer,

on a system running bookworm and the latest amd64 kernel
/usr/lib/nagios/plugins/check_running_kernel warns me that the running kernel doesnt
match the on-disk kernel, while it *is* running the latest kernel.
(line breaks added for better readability.)

holger@osuosl168-amd64:~ $ uname -a
Linux osuosl168-amd64 6.1.0-1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.4-1 (2023-01-07) x86_64 GNU/Linux

holger@osuosl168-amd64:~ $ /usr/lib/nagios/plugins/check_running_kernel
WARNING: Running kernel does not match on-disk kernel image: [Linux version 6.1.0-1-amd64 (debian...@lists.debian.org) (gcc-12 (Debian 12.2.0-13) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.90.20221231) #1 SMP PREEMPT_DYNAMIC Debian 6.1.4-1 (2023-01-07) != Linux version 6.1.0-1-amd64 (debian...@lists.debian.org) (gcc-12 (Debian 12.2.0-13) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.90.20221231) # SMP PREEMPT_DYNAMIC Debian 6.1.4-1 (2023-01-07)]

holger@osuosl168-amd64:~ 2s 1 $ dpkg -l linux-image*|grep ^ii
ii linux-image-6.0.0-6-amd64 6.0.12-1 amd64 Linux 6.0 for 64-bit PCs (signed)
ii linux-image-6.1.0-1-amd64 6.1.4-1 amd64 Linux 6.1 for 64-bit PCs (signed)
ii linux-image-amd64 6.1.4-1 amd64 Linux for 64-bit PCs (meta-package)

holger@osuosl168-amd64:~ $ dpkg -l monitoring-plugins-contrib
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==========================-============-============-================================================
ii monitoring-plugins-contrib 37.20211217 amd64 Plugins for nagios compatible monitoring systems

holger@osuosl168-amd64:~ $


--
cheers,
Holger

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ holger@(debian|reproducible-builds|layer-acht).org
⢿⡄⠘⠷⠚⠋⠀ OpenPGP: B8BF54137B09D35CF026FE9D 091AB856069AAA1C
⠈⠳⣄

»Sieh, dass du Mensch bleibst. Mensch sein ist von allem die Hauptsache.
Und das heißt fest und klar und heiter sein, ja heiter, trotz alledem.«
(Rosa Luxemburg)
signature.asc

Jan Wagner

unread,
Jan 30, 2023, 5:50:04 AM1/30/23
to
Hi Holger,

Am 26.01.23 um 17:41 schrieb Holger Levsen:
> on a system running bookworm and the latest amd64 kernel
> /usr/lib/nagios/plugins/check_running_kernel warns me that the running kernel doesnt
> match the on-disk kernel, while it*is* running the latest kernel.
> (line breaks added for better readability.)

thanks for your bugreport.

can you try the version from unstable
(https://packages.debian.org/sid/nagios-plugins-contrib) which I
uploaded a few days ago?

Thank Jan

Holger Levsen

unread,
Jan 30, 2023, 6:40:05 AM1/30/23
to
Hi Jan,

On Mon, Jan 30, 2023 at 11:34:31AM +0100, Jan Wagner wrote:
> can you try the version from unstable
> (https://packages.debian.org/sid/nagios-plugins-contrib) which I uploaded a
> few days ago?

$ scp ./nagios-plugins-contrib-38.20230124/dsa/checks/dsa-check-running-kernel osuosl168-amd64.debian.net:

and then there:

holger@osuosl168-amd64:~ $ bash dsa-check-running-kernel
WARNING: Running kernel does not match on-disk kernel image: [Linux version 6.1.0-1-amd64 (debian...@lists.debian.org) (gcc-12 (Debian 12.2.0-13) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.90.20221231) #1 SMP PREEMPT_DYNAMIC Debian 6.1.4-1 (2023-01-07) != Linux version 6.1.0-1-amd64 (debian...@lists.debian.org) (gcc-12 (Debian 12.2.0-13) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.90.20221231) # SMP PREEMPT_DYNAMIC Debian 6.1.4-1 (2023-01-07)]
holger@osuosl168-amd64:~ $ md5sum dsa-check-running-kernel
155205740a07f98f13bf6045b317c505 dsa-check-running-kernel

so, no, doesnt help.

(the md5sum is just there to show you which version I tried, 38.20230124.)


--
cheers,
Holger

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ holger@(debian|reproducible-builds|layer-acht).org
⢿⡄⠘⠷⠚⠋⠀ OpenPGP: B8BF54137B09D35CF026FE9D 091AB856069AAA1C
⠈⠳⣄

三人成虎- Three men make a tiger.
In other words, if one guy says "there's a tiger over there" you might not believe
them, if three guys in a row all say this- you think there's a tiger there. A lie,
repeated often enough, will be accepted as truth.
signature.asc

Jan Wagner

unread,
Jan 30, 2023, 7:20:05 AM1/30/23
to
Hi Holger,

Am 30.01.23 um 12:33 schrieb Holger Levsen:
> $ scp ./nagios-plugins-contrib-38.20230124/dsa/checks/dsa-check-running-kernel osuosl168-amd64.debian.net:
>
> and then there:
>
> holger@osuosl168-amd64:~ $ bash dsa-check-running-kernel
> WARNING: Running kernel does not match on-disk kernel image: [Linux version 6.1.0-1-amd64 (debian...@lists.debian.org) (gcc-12 (Debian 12.2.0-13) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.90.20221231) #1 SMP PREEMPT_DYNAMIC Debian 6.1.4-1 (2023-01-07) != Linux version 6.1.0-1-amd64 (debian...@lists.debian.org) (gcc-12 (Debian 12.2.0-13) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.90.20221231) # SMP PREEMPT_DYNAMIC Debian 6.1.4-1 (2023-01-07)]
> holger@osuosl168-amd64:~ $ md5sum dsa-check-running-kernel
> 155205740a07f98f13bf6045b317c505 dsa-check-running-kernel
>
> so, no, doesnt help.

thanks for confirming.

As I don't have a bookworm system (with running kernel) at hand, I can't
go deeper into debugging this issue until I get hands on it.

Sorry Jan

Hilmar Preuße

unread,
Jan 30, 2023, 8:10:04 AM1/30/23
to
Am 30.01.2023 um 13:10 teilte Jan Wagner mit:

Hi,

> thanks for confirming.
>
> As I don't have a bookworm system (with running kernel) at hand, I can't
> go deeper into debugging this issue until I get hands on it.
>
I'm able to reproduce, if that helps.

hille@sid-amd64:~$ /usr/lib/nagios/plugins/check_running_kernel
WARNING: Running kernel does not match on-disk kernel image: [Linux
version 6.1.0-1-amd64 (debian...@lists.debian.org) (gcc-12 (Debian
12.2.0-13) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.90.20221231) #1
SMP PREEMPT_DYNAMIC Debian 6.1.4-1 (2023-01-07) != Linux version
6.1.0-2-amd64 (debian...@lists.debian.org) (gcc-12 (Debian
12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) # SMP
PREEMPT_DYNAMIC Debian 6.1.7-1 (2023-01-18)]

When running with bash -x I see two times (two kernel images installed)
the message:

++ echo 'ERROR: Unable to extract kernel image.'

..but this could be benign. I did not fully read the output yet.

Hilmar
--
sigfault

Hilmar Preuße

unread,
Jan 30, 2023, 3:50:04 PM1/30/23
to
Am 30.01.2023 um 13:57 teilte Hilmar Preuße mit:
> Am 30.01.2023 um 13:10 teilte Jan Wagner mit:

Hi,

>> thanks for confirming.
>>
>> As I don't have a bookworm system (with running kernel) at hand, I can't
>> go deeper into debugging this issue until I get hands on it.
>>
> I'm able to reproduce, if that helps.
>
> hille@sid-amd64:~$ /usr/lib/nagios/plugins/check_running_kernel
> WARNING: Running kernel does not match on-disk kernel image: [Linux
> version 6.1.0-1-amd64 (debian...@lists.debian.org) (gcc-12 (Debian
> 12.2.0-13) 12.2.0, GNU ld (GNU Binutils for Debian) 2.39.90.20221231) #1
> SMP PREEMPT_DYNAMIC Debian 6.1.4-1 (2023-01-07) != Linux version
> 6.1.0-2-amd64 (debian...@lists.debian.org) (gcc-12 (Debian
> 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) # SMP
> PREEMPT_DYNAMIC Debian 6.1.7-1 (2023-01-18)]
>
The message above is correct. When comparing the two lines, one notices
that they are not equal:

Linux version 6.1.0-2-amd64 (debian...@lists.debian.org) (gcc-12
(Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP
PREEMPT_DYNAMIC Debian 6.1.7-1 (2023-01-18)

vs.

Linux version 6.1.0-2-amd64 (debian...@lists.debian.org) (gcc-12
(Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) # SMP
PREEMPT_DYNAMIC Debian 6.1.7-1 (2023-01-18)

Meanwhile I rebooted into the 2nd kernel, which did not solve the issue.

H.
--
sigfault

Jan Wagner

unread,
Feb 21, 2023, 9:40:05 AM2/21/23
to
Thanks for all your input.

As the release is coming closer and I'm very short on time at the moment
patches are very appreciated.

Thanks Jan

Hilmar Preuße

unread,
Feb 26, 2023, 6:50:04 PM2/26/23
to
Am 26.01.2023 um 17:41 teilte Holger Levsen mit:

Hi,

> on a system running bookworm and the latest amd64 kernel
> /usr/lib/nagios/plugins/check_running_kernel warns me that the running kernel doesnt
> match the on-disk kernel, while it *is* running the latest kernel.
> (line breaks added for better readability.)
>
In the moment I'm trying to understand how the script works. My current
state is: it checks, which compression mode is used, for the kernel
images in /boot/ (which seems to be xz for bookworm), then it
decompresses the xz compressed part of the kernel images and searches
for "Linux version". The part after "Linux version" is compared to the
content of /proc/version. Unfortunately there is a difference:

/boot/vmlinuz:

Linux version 6.1.0-5-amd64 (debian...@lists.debian.org) (gcc-12
(Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) # SMP
PREEMPT_DYNAMIC Debian 6.1.12-1 (2023-02-15)

/proc/version

Linux version 6.1.0-5-amd64 (debian...@lists.debian.org) (gcc-12
(Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP
PREEMPT_DYNAMIC Debian 6.1.12-1 (2023-02-15)

So it could be a bug in the kernel configuration too. All this worked
fine on Debian stable. I did not check if there was another compression
method in use.

I could not dig further, I failed to extract the xz compressed part of
the kernel correctly. Not sure if this is useful.

Hilmar
--
sigfault
0 new messages