Bug #82534 mysqld_multi unsafe shutdown
Submitted: 10 Aug 2016 23:35 Modified: 28 Feb 2018 13:47
Reporter: Elena Stepanova Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.5, 5.6, 5.7 OS:Any
Assigned to: CPU Architecture:Any

[10 Aug 2016 23:35] Elena Stepanova
Description:
Filing on behalf of our user (and upon his request), initially reported as 
https://jira.mariadb.org/browse/MDEV-10534

<quote>
/usr/bin/mysld_multi sends the processes intended to shutdown the database servers into the background. This way, when called during the shutdown sequence of the computer, a safe shutdown can not be guaranteed. In fact, if you use e.g. systemd, the background processes will be killed as soon as the script ends, which often isn't enough to even initiate the shutdown sequence of more than one server.

The shutdown part of the script MUST wait for the shutdown process to finish.
For the fix, I just removed the to-the-background part in the script, which might slow the process down a bit, because the servers are stopped in sequence. It wouldn't be so trivial to start the processes in parallel and track them all in perl, so I left it this way.

I originally found this in mysql-5.5, but I decided to post it here, because MariaDB's script has the same problem. Also, maybe somebody will be so nice as to forward this bug to the MySQL-people, because I can't register at the MySQL bugtracker because I refuse to give them all the data they require for an Oracle account, just for a bug report.
<quote>

Please note that the reporter has also offered a patch (one-liner). I'm not pasting it here, because I don't quite agree with it, but you can find it in the original report. 

How to repeat:
I suppose code inspection should be enough.
[11 Aug 2016 5:26] Terje Røsten
FYI: https://dev.mysql.com/doc/refman/5.7/en/server-management-using-systemd.html#systemd-multi...
[31 Jan 2018 13:47] MySQL Verification Team
Hello Elena !!!!!

Thank you for your report. However, you can read in our documentation, especially on this page:

https://dev.mysql.com/doc/refman/5.7/en/using-systemd.html

that when you use systemd , you should not use mysqld_multi script.

Let me know if anything is unclear or if you think that manual should be more explicit.

Thank you, very much.
[1 Mar 2018 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".