[MDEV-20598] Server slow to shutdown if system time goes backwards Created: 2019-09-16  Updated: 2019-10-04  Resolved: 2019-10-04

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.3.15, 10.3.17, 10.3.18
Fix Version/s: N/A

Type: Bug Priority: Blocker
Reporter: Jason Milen Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None

Attachments: Text File mysqld-strace.txt     File mysqld.err    
Issue Links:
Duplicate
duplicates MDEV-17481 mariadb service won't shutdown when i... Closed

 Description   

If the system time goes backwards mysqld takes a very long time to shutdown. This causes a mysqld restart to fail.

root@myhost:~# /etc/init.d/mysqld restart
Shutting down MariaDB.. SUCCESS!
Starting MariaDB.190916 01:06:28 mysqld_safe Logging to '/var/log/mysqld.err'.
190916 01:06:28 mysqld_safe Starting mysqld daemon with databases from /etc/config/mysql_data
 SUCCESS!
root@myhost:~# date $(date +%m%d%H%M%Y.%S -d '50 min ago')
Mon Sep 16 00:17:59 UTC 2019
root@myhost:~# /etc/init.d/mysqld restart
Shutting down MariaDB.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... ERROR!
 ERROR! Failed to stop running server, so refusing to try to start.
root@myhost:~# mysqld --version
mysqld  Ver 10.3.18-MariaDB-log for Linux on x86_64 (Source distribution)
root@myhost:~#

MDEV-20133 states that https://github.com/mysql/mysql-server/commit/6ce62a49d91c493dc0a7dd988858e4929f5ac320 will be handled by MDEV-14154 and we were hoping this would resolve the issue we've seen but those fixes don't seem to address this particular problem.



 Comments   
Comment by Elena Stepanova [ 2019-09-22 ]

Can you acquire a stack trace from the running server while it is performing the long shut down?
Please also paste/attach the server error log (possibly it is a part of syslog/messages on your system).

Comment by Jason Milen [ 2019-10-01 ]

I've attached a mysqld stack trace and the mysqld.err files. The mysqld.log was empty and there were no mysqld logs in the system syslog so you have everything that I have. Please let me know if you need anything further.

The stack trace seems to just stop when the init restart process times out and seems to just kill off mysqld.

Comment by Alice Sherepa [ 2019-10-04 ]

This is most likely the same bug as MDEV-17481, I am closing it for now. Please let us know if the problem will still exist after MDEV-17481's fix, then the bug will be reopened and investigated further

Generated at Thu Feb 08 09:00:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.