1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-05 13:16:09 +03:00

Bug #40399 Please make mtr print stack trace after every failure

SIGABRT is sent to relevant processes after a timeout


client/mysqltest.cc:
  Fixed signal handlers to mysqltest actually dumps core
mysql-test/lib/My/CoreDump.pm:
  Added support for dbx
mysql-test/lib/My/SafeProcess.pm:
  Added dump_core to force process to dump core
mysql-test/lib/My/SafeProcess/safe_process.cc:
  Traps SIGABRT and sends this on to child
mysql-test/mysql-test-run.pl:
  When test times out, force core dumps on mysqltest and servers
This commit is contained in:
Bjorn Munch
2009-01-21 10:34:01 +01:00
parent bb42e1ab05
commit 089663f9a7
5 changed files with 108 additions and 9 deletions

View File

@@ -349,13 +349,24 @@ sub start_kill {
{
$pid= $self->{SAFE_PID};
die "Can't kill not started process" unless defined $pid;
$ret= kill(15, $pid);
$ret= kill("TERM", $pid);
}
return $ret;
}
sub dump_core {
my ($self)= @_;
return if IS_WINDOWS;
my $pid= $self->{SAFE_PID};
die "Can't cet core from not started process" unless defined $pid;
_verbose("Sending ABRT to $self");
kill ("ABRT", $pid);
return 1;
}
#
# Kill the process as fast as possible
# and wait for it to return