mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug #40399 Please make mtr print stack trace after every failure
SIGABRT is sent to relevant processes after a timeout
This commit is contained in:
@ -464,7 +464,11 @@ sub run_test_server ($$$) {
|
||||
else {
|
||||
mtr_report(" - saving '$worker_savedir/' to '$savedir/'");
|
||||
rename($worker_savedir, $savedir);
|
||||
|
||||
# Move any core files from e.g. mysqltest
|
||||
foreach my $coref (glob("core*"))
|
||||
{
|
||||
move($coref, $savedir);
|
||||
}
|
||||
if ($opt_max_save_core > 0) {
|
||||
# Limit number of core files saved
|
||||
find({ no_chdir => 1,
|
||||
@ -2381,7 +2385,7 @@ sub kill_leftovers ($) {
|
||||
}
|
||||
mtr_report(" - found old pid $pid in '$elem', killing it...");
|
||||
|
||||
my $ret= kill(9, $pid);
|
||||
my $ret= kill("KILL", $pid);
|
||||
if ($ret == 0) {
|
||||
mtr_report(" process did not exist!");
|
||||
next;
|
||||
@ -3283,11 +3287,6 @@ sub run_testcase ($) {
|
||||
# ----------------------------------------------------
|
||||
$test_timeout_proc->kill();
|
||||
|
||||
# ----------------------------------------------------
|
||||
# It's not mysqltest that has exited, kill it
|
||||
# ----------------------------------------------------
|
||||
$test->kill();
|
||||
|
||||
# ----------------------------------------------------
|
||||
# Check if it was a server that died
|
||||
# ----------------------------------------------------
|
||||
@ -3297,10 +3296,30 @@ sub run_testcase ($) {
|
||||
$tinfo->{comment}=
|
||||
"Server $proc failed during test run";
|
||||
|
||||
# ----------------------------------------------------
|
||||
# It's not mysqltest that has exited, kill it
|
||||
# ----------------------------------------------------
|
||||
$test->kill();
|
||||
|
||||
report_failure_and_restart($tinfo);
|
||||
return 1;
|
||||
}
|
||||
|
||||
# Try to dump core for mysqltest and all servers
|
||||
foreach my $proc ($test, started(all_servers()))
|
||||
{
|
||||
mtr_print("Trying to dump core for $proc");
|
||||
if ($proc->dump_core())
|
||||
{
|
||||
$proc->wait_one(20);
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------
|
||||
# It's not mysqltest that has exited, kill it
|
||||
# ----------------------------------------------------
|
||||
$test->kill();
|
||||
|
||||
# ----------------------------------------------------
|
||||
# Check if testcase timer expired
|
||||
# ----------------------------------------------------
|
||||
@ -3319,6 +3338,7 @@ sub run_testcase ($) {
|
||||
}
|
||||
$tinfo->{'timeout'}= testcase_timeout(); # Mark as timeout
|
||||
run_on_all($tinfo, 'analyze-timeout');
|
||||
|
||||
report_failure_and_restart($tinfo);
|
||||
return 1;
|
||||
}
|
||||
@ -4222,7 +4242,7 @@ sub start_servers($) {
|
||||
}
|
||||
else
|
||||
{
|
||||
mysql_install_db($mysqld);
|
||||
mysql_install_db($mysqld); # For versional testing
|
||||
|
||||
mtr_error("Failed to install system db to '$datadir'")
|
||||
unless -d $datadir;
|
||||
|
Reference in New Issue
Block a user