Bug #31817 NMAS agent dies in the SHOW MASTER LOGS handling on a 4.1 server
Submitted: 24 Oct 2007 15:31 Modified: 22 Nov 2007 19:59
Reporter: Scott Noyes Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S3 (Non-critical)
Version:1.2.0.7657 OS:Solaris
Assigned to: Jan Kneschke CPU Architecture:Any

[24 Oct 2007 15:31] Scott Noyes
Description:
Running a monitoring agent against a 4.1 server fails if not in debug mode. When run in the foreground, causes a core dump. GDB output is as follows:

warning: core file may not match specified executable file.
Core was generated by `/opt/mysql/network/agent/lib/mysql-service-agent/mysql-service-agent -f /opt/my'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /opt/mysql/network/agent/lib/mysql-service-agent/libgthread-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /opt/mysql/network/agent/lib/mysql-service-agent/libgthread-2.0.so.0
Reading symbols from /usr/lib/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/librt.so.1
Reading symbols from /opt/mysql/network/agent/lib/mysql-service-agent/libglib-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /opt/mysql/network/agent/lib/mysql-service-agent/libglib-2.0.so.0
Reading symbols from /usr/lib/libgen.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgen.so.1
Reading symbols from /usr/lib/libsocket.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/lib/libnsl.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libm.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libm.so.1
Reading symbols from /opt/mysql/network/agent/lib/mysql-service-agent/libcurl.so.3...(no debugging symbols found)...done.
Loaded symbols for /opt/mysql/network/agent/lib/mysql-service-agent/libcurl.so.3
Reading symbols from /usr/lib/libdl.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /opt/mysql/network/agent/lib/mysql-service-agent/libpcre.so.0...(no debugging symbols found)...done.
Loaded symbols for /opt/mysql/network/agent/lib/mysql-service-agent/libpcre.so.0
Reading symbols from /opt/mysql/network/agent/lib/mysql-service-agent/libxml2.so.2...(no debugging symbols found)...done.
Loaded symbols for /opt/mysql/network/agent/lib/mysql-service-agent/libxml2.so.2
Reading symbols from /usr/lib/libpthread.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /usr/lib/libkstat.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libkstat.so.1
Reading symbols from /usr/lib/libc.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/lib/libaio.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libaio.so.1
Reading symbols from /usr/lib/libmd5.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libmd5.so.1
Reading symbols from /usr/lib/libmp.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/lib/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/platform/SUNW,Sun-Fire-480R/lib/libc_psr.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/platform/SUNW,Sun-Fire-480R/lib/libc_psr.so.1
Reading symbols from /usr/lib/libthread.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libthread.so.1
Reading symbols from /usr/lib/nss_files.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/nss_files.so.1
#0  0xfed344e8 in strlen () from /usr/lib/libc.so.1
(gdb) backtrace full;
No symbol table is loaded.  Use the "file" command.
(gdb) backtrace full
#0  0xfed344e8 in strlen () from /usr/lib/libc.so.1
No symbol table info available.
#1  0xff2f1a04 in _g_gnulib_vasnprintf ()
   from /opt/mysql/network/agent/lib/mysql-service-agent/libglib-2.0.so.0
No symbol table info available.
#2  0xff2f3a4c in _g_gnulib_vasprintf ()
   from /opt/mysql/network/agent/lib/mysql-service-agent/libglib-2.0.so.0
No symbol table info available.
#3  0xff2ec300 in g_vasprintf ()
   from /opt/mysql/network/agent/lib/mysql-service-agent/libglib-2.0.so.0
No symbol table info available.
#4  0xff2d48f4 in g_strdup_vprintf ()
   from /opt/mysql/network/agent/lib/mysql-service-agent/libglib-2.0.so.0
No symbol table info available.
#5  0xff2c1554 in g_logv ()
   from /opt/mysql/network/agent/lib/mysql-service-agent/libglib-2.0.so.0
No symbol table info available.
#6  0x00046a50 in g_message ()
No symbol table info available.
#7  0x00046f50 in get_data_items_mysql_query_keys ()
No symbol table info available.
#8  0x000478b8 in get_data_items_mysql_instance ()
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#9  0xff2a3874 in g_hash_table_foreach ()
   from /opt/mysql/network/agent/lib/mysql-service-agent/libglib-2.0.so.0
No symbol table info available.
#10 0x00047e4c in get_data_items_mysql ()
No symbol table info available.
#11 0x00042940 in heartbeat_thread ()
No symbol table info available.
#12 0x000433dc in main_cmdline ()
No symbol table info available.
#13 0x000434a8 in main ()
No symbol table info available.

How to repeat:
Connect NMAS 1.2 to a 4.1 server.

Suggested fix:
Patch handling for SHOW MASTER LOGS.
[24 Oct 2007 15:36] Jan Kneschke
get_data_items_mysql_query_keys() has 3 g_message() calls. One was handling SHOW MASTER LOGS on 4.1 servers and printing a appropriate debug message.

Workaround: set log-level to critical or warning.
[24 Oct 2007 15:39] Jan Kneschke
fixed in [7852]
[22 Nov 2007 19:59] Peter Lavin
Added to the changelog for version 1.2.