[Pkg-nagios-devel] Bug#1033791: check_running_kernel fails to find version on bookworm/arm64

Manfred Stock m-debian at nfred.ch
Mon May 15 09:46:12 BST 2023


Package: monitoring-plugins-contrib
Version: 42.20230308
Followup-For: Bug #1033791
Control: tags -1 patch

Hi,

we also ran into this issue on an ARM64 machine running Bookworm, and
the proposed fix seems to work. However, I currently believe that this
is essentially the same bug as reported as Debian bug #1029720 [1], but
on another code path that is triggered on ARM64 kernels which I guess
are not compressed, at least in some cases. So maybe it's preferable to
follow the same approach here, too. I've thus created a merge request
[2] which patches the existing patch (the patch is also attached to this
message for completeness).


Cheers,
Manfred


[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1029720
[2] https://salsa.debian.org/nagios-team/nagios-plugins-contrib/-/merge_requests/8


-- System Information:
Debian Release: 12.0
  APT prefers testing-security
  APT policy: (500, 'testing-security'), (500, 'testing')
Architecture: arm64 (aarch64)

Kernel: Linux 6.1.0-9-arm64 (SMP w/6 CPU threads)
Kernel taint flags: TAINT_CRAP
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

monitoring-plugins-contrib depends on no packages.

Versions of packages monitoring-plugins-contrib recommends:
pn  bc                                               <none>
ii  bind9-host                                       1:9.18.12-1
ii  binutils                                         2.40-2
ii  curl                                             7.88.1-9
pn  debsecan                                         <none>
ii  file                                             1:5.44-3
pn  freeipmi-tools                                   <none>
ii  libc6                                            2.36-9
pn  libcapture-tiny-perl                             <none>
pn  libdata-validate-domain-perl                     <none>
pn  libdata-validate-ip-perl                         <none>
pn  libdate-manip-perl                               <none>
pn  libdbd-mysql-perl                                <none>
pn  libio-socket-ssl-perl                            <none>
pn  libipc-run-perl                                  <none>
ii  liblocale-gettext-perl                           1.07-5
pn  liblwp-useragent-determined-perl                 <none>
pn  libmail-imapclient-perl                          <none>
pn  libmemcached11                                   <none>
ii  libmonitoring-plugin-perl                        0.40-1
pn  libnet-cups-perl                                 <none>
pn  libnet-dns-perl                                  <none>
pn  libnet-dns-sec-perl                              <none>
pn  libnet-smtp-ssl-perl                             <none>
pn  libnet-smtp-tls-perl                             <none>
pn  libnet-smtpauth-perl                             <none>
pn  libnet-snmp-perl                                 <none>
pn  libnet-ssleay-perl                               <none>
pn  libreadonly-perl                                 <none>
pn  libredis-perl                                    <none>
pn  libtimedate-perl                                 <none>
pn  libwebinject-perl                                <none>
pn  libxml-simple-perl                               <none>
ii  lz4                                              1.9.4-1
ii  lzop                                             1.04-2
ii  monitoring-plugins-basic [nagios-plugins-basic]  2.3.3-5
ii  openssl                                          3.0.8-1
ii  perl                                             5.36.0-7
ii  perl-base [libsocket-perl]                       5.36.0-7
ii  python3                                          3.11.2-1+b1
pn  python3-pymongo                                  <none>
ii  ruby                                             1:3.1
pn  snmp                                             <none>
pn  whois                                            <none>

Versions of packages monitoring-plugins-contrib suggests:
pn  backuppc                   <none>
ii  bind9-dnsutils [dnsutils]  1:9.18.12-1
pn  cciss-vol-status           <none>
pn  expect                     <none>
ii  iproute2                   6.1.0-2
pn  libsys-virt-perl           <none>
pn  moreutils                  <none>
pn  mpt-status                 <none>
pn  nagios-plugin-check-multi  <none>
pn  percona-toolkit            <none>
pn  perl-doc                   <none>
pn  python3-boto               <none>
pn  smstools                   <none>

-- no debconf information
-------------- next part --------------
>From cbad7b3505ed0ca9aa91cce3a9d06569b81ab842 Mon Sep 17 00:00:00 2001
From: Manfred Stock <m-debian at nfred.ch>
Date: Mon, 15 May 2023 09:00:32 +0200
Subject: [PATCH] Extend fix for on-disk version detection on Bookworm

Commit 4ab7834e added a fix for Debian bug #1029720 [1] but only on the
code path for compressed kernel images. However, it seems like the same
issue also exists on non-compressed images that are used at least on
some ARM64 machines as reported in Debian bug #1033791 [2].

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1029720
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033791
---
 debian/patches/dsa/check_running_kernel_bookworm_fix | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/debian/patches/dsa/check_running_kernel_bookworm_fix b/debian/patches/dsa/check_running_kernel_bookworm_fix
index fe5e75d..d98b929 100644
--- a/debian/patches/dsa/check_running_kernel_bookworm_fix
+++ b/debian/patches/dsa/check_running_kernel_bookworm_fix
@@ -9,3 +9,12 @@
  			if [ -x /usr/bin/lsb_release ] ; then
  				vendor=$(lsb_release -i -s)
  				if [ -n "$vendor" ] && [ "xDebian" != "x$vendor" ] ; then
+@@ -211,7 +211,7 @@
+ 				fi
+ 			fi
+ 			[ -z "$on_disk_version" ] || continue
+-			on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | head -n1`"
++			on_disk_version="`cat "$on_disk" | $STRINGS | grep 'Linux version' | tail -n1`"
+ 			[ -z "$on_disk_version" ] || continue
+ 
+ 			echo "UNKNOWN: Failed to get a version string from image $on_disk"
-- 
2.39.2



More information about the Pkg-nagios-devel mailing list