mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +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:
@ -117,6 +117,16 @@ static void kill_child (void)
|
||||
}
|
||||
|
||||
|
||||
static void handle_abort (int sig)
|
||||
{
|
||||
message("Got signal %d, child_pid: %d, sending ABRT", sig, child_pid);
|
||||
|
||||
if (child_pid > 0) {
|
||||
kill (-child_pid, SIGABRT); // Don't wait for it to terminate
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void handle_signal (int sig)
|
||||
{
|
||||
message("Got signal %d, child_pid: %d", sig, child_pid);
|
||||
@ -144,6 +154,7 @@ int main(int argc, char* const argv[] )
|
||||
signal(SIGTERM, handle_signal);
|
||||
signal(SIGINT, handle_signal);
|
||||
signal(SIGCHLD, handle_signal);
|
||||
signal(SIGABRT, handle_abort);
|
||||
|
||||
sprintf(safe_process_name, "safe_process[%d]", own_pid);
|
||||
|
||||
|
Reference in New Issue
Block a user