[Nagiosplug-devel] [ nagiosplug-Bugs-1595449 ] check_procs bus error, ... on Solaris 8, 9 & 10

SourceForge.net noreply at sourceforge.net
Thu Oct 11 04:20:09 CEST 2007


Bugs item #1595449, was opened at 2006-11-13 00:23
Message generated for change (Comment added) made by sf-robot
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1595449&group_id=29880

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: None
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Alex Peeters (zxr750)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_procs bus error, ... on Solaris 8, 9 & 10

Initial Comment:
check_procs bus error, segmentation fault or wrong
output on Solaris 8, 9 & 10

Do first the next configure!
----------------------------

./configure --with-ps_command="/usr/bin/ps -eo 's uid
pid ppid vsz rss pcpu etime comm args'"
--with-ps_format='%s %d %d %d %d %d %f %s %s %n'
--with-ps_cols=10
--with-ps_varlist='procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos'
--with-trusted-path=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin



To solve the bus error and /or segmentation fault on
Solaris 8:
--------------------------------------------------

replace into check_procs.c

if ( cols >= expected_cols ) {
  resultsum = 0;
- asprintf (&procargs, "%s", input_line + pos);
  strip (procargs);

with

if ( cols >= expected_cols ) {
  resultsum = 0;
+ asprintf (&procargs, "%s", input_line);
  strip (procargs);


 
To solve the wrong output on Solaris 8, 9 & 10:
-----------------------------------------------

change into common.h
MAX_INPUT_BUFFER 1024
to
MAX_INPUT_BUFFER 4096



----------------------------------------------------------------------

>Comment By: SourceForge Robot (sf-robot)
Date: 2007-10-10 19:20

Message:
Logged In: YES 
user_id=1312539
Originator: NO

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

----------------------------------------------------------------------

Comment By: Holger Weiss (hweiss)
Date: 2007-09-26 03:35

Message:
Logged In: YES 
user_id=759506
Originator: NO

I tried your ./configure line on Solaris 8 and on Solaris 10 with Sun's
compiler as well as with GCC but I was not able to reproduce your problem. 
MAX_INPUT_BUFFER is set to 8192 in the current code.  The 'pos' offset is
correct for me, not using it would let check_procs evaluate a complete
ps(1) output line instead of just the 'args' field when checking the
process arguments which would clearly be wrong and may lead to incorrect
results when using '--argument-array'.

Could you test whether you can still reproduce the problem using the
snapshot at http://nagiosplug.sf.net/snapshot/ (which is a release
candidate for 1.4.10)?  If so, could you please post the exact check_procs
command line you used, the compiler (version) you used, and the exact
result you got (bus error or segfault or incorrect output)?

I'll set the status back to 'pending', please re-open the item if you can
still reproduce the problem.

Thanks a lot, Holger

----------------------------------------------------------------------

Comment By: Alex Peeters (zxr750)
Date: 2007-09-25 22:38

Message:
Logged In: YES 
user_id=590764
Originator: YES

Why pending ?

----------------------------------------------------------------------

Comment By: Alex Peeters (zxr750)
Date: 2007-09-25 22:37

Message:
Logged In: YES 
user_id=590764
Originator: YES

Why pending ?

----------------------------------------------------------------------

Comment By: Matthias Eble (psychotrahe)
Date: 2007-07-14 14:31

Message:
Logged In: YES 
user_id=1694341
Originator: NO

Hi Alex,

is the bus error still there?

Matthias

----------------------------------------------------------------------

Comment By: Thomas Guyot (dermoth)
Date: 2007-02-17 06:05

Message:
Logged In: YES 
user_id=375623
Originator: NO

The patch can be found on bug #1630970. It is also fixed in the latest
release, 1.4.6

https://sourceforge.net/tracker/index.php?func=detail&aid=1630970&group_id=29880&atid=397597

----------------------------------------------------------------------

Comment By: msB (msbenjamin12)
Date: 2007-02-16 04:41

Message:
Logged In: YES 
user_id=1097533
Originator: NO

Where is the original code, I need to fix this I get the wrong output on
Solaris 9.

----------------------------------------------------------------------

Comment By: Thomas Guyot (dermoth)
Date: 2007-01-16 21:37

Message:
Logged In: YES 
user_id=375623
Originator: NO

The wrong output bug should be fixed (1630970). I (or somebody else) will
have to look further for the bus error.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1595449&group_id=29880




More information about the Devel mailing list