Re: [Nagios-devel] Some errors with SIGSEGV
Posted: Fri Mar 30, 2007 9:02 pm
This message is in MIME format.
--=_5t2j24cnj5ub
Content-Type: text/plain;
charset=ISO-8859-1;
DelSp="Yes";
format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Quoting Herbert Straub :
> Anyway, please test the situation and report the situation.
The patch works also on Ubuntu Warty and there are no more
segmentation faults. My testresults for problematic systems Debian
Sarge und Ubuntu Warty OK. Matthias Flittner has posted a SIGSEGV
problem in this thread and Hendrik has posted a list, which contains
one other people, who has a SIGSEGV detected (also on Debian Sarge).
Would it be possible do test the patch on the problematic systems?
HowTo test the patch (patch attached):
Download nagios-3.0a2.tar.gz and nagios-3.0a2.patch to the home directory
tar xzf nagios-3.0a2.tar.gz
cd nagios-3.0a2
patch patch -p0 < ../nagios-3.0a2.patch
./configure
make all
sudo make install install-config
root$ /usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg
Best regards
Herbert Straub
--=_5t2j24cnj5ub
Content-Type: text/x-patch;
charset=UTF-8;
name="nagios-3.0a2.patch"
Content-Disposition: attachment;
filename="nagios-3.0a2.patch"
Content-Transfer-Encoding: quoted-printable
--- base/utils.c.orig=092007-03-30 12:34:25.000000000 +0200
+++ base/utils.c=092007-03-30 12:34:22.000000000 +0200
@@ -2941,7 +2941,7 @@
=09printf("get_raw_command_line() start\n");
#endif
#ifdef DEBUG1
-=09printf("\tInput: %s\n",cmd);
+=09printf("\tInput: %s\n",cmd_ptr);
#endif
=20
=09/* clear the argv macros */
@@ -5981,14 +5981,14 @@
=09=09=09/* if this is the current bucket, use its full value + weighted % =
of last bucket */
=09=09=09if(x=3D=3D0){
=09=09=09=09right_value=3Dthis_bucket_value;
-=09=09=09=09left_value=3D(int)round(last_bucket_value * last_bucket_weight)=
;
-=09=09=09=09bucket_value=3D(int)(this_bucket_value + round(last_bucket_valu=
e * last_bucket_weight));
+=09=09=09=09left_value=3D(int)floor(last_bucket_value * last_bucket_weight)=
;
+=09=09=09=09bucket_value=3D(int)(this_bucket_value + floor(last_bucket_valu=
e * last_bucket_weight));
=09=09=09=09}
=09=09=09/* otherwise use weighted % of this and last bucket */
=09=09=09else{
-=09=09=09=09right_value=3D(int)round(this_bucket_value * this_bucket_weight=
);
-=09=09=09=09left_value=3D(int)round(last_bucket_value * last_bucket_weight)=
;
-=09=09=09=09bucket_value=3D(int)(round(this_bucket_value * this_bucket_weig=
ht) + round(last_bucket_value * last_bucket_weight));
+=09=09=09=09right_value=3D(int)floor(this_bucket_value * this_bucket_weight=
);
+=09=09=09=09left_value=3D(int)floor(last_bucket_value * last_bucket_weight)=
;
+=09=09=09=09bucket_value=3D(int)(floor(this_bucket_value * this_bucket_weig=
ht) + floor(last_bucket_value * last_bucket_weight));
=09=09=09=09}
=20
=09=09=09/* 1 minute stats */
--=_5t2j24cnj5ub--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
--=_5t2j24cnj5ub
Content-Type: text/plain;
charset=ISO-8859-1;
DelSp="Yes";
format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Quoting Herbert Straub :
> Anyway, please test the situation and report the situation.
The patch works also on Ubuntu Warty and there are no more
segmentation faults. My testresults for problematic systems Debian
Sarge und Ubuntu Warty OK. Matthias Flittner has posted a SIGSEGV
problem in this thread and Hendrik has posted a list, which contains
one other people, who has a SIGSEGV detected (also on Debian Sarge).
Would it be possible do test the patch on the problematic systems?
HowTo test the patch (patch attached):
Download nagios-3.0a2.tar.gz and nagios-3.0a2.patch to the home directory
tar xzf nagios-3.0a2.tar.gz
cd nagios-3.0a2
patch patch -p0 < ../nagios-3.0a2.patch
./configure
make all
sudo make install install-config
root$ /usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg
Best regards
Herbert Straub
--=_5t2j24cnj5ub
Content-Type: text/x-patch;
charset=UTF-8;
name="nagios-3.0a2.patch"
Content-Disposition: attachment;
filename="nagios-3.0a2.patch"
Content-Transfer-Encoding: quoted-printable
--- base/utils.c.orig=092007-03-30 12:34:25.000000000 +0200
+++ base/utils.c=092007-03-30 12:34:22.000000000 +0200
@@ -2941,7 +2941,7 @@
=09printf("get_raw_command_line() start\n");
#endif
#ifdef DEBUG1
-=09printf("\tInput: %s\n",cmd);
+=09printf("\tInput: %s\n",cmd_ptr);
#endif
=20
=09/* clear the argv macros */
@@ -5981,14 +5981,14 @@
=09=09=09/* if this is the current bucket, use its full value + weighted % =
of last bucket */
=09=09=09if(x=3D=3D0){
=09=09=09=09right_value=3Dthis_bucket_value;
-=09=09=09=09left_value=3D(int)round(last_bucket_value * last_bucket_weight)=
;
-=09=09=09=09bucket_value=3D(int)(this_bucket_value + round(last_bucket_valu=
e * last_bucket_weight));
+=09=09=09=09left_value=3D(int)floor(last_bucket_value * last_bucket_weight)=
;
+=09=09=09=09bucket_value=3D(int)(this_bucket_value + floor(last_bucket_valu=
e * last_bucket_weight));
=09=09=09=09}
=09=09=09/* otherwise use weighted % of this and last bucket */
=09=09=09else{
-=09=09=09=09right_value=3D(int)round(this_bucket_value * this_bucket_weight=
);
-=09=09=09=09left_value=3D(int)round(last_bucket_value * last_bucket_weight)=
;
-=09=09=09=09bucket_value=3D(int)(round(this_bucket_value * this_bucket_weig=
ht) + round(last_bucket_value * last_bucket_weight));
+=09=09=09=09right_value=3D(int)floor(this_bucket_value * this_bucket_weight=
);
+=09=09=09=09left_value=3D(int)floor(last_bucket_value * last_bucket_weight)=
;
+=09=09=09=09bucket_value=3D(int)(floor(this_bucket_value * this_bucket_weig=
ht) + floor(last_bucket_value * last_bucket_weight));
=09=09=09=09}
=20
=09=09=09/* 1 minute stats */
--=_5t2j24cnj5ub--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]