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

Bug#1023280: monitoring-plugins-basic: check_disk always segfaults

31 views
Skip to first unread message

Stephane Bortzmeyer

unread,
Nov 1, 2022, 1:10:04 PM11/1/22
to
Package: monitoring-plugins-basic
Version: 2.3.2-1
Severity: important

Dear Maintainer,

% /usr/lib/nagios/plugins/check_disk -w 10 -c 5
zsh: segmentation fault /usr/lib/nagios/plugins/check_disk -w 10 -c 5

With strace:

% strace /usr/lib/nagios/plugins/check_disk -w 10 -c 5
execve("/usr/lib/nagios/plugins/check_disk", ["/usr/lib/nagios/plugins/check_di"..., "-w", "10", "-c", "5"], 0xbead77b0 /* 52 vars */) = 0
brk(NULL) = 0x1c1f000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40094000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=54650, ...}) = 0
mmap2(NULL, 54650, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40096000
close(3) = 0
openat(AT_FDCWD, "/lib/arm-linux-gnueabihf/libc.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0i\344\1\0004\0\0\0"..., 512) = 512
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=1123124, ...}) = 0
mmap2(NULL, 1287060, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400a8000
mmap2(0x400b0000, 1221524, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x400b0000
munmap(0x400a8000, 32768) = 0
munmap(0x401db000, 29588) = 0
mprotect(0x401ba000, 81920, PROT_NONE) = 0
mmap2(0x401ce000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10e000) = 0x401ce000
mmap2(0x401d1000, 37780, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x401d1000
close(3) = 0
set_tls(0x400952e0) = 0
set_tid_address(0x40094e48) = 751
set_robust_list(0x40094e4c, 12) = 0
rseq(0x400952c0, 0x20, 0, 0xe7f5def3) = -1 ENOSYS (Function not implemented)
mprotect(0x401ce000, 8192, PROT_READ) = 0
mprotect(0x43f000, 4096, PROT_READ) = 0
mprotect(0x400a6000, 4096, PROT_READ) = 0
ugetrlimit(RLIMIT_STACK, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
munmap(0x40096000, 54650) = 0
getrandom("\x66\xa6\x04\xbb", 4, GRND_NONBLOCK) = 4
brk(NULL) = 0x1c1f000
brk(0x1c40000) = 0x1c40000
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=3709744, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0x401db000
mmap2(NULL, 2592768, PROT_READ, MAP_PRIVATE, 3, 0x6f000) = 0x403db000
mmap2(NULL, 8192, PROT_READ, MAP_PRIVATE, 3, 0x338000) = 0x40096000
close(3) = 0
openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=2996, ...}) = 0
read(3, "# Locale name alias data base.\n#"..., 4096) = 2996
read(3, "", 4096) = 0
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/en_GB.UTF-8/LC_TIME", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_GB.utf8/LC_TIME", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_GB/LC_TIME", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en.UTF-8/LC_TIME", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en.utf8/LC_TIME", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en/LC_TIME", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/mtab", O_RDONLY|O_CLOEXEC) = 3
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0444, stx_size=0, ...}) = 0
read(3, "/dev/sda1 / ext4 rw,relatime 0 0"..., 1024) = 1024
read(3, "x=1024 0 0\ndevpts /dev/lxc/tty3 "..., 1024) = 639
read(3, "", 1024) = 0
close(3) = 0
statx(AT_FDCWD, "/", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=STATX_ATTR_MOUNT_ROOT, stx_mode=S_IFDIR|0755, stx_size=4096, ...}) = 0
uname({sysname="Linux", nodename="jadis", ...}) = 0
statfs64("/", 88, 0xbee04308) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x3b500000} ---
+++ killed by SIGSEGV +++
zsh: segmentation fault strace /usr/lib/nagios/plugins/check_disk -w 10 -c 5
jadis:~ % strace -f /usr/lib/nagios/plugins/check_disk -w 10 -c 5
execve("/usr/lib/nagios/plugins/check_disk", ["/usr/lib/nagios/plugins/check_di"..., "-w", "10", "-c", "5"], 0xbef4a7b4 /* 52 vars */) = 0
brk(NULL) = 0x146d000
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400dc000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=54650, ...}) = 0
mmap2(NULL, 54650, PROT_READ, MAP_PRIVATE, 3, 0) = 0x400de000
close(3) = 0
openat(AT_FDCWD, "/lib/arm-linux-gnueabihf/libc.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0i\344\1\0004\0\0\0"..., 512) = 512
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=1123124, ...}) = 0
mmap2(NULL, 1287060, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400f0000
mmap2(0x400f0000, 1221524, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x400f0000
munmap(0x4021b000, 62356) = 0
mprotect(0x401fa000, 81920, PROT_NONE) = 0
mmap2(0x4020e000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10e000) = 0x4020e000
mmap2(0x40211000, 37780, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40211000
close(3) = 0
set_tls(0x400dd2e0) = 0
set_tid_address(0x400dce48) = 782
set_robust_list(0x400dce4c, 12) = 0
rseq(0x400dd2c0, 0x20, 0, 0xe7f5def3) = -1 ENOSYS (Function not implemented)
mprotect(0x4020e000, 8192, PROT_READ) = 0
mprotect(0x4ff000, 4096, PROT_READ) = 0
mprotect(0x400ee000, 4096, PROT_READ) = 0
ugetrlimit(RLIMIT_STACK, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
munmap(0x400de000, 54650) = 0
getrandom("\x87\xbc\xa7\x25", 4, GRND_NONBLOCK) = 4
brk(NULL) = 0x146d000
brk(0x148e000) = 0x148e000
openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=3709744, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4021b000
mmap2(NULL, 2592768, PROT_READ, MAP_PRIVATE, 3, 0x6f000) = 0x4041b000
mmap2(NULL, 8192, PROT_READ, MAP_PRIVATE, 3, 0x338000) = 0x400de000
close(3) = 0
openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=2996, ...}) = 0
read(3, "# Locale name alias data base.\n#"..., 4096) = 2996
read(3, "", 4096) = 0
close(3) = 0
openat(AT_FDCWD, "/usr/lib/locale/en_GB.UTF-8/LC_TIME", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_GB.utf8/LC_TIME", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en_GB/LC_TIME", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en.UTF-8/LC_TIME", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en.utf8/LC_TIME", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/locale/en/LC_TIME", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/mtab", O_RDONLY|O_CLOEXEC) = 3
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT|AT_EMPTY_PATH, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0444, stx_size=0, ...}) = 0
read(3, "/dev/sda1 / ext4 rw,relatime 0 0"..., 1024) = 1024
read(3, "x=1024 0 0\ndevpts /dev/lxc/tty3 "..., 1024) = 639
read(3, "", 1024) = 0
close(3) = 0
statx(AT_FDCWD, "/", AT_STATX_SYNC_AS_STAT|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=STATX_ATTR_MOUNT_ROOT, stx_mode=S_IFDIR|0755, stx_size=4096, ...}) = 0
uname({sysname="Linux", nodename="jadis", ...}) = 0
statfs64("/", 88, 0xbe8d8308) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x3b500000} ---
+++ killed by SIGSEGV +++
zsh: segmentation fault strace -f /usr/lib/nagios/plugins/check_disk -w 10 -c 5

With the debugger:

% gdb /usr/lib/nagios/plugins/check_disk
GNU gdb (Debian 12.1-4) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/lib/nagios/plugins/check_disk...
(No debugging symbols found in /usr/lib/nagios/plugins/check_disk)
(gdb) run -w 10 -c 5
Starting program: /usr/lib/nagios/plugins/check_disk -w 10 -c 5

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
__GI_strlen () at ../sysdeps/arm/armv6t2/strlen.S:69
69 ../sysdeps/arm/armv6t2/strlen.S: No such file or directory.
(gdb) where
#0 __GI_strlen () at ../sysdeps/arm/armv6t2/strlen.S:69
#1 0x40081d28 in __vfprintf_internal (s=s@entry=0xbefff3c0, format=format@entry=0x409f5c "%s=%ld%s;", ap=..., ap@entry=..., mode_flags=mode_flags@entry=2)
at vfprintf-process-arg.c:397
#2 0x40094d04 in __vasprintf_internal (result_ptr=0xbefff4c0, format=0x409f5c "%s=%ld%s;", args=..., mode_flags=2) at vasprintf.c:57
#3 0x0040435a in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)


-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: armhf (armv7l)

Kernel: Linux 5.15.74 (SMP w/2 CPU threads)
Locale: LANG=C, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages monitoring-plugins-basic depends on:
ii iputils-ping 3:20211215-1
ii libc6 2.36-3
ii libssl3 3.0.5-4
ii monitoring-plugins-common 2.3.2-1
ii procps 2:3.3.17-7.1
ii ucf 3.0043

Versions of packages monitoring-plugins-basic recommends:
ii libcap2-bin 1:2.44-1

Versions of packages monitoring-plugins-basic suggests:
ii icinga2 2.13.5-2

-- no debconf information

Jan Wagner

unread,
Nov 3, 2022, 6:00:04 AM11/3/22
to
tags 1023280 + moreinfo unreproducible
forwarded 1023280 https://github.com/monitoring-plugins/monitoring-plugins/issues/1805
thanks

Hi Stephane,

Am 01.11.22 um 18:00 schrieb Stephane Bortzmeyer:
> -- System Information:
> Debian Release: bookworm/sid
> APT prefers unstable
> APT policy: (500, 'unstable')
> Architecture: armhf (armv7l)
>
> Kernel: Linux 5.15.74 (SMP w/2 CPU threads)
> Locale: LANG=C, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8), LANGUAGE not set
> Shell: /bin/sh linked to /usr/bin/dash
> Init: systemd (via /run/systemd/system)

I'm unable to reproduce this on bullseye/amd64

Cheers Jan

Stephane Bortzmeyer

unread,
Nov 3, 2022, 2:00:04 PM11/3/22
to
On Thu, Nov 03, 2022 at 10:46:29AM +0100,
Jan Wagner <wa...@cyconet.org> wrote
a message of 21 lines which said:

> I'm unable to reproduce this on bullseye/amd64

As you've seen, it's on ARM so it may be ARM-specific.

Sven-Haegar Koch

unread,
Nov 6, 2022, 8:50:03 AM11/6/22
to
Moin,

Same segfault happens for me on a sid/i386 VM:

# /usr/lib/nagios/plugins/check_disk -w 10 -c 5
Segmentation fault

$ uname -a
Linux XXX 6.0.0-2-686-pae #1 SMP PREEMPT_DYNAMIC Debian 6.0.6-2
(2022-11-01) i686 GNU/Linux

so looks more likely to be 32bit related, and not only ARM.

c'ya
sven-haegar

--
Three may keep a secret, if two of them are dead.
- Ben F.

Stephane Bortzmeyer

unread,
Nov 23, 2022, 9:20:03 AM11/23/22
to
On Thu, Nov 03, 2022 at 05:51:08PM +0000,
Debian Bug Tracking System <ow...@bugs.debian.org> wrote
a message of 22 lines which said:

> Your message has been sent to the package maintainer(s):
> Debian Nagios Maintainer Group <pkg-nagi...@lists.alioth.debian.org>

Compiling the future 2.3.2-2 from its git repository indeed solved the
problem.
0 new messages