Bug #55003 Mtr does not get core dump information in next-mr and related trees.
Submitted: 5 Jul 2010 14:59 Modified: 12 Jan 2011 11:53
Reporter: Alfranio Tavares Correia Junior Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version:next-mr OS:Any
Assigned to: Bjørn Munch CPU Architecture:Any
Tags: core dumps, executable format, test case

[5 Jul 2010 14:59] Alfranio Tavares Correia Junior
Description:
1 - mysql-next-mr and related trees (e.g. mysql-next-mr-merge, mysql-next-mr-merge-rpl) do not extract core dump information.

-saving '<mypath>/mysql-next-mr/mysql-test/var/log/binlog.crash_test-row/' to '<mypath>/mysql-next-mr/mysql-test/var/log/binlog.crash_test-row/'
- found 'core' (0/5)

Trying 'dbx' to get a backtrace

Trying 'gdb' to get a backtrace

Guessing that core was generated by '<mypath>/mysql-next-mr/scripts/mysqlhotcopy' 
Output from gdb follows. The first stack trace is from the failing thread.
The following stack traces are from all threads (so the failing one is
duplicated).
--------------------------
"<mypath>/mysql-next-mr/scripts/mysqlhotcopy": not in executable format: File format not recognized

2 - mysql-next-mr and related trees do not execute within "ddd"

"<mypath>/mysql-next-mr/mysqld": not in executable format: File format not recognized

How to repeat:
1 - Use the test case below to crash the server.

== suite/binlog/t/crash_test.test ====

source include/have_log_bin.inc;
source include/have_debug.inc;

SET SESSION debug="+d,crash_create_non_critical_before_update_index";
--error 2013
flush logs;

2 - Execute the test case and check the output.

3 - Run the test with "ddd". (Error)

Suggested fix:
Apparently mtr is using the wrong file to get core dump information and start ddd. The correct file should be ../sql/.libs/lt-mysqld.

Check the information above by:

1 - executing ./mtr crash_test --gdb and checking the executable file used.

2 - analyzing the core dump produced by the test case: gdb ../sql/.libs/lt-mysqld --core ./var/log/binlog.crash_test-row/mysqld.1/data/core
[5 Jul 2010 16:05] Alfranio Tavares Correia Junior
The bug only happens when the source is compiled with "HAVE_CMAKE=no".
[11 Oct 2010 11:57] Bjørn Munch
I cannot reproduce this problem. I need more precise description of how MySQL is built and on what platform. I can't seem to build next-mr without cmake.
[12 Nov 2010 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[12 Jan 2011 11:53] Bjørn Munch
There was no feedback and the bug apparently only applied to non-cmake builds which are no longer supported anyway.