https://qa.mandrakesoft.com/show_bug.cgi?id=1417





------- Additional Comments From [EMAIL PROTECTED]  2003-02-15 01:41 
-------
Created an attachment (id=180)
 --> (https://qa.mandrakesoft.com/attachment.cgi?id=180&action=view)
Fix illegal memory access in mysql_check.c

Oh, of course, I tried without additional parameters first:

  $ cd /usr/lib/nagios/plugins/
  $ ./check_mysql 
  Can't connect to MySQL server on '127.0.0.1' (111)

I only tried with parameters after that (btw, error 111 "can't connect" is
expected because I am running with skip-networking and using 127.0.0.1 tries to
use a TCP socket). Btw, this was with glibc-2.3.1-7mdk.

I just updated (by hand) everything to be more like your versions:

  $ rpm -q nagios-plugins libmysql10 glibc MySQL 
  nagios-plugins-1.3.0-0.beta2.4mdk
  libmysql10-3.23.55-1mdk
  glibc-2.3.1-9mdk
  MySQL-4.0.10-1mdk

and now I get the same problem. Sorry about misleading you. It was urpmi which
preferred to install the older nagios-plugins-1.3b1-2mdk.i586 instead of the
current nagios-plugins-1.3.0-0.beta2.4mdk.i586 and I did not look closely
enough to notice that this was not a newer, but older version.

Hm. I just had a look at the source code check_mysql.c (of
nagios-plugins-1.3.0-0.beta2.2mdk, I was unable to find the SRPM for
beta2.4mdk) and got a shiver. Has a lot of logical errors. The segfault is
because it calls is_intnonneg() on a non-existing argument.

I attached a patch which fixes that. Can you apply the patch and try again? If 
not, you can test if this was your problem this way: Try calling

  $ ./check_mysql a.-b
  Invalid host nameUsage: check_mysql [-d database] [-H host] [-P port] [-u
user] [-p password]
       check_mysql --help
       check_mysql --version

This should give an error, because it exits before the bug. Alternatively
specify all arguments (the relevant is the last one):

  $ ./check_mysql localhost user password db 3306
  Uptime: 6894  Threads: 1  Questions: 5  Slow queries: 0  Opens: 6  Flush
tables: 1  Open tables: 0  Queries per second avg: 0.001

Oden, can you care about getting the patch upstream? I don't use this package
nor know anything about it (and after looking at the source, I'll stay with
"mon" ;-). I just looked into the matter because I am familiar with  MySQL.


PS: Hm. This package requires a lot of stuff which is only needed if I really
want to monitor the resp. software. For example, I do not have samba installed,
but installing nagios-plugins required the samba client library (same for
postgre, snmp, radius, ...). Not nice, if I'd run it on a server (I like to
keep servers to a minimal install).




------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



------- Reminder: -------
assigned_to: [EMAIL PROTECTED]
status: UNCONFIRMED
creation_date: 
description: 
I don't know, but I suspect it has to do with recent MySQL changes. If MySQL 
v4.x is due to 9.1 I belive many packages has to be rebuilt against it.

Reply via email to