Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 359345 - net-analyzer/nagios-plugins-1.4.15: check_snmp crash with more -u option usage
Summary: net-analyzer/nagios-plugins-1.4.15: check_snmp crash with more -u option usage
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Sysadmin Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-18 08:41 UTC by Alexandr Tiurin
Modified: 2014-11-27 00:15 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emergeinfo,11.59 KB, text/plain)
2011-03-18 08:43 UTC, Alexandr Tiurin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Tiurin 2011-03-18 08:41:33 UTC
This problem also exists for net-analyzer/nagios-plugins-1.4.14-r2

Reproducible: Always

Steps to Reproduce:
1. ./check_snmp  -H windows-server -C public -o HOST-RESOURCES-MIB::hrProcessorLoad.2,HOST-RESOURCES-MIB::hrProcessorLoad.3,HOST-RESOURCES-MIB::hrProcessorLoad.4,HOST-RESOURCES-MIB::hrProcessorLoad.5,HOST-RESOURCES-MIB::hrProcessorLoad.6,HOST-RESOURCES-MIB::hrProcessorLoad.7,HOST-RESOURCES-MIB::hrProcessorLoad.8,HOST-RESOURCES-MIB::hrProcessorLoad.9 -u '%' -u '%' -u '%' -u '%' -u '%' -u '%' -u '%' -u "%"

Actual Results:  
*** glibc detected *** ./check_snmp: realloc(): invalid next size: 0x09e25988 ***
======= Backtrace: =========
/lib/libc.so.6(+0x6b6b1)[0xb77ae6b1]
/lib/libc.so.6(+0x70e15)[0xb77b3e15]
/lib/libc.so.6(realloc+0xdd)[0xb77b40fd]
/lib/libc.so.6(realloc+0x2d3)[0xb77b42f3]
./check_snmp[0x804b570]
./check_snmp[0x804b98e]
/lib/libc.so.6(__libc_start_main+0xe6)[0xb7759bb6]
./check_snmp[0x8049681]
======= Memory map: ========
08048000-08053000 r-xp 00000000 08:03 796292     /usr/lib/nagios/plugins/check_snmp
08053000-08054000 r--p 0000a000 08:03 796292     /usr/lib/nagios/plugins/check_snmp
08054000-0805d000 rw-p 0000b000 08:03 796292     /usr/lib/nagios/plugins/check_snmp
09e25000-09e46000 rw-p 00000000 00:00 0          [heap]
b7300000-b7321000 rw-p 00000000 00:00 0 
b7321000-b7400000 ---p 00000000 00:00 0 
b7408000-b7422000 r-xp 00000000 08:03 221505     /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/libgcc_s.so.1
b7422000-b7423000 r--p 00019000 08:03 221505     /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/libgcc_s.so.1
b7423000-b7424000 rw-p 0001a000 08:03 221505     /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/libgcc_s.so.1
b7424000-b7542000 r--p 001b0000 08:03 654566     /usr/lib/locale/locale-archive
b7542000-b7742000 r--p 00000000 08:03 654566     /usr/lib/locale/locale-archive
b7742000-b7743000 rw-p 00000000 00:00 0 
b7743000-b7883000 r-xp 00000000 08:03 823507     /lib/libc-2.11.3.so
b7883000-b7885000 r--p 0013f000 08:03 823507     /lib/libc-2.11.3.so
b7885000-b7886000 rw-p 00141000 08:03 823507     /lib/libc-2.11.3.so
b7886000-b7889000 rw-p 00000000 00:00 0 
b7889000-b789e000 r-xp 00000000 08:03 823509     /lib/libpthread-2.11.3.so
b789e000-b789f000 r--p 00014000 08:03 823509     /lib/libpthread-2.11.3.so
b789f000-b78a0000 rw-p 00015000 08:03 823509     /lib/libpthread-2.11.3.so
b78a0000-b78a2000 rw-p 00000000 00:00 0 
b78ba000-b78bb000 rw-p 00000000 00:00 0 
b78bb000-b78bc000 r-xp 00000000 00:00 0          [vdso]
b78bc000-b78d8000 r-xp 00000000 08:03 823517     /lib/ld-2.11.3.so
b78d8000-b78d9000 r--p 0001b000 08:03 823517     /lib/ld-2.11.3.so
b78d9000-b78da000 rw-p 0001c000 08:03 823517     /lib/ld-2.11.3.so
bfca2000-bfcb7000 rw-p 00000000 00:00 0          [stack]
Aborted



Debug. (net-analyzer/nagios-plugins-1.4.15)
(gdb) run
Starting program: /usr/lib/nagios/plugins/check_snmp -H windows-server -C public -o HOST-RESOURCES-MIB::hrProcessorLoad.2,HOST-RESOURCES-MIB::hrProcessorLoad.3,HOST-RESOURCES-MIB::hrProcessorLoad.4,HOST-RESOURCES-MIB::hrProcessorLoad.5,HOST-RESOURCES-MIB::hrProcessorLoad.6,HOST-RESOURCES-MIB::hrProcessorLoad.7,HOST-RESOURCES-MIB::hrProcessorLoad.8,HOST-RESOURCES-MIB::hrProcessorLoad.9 -u % -u % -u % -u % -u % -u % -u % -u %
[Thread debugging using libthread_db enabled]
*** glibc detected *** /usr/lib/nagios/plugins/check_snmp: realloc(): invalid next size: 0x0805d988 ***
======= Backtrace: =========
/lib/libc.so.6(+0x6b6b1)[0xb7ed46b1]
/lib/libc.so.6(+0x70e15)[0xb7ed9e15]
/lib/libc.so.6(realloc+0xdd)[0xb7eda0fd]
/lib/libc.so.6(realloc+0x2d3)[0xb7eda2f3]
/usr/lib/nagios/plugins/check_snmp[0x804b570]
/usr/lib/nagios/plugins/check_snmp[0x804b98e]
/lib/libc.so.6(__libc_start_main+0xe6)[0xb7e7fbb6]
/usr/lib/nagios/plugins/check_snmp[0x8049681]
======= Memory map: ========
08048000-08053000 r-xp 00000000 08:03 796292     /usr/lib/nagios/plugins/check_snmp
08053000-08054000 r--p 0000a000 08:03 796292     /usr/lib/nagios/plugins/check_snmp
08054000-0805d000 rw-p 0000b000 08:03 796292     /usr/lib/nagios/plugins/check_snmp
0805d000-0807e000 rw-p 00000000 00:00 0          [heap]
b7a00000-b7a21000 rw-p 00000000 00:00 0 
b7a21000-b7b00000 ---p 00000000 00:00 0 
b7b2e000-b7b48000 r-xp 00000000 08:03 221505     /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/libgcc_s.so.1
b7b48000-b7b49000 r--p 00019000 08:03 221505     /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/libgcc_s.so.1
b7b49000-b7b4a000 rw-p 0001a000 08:03 221505     /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/libgcc_s.so.1
b7b4a000-b7c68000 r--p 001b0000 08:03 654566     /usr/lib/locale/locale-archive
b7c68000-b7e68000 r--p 00000000 08:03 654566     /usr/lib/locale/locale-archive
b7e68000-b7e69000 rw-p 00000000 00:00 0 
b7e69000-b7fa9000 r-xp 00000000 08:03 823507     /lib/libc-2.11.3.so
b7fa9000-b7fab000 r--p 0013f000 08:03 823507     /lib/libc-2.11.3.so
b7fab000-b7fac000 rw-p 00141000 08:03 823507     /lib/libc-2.11.3.so
b7fac000-b7faf000 rw-p 00000000 00:00 0 
b7faf000-b7fc4000 r-xp 00000000 08:03 823509     /lib/libpthread-2.11.3.so
b7fc4000-b7fc5000 r--p 00014000 08:03 823509     /lib/libpthread-2.11.3.so
b7fc5000-b7fc6000 rw-p 00015000 08:03 823509     /lib/libpthread-2.11.3.so
b7fc6000-b7fc8000 rw-p 00000000 00:00 0 
b7fe0000-b7fe1000 rw-p 00000000 00:00 0 
b7fe1000-b7fe2000 r-xp 00000000 00:00 0          [vdso]
b7fe2000-b7ffe000 r-xp 00000000 08:03 823517     /lib/ld-2.11.3.so
b7ffe000-b7fff000 r--p 0001b000 08:03 823517     /lib/ld-2.11.3.so
b7fff000-b8000000 rw-p 0001c000 08:03 823517     /lib/ld-2.11.3.so
bffeb000-c0000000 rw-p 00000000 00:00 0          [stack]

Program received signal SIGABRT, Aborted.
0xb7fe1424 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fe1424 in __kernel_vsyscall ()
#1  0xb7e93401 in raise () from /lib/libc.so.6
#2  0xb7e94b42 in abort () from /lib/libc.so.6
#3  0xb7ece7f5 in ?? () from /lib/libc.so.6
#4  0xb7ed46b1 in ?? () from /lib/libc.so.6
#5  0xb7ed9e15 in ?? () from /lib/libc.so.6
#6  0xb7eda0fd in realloc () from /lib/libc.so.6
#7  0xb7eda2f3 in realloc () from /lib/libc.so.6
#8  0x0804b570 in process_arguments (argc=23, argv=0xbfffef24) at check_snmp.c:769
#9  0x0804b98e in main (argc=23, argv=0xbfffef24) at check_snmp.c:204
(gdb) quit
Comment 1 Alexandr Tiurin 2011-03-18 08:43:58 UTC
Created attachment 266341 [details]
emerge --info
Comment 2 Michael Orlitzky gentoo-dev 2014-11-22 22:25:24 UTC
Can you please try this with nagios-plugins-2.0.3 and report back if it's still a problem?
Comment 3 Michael Orlitzky gentoo-dev 2014-11-27 00:15:35 UTC
I was able to reproduce this with the 1.4.x series with "-H localhost" and the rest left intact. It is indeed fixed with nagios-plugins-2.0.3!