mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
BUG#40704 main.events_restart fails sporadically in pushbuild: "server has gone away"
mysqltest command 'shutdown_server' is supposed to shutdown the server and wait for it to be gone, and kill it when timeout. But because the arguments passed to my_kill were in the wrong order, 'shutdown_server' does not wait nor kill the server at all. So after 'shutdown_server', the server is still running, and the server may still accepting connections.
This commit is contained in:
@@ -4177,9 +4177,9 @@ void do_shutdown_server(struct st_command *command)
|
|||||||
|
|
||||||
/* Check that server dies */
|
/* Check that server dies */
|
||||||
while(timeout--){
|
while(timeout--){
|
||||||
if (my_kill(0, pid) < 0){
|
if (my_kill(pid, 0) < 0){
|
||||||
DBUG_PRINT("info", ("Process %d does not exist anymore", pid));
|
DBUG_PRINT("info", ("Process %d does not exist anymore", pid));
|
||||||
break;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
DBUG_PRINT("info", ("Sleeping, timeout: %d", timeout));
|
DBUG_PRINT("info", ("Sleeping, timeout: %d", timeout));
|
||||||
my_sleep(1000000L);
|
my_sleep(1000000L);
|
||||||
@@ -4187,7 +4187,7 @@ void do_shutdown_server(struct st_command *command)
|
|||||||
|
|
||||||
/* Kill the server */
|
/* Kill the server */
|
||||||
DBUG_PRINT("info", ("Killing server, pid: %d", pid));
|
DBUG_PRINT("info", ("Killing server, pid: %d", pid));
|
||||||
(void)my_kill(9, pid);
|
(void)my_kill(pid, 9);
|
||||||
|
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
|
|
||||||
|
@@ -102,6 +102,7 @@ INSERT INTO global_suppressions VALUES
|
|||||||
("Failed to open log"),
|
("Failed to open log"),
|
||||||
("Failed to open the existing master info file"),
|
("Failed to open the existing master info file"),
|
||||||
("Forcing shutdown of [0-9]* plugins"),
|
("Forcing shutdown of [0-9]* plugins"),
|
||||||
|
("Forcing close of thread"),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Due to timing issues, it might be that this warning
|
Due to timing issues, it might be that this warning
|
||||||
|
@@ -9,9 +9,6 @@ EOF
|
|||||||
# it 10 seconds to die before zapping it
|
# it 10 seconds to die before zapping it
|
||||||
shutdown_server 10;
|
shutdown_server 10;
|
||||||
|
|
||||||
# Check server is gone
|
|
||||||
--source include/wait_until_disconnected.inc
|
|
||||||
|
|
||||||
# Write file to make mysql-test-run.pl start up the server again
|
# Write file to make mysql-test-run.pl start up the server again
|
||||||
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
restart
|
restart
|
||||||
|
Reference in New Issue
Block a user