[MDEV-7309] Unneccesary error message when shutting down MariaDB Created: 2014-12-12 Updated: 2015-02-06 Resolved: 2015-01-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Platform Debian |
| Affects Version/s: | 5.5.40 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Andrew Berry | Assignee: | Elena Stepanova |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
I'm using MariaDB 5.5.40-0ubuntu0.14.04.1 on Ubuntu 14.04. According to Launchpad bugs are tracked here, so if this is distribution specific let me know where I should file this.
I'm not sure why the error is being thrown, given that the entire point of the command is to shutdown MariaDB. As is, it's confusing when sudo service mysql shutdown / restart throws errors that don't actually reflect an error. |
| Comments |
| Comment by Elena Stepanova [ 2015-01-09 ] | |||||||||||
|
I am not getting the error message with the same package. | |||||||||||
| Comment by Andrew Berry [ 2015-01-09 ] | |||||||||||
|
I think there might be a connection to the size of the database. On a fresh VM I can only replicate this if I run the command with:
Here's the configs, but they are unmodified from what is shipped. | |||||||||||
| Comment by Elena Stepanova [ 2015-01-10 ] | |||||||||||
|
Thanks, now I understand what the problem is. It's important that you run shutdown soon after the server startup. When the server on debian gets started, the startup script exits as soon as the server becomes available. However, before exiting it starts several background jobs (checkups, basically) which can take time and can be done in parallel with normal server activity. Each checkup involves connecting to the server. I think it's a corner case and basically harmless, so I would vote for leaving it as is since tampering with the debian magic often ends up painfully. Please comment if you disagree and think it should be fixed. | |||||||||||
| Comment by Andrew Berry [ 2015-01-12 ] | |||||||||||
|
Where this gets confusing is when other programs are using the service commands to start and shutdown the server. For example, in https://github.com/Lullabot/lmm this comes up often when you check out the wrong mysql branch by mistake. A user will immediately run another checkout command issuing a server stop before the background checks are complete, causing this error. Is there already a way to check for the status of these background jobs outside of the service command? Or a way to start the server so it blocks until the checks are complete? | |||||||||||
| Comment by Elena Stepanova [ 2015-01-14 ] | |||||||||||
|
Hi, These jobs aren't really hardcoded, they are open for fine-tuning by an admin.
So you can turn it off entirely right there. Or, you can go to /etc/mysql/debian-start and reconfigure it any way you prefer:
If you remove sending it to background, I suppose it will work kind of you meant by "it blocks until the checks are complete". Or, if you redirect output of the checks into separate file(s), you can monitor them from there without getting weird messages in the console; etc. | |||||||||||
| Comment by Elena Stepanova [ 2015-01-29 ] | |||||||||||
|
According to the comments above, closing it as not-a-bug for now. Please comment if you disagree. | |||||||||||
| Comment by Andrew Berry [ 2015-02-06 ] | |||||||||||
|
Agreed, this is fine to close. I did find that it was the upgrade_system_tables_if_necessary function that was taking most of the background job time. I will probably fork the startup script into LMM directly so we can tweak the startup commands. Thanks for your help! |