[Nagiosplug-devel] [ nagiosplug-Bugs-2075933 ] check_disk segfault on freebsd 7 if using -p option

SourceForge.net noreply at sourceforge.net
Wed Aug 27 03:31:15 CEST 2008

Bugs item #2075933, was opened at 2008-08-26 09:47
Message generated for change (Comment added) made by dermoth
You can respond by visiting: 

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General plugin execution
Group: snapshot tarball
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Stefano Coletta (creatore)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_disk segfault on freebsd 7 if using -p option

Initial Comment:
By using check_disk plugin on FreeBSD 7 with -p option it causes a segfault.

The latest head CVS does not fix the problem.

[root at server /usr/local/nagios/libexec]# /usr/local/nagios/libexec/check_disk -w 20% -c 10% -vvv -p /var      
For /var, total=1512775, available=1382811, available_to_root=1503833, used=8942, fsp.fsu_files=400382, fsp.fsu_ffree=398157
For /var, used_pct=1 free_pct=99 used_units=17 free_units=2700 total_units=2954 used_inodes_pct=1 free_inodes_pct=99 fsp.fsu_blocksize=2048 mult=1048576
Freespace_units result=0
Freespace% result=0
Usedspace_units result=0
Usedspace_percent result=0
Usedinodes_percent result=0
Segmentation fault: 11 (core dumped)

I've found that the segfault happens at this line on t he check_disk.c:

359: temp_result = get_status(dfree_inodes_percent, path->freeinodes_percent);

[root at server /usr/local/nagios/libexec]# /usr/local/nagios/libexec/check_disk -V                        
check_disk v1991 (nagios-plugins 1.4.12)

[root at server /]# uname -a
FreeBSD server.***.** 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008     root at logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

[root at server /]# gcc -v
Using built-in specs.
Target: i386-undermydesk-freebsd
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070719  [FreeBSD]


>Comment By: Thomas Guyot (dermoth)
Date: 2008-08-26 21:31

Logged In: YES 
Originator: NO


Given the line you mentioned, it looks more like the segfault happened
inside the get_status() function because temp_result is an integer. Could
you try getting a backtrace from gdb? Run it from the source tree of
nagios-plugins if possible. i.e.:

$ gdb plugins/check_disk
(gdb) run -w 20% -c 10% -vvv -p /var

<Segfault should happen here>

(gdb) bt

And sent the full output of gdb.



You can respond by visiting: 

More information about the Devel mailing list