[MDEV-7568] STOP SLAVE crashes the server Created: 2015-02-10 Updated: 2015-03-02 Resolved: 2015-03-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Affects Version/s: | 10.0.16 |
| Fix Version/s: | 10.0.17 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Hoang Xuan Phu | Assignee: | Kristian Nielsen |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | multisource, parallelslave, verified | ||
| Environment: |
NixOS on AWS |
||
| Attachments: |
|
| Description |
|
I hope "Critical" is the right priority. It's a crash after all. The crash only happen to one particular replication source (there are 8 in total). This is our production system so it's quite a hassle to run a debug build, but let me know if the information here is not enough an I'll see what I can do. There is no *.err file. Not in the database directory, not anywhere in the filesystem. Here's the crash log:
|
| Comments |
| Comment by Elena Stepanova [ 2015-02-10 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi, Your error log apparently goes to syslog/messages or such, where you copied the stack trace from. Can you copy-paste the whole mysqld output, from server startup and till the crash? Can you describe in more details your replication topology, and which of its participants crashes? Does the slave which crashes also get updated directly, or does it only receive updates from the master? Please attach your cnf file(s) from the master and the slave involved in the crash. After the server restarts after the crash and reconnects to the master, it says which position it restarts replication from. If you can provide the binary log covering this position and some time before, it could also help. Thanks. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Hoang Xuan Phu [ 2015-02-10 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
That log is from journalctl (systemd), the system doesn't have a log file for mysqld, at least not that I know of. The slave server replicates from 8 masters running an assortment of MySQL and MariaDB with different versions. One particular master (let's call it "bad-master") is running MariaDB 10.0.11. Every time I issue STOP SLAVE 'bad-master' on the slave server, the MariaDB process on the slave server crashes. I have attached the config files. For an unknown reason, the slave was lagging a few days behind "bad-master", but Seconds_Behind_Master still shows 0 (may be another bug? IDK). I only found out about this when I see reports of missing data. The binary log in question has expired and is no longer available. Thanks for looking into this. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-02-10 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Do you happen to have any monitoring on the crashing slave? SHOW SLAVE STATUS, SHOW PROCESSLIST and such. Regarding the log, doesn't journalctl have any other records with 'mysqld' in the prefix? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Hoang Xuan Phu [ 2015-02-11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
SHOW SLAVE STATUS said something about waiting for master to send events. Unfortunately I don't have a record of it. There was no more relevant output in the log. My coworker found that the crash stopped after parallel replication is disabled:
Does that ring any bell? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-02-11 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
It's natural since the stack trace indicates that the problem happens in parallel replication code. But we don't have known open crashing bugs in this area, so we'll need to find a way to reproduce it. Have you found the rest of the error log? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Hoang Xuan Phu [ 2015-02-12 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There is no more logs, unless you mean running a debug binary to get more debug output. Meanwhile, I have disabled parallel replication to avoid the crash and repair the broken replications. I might be able to set up a debug system when things calm down a bit. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-02-12 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
So far I wasn't able to reproduce it, I will keep trying. If possible, please provide SHOW ALL SLAVES STATUS from the running slave server, maybe we'll see something about configuration that I'm missing. If it's confidential data, you can upload the output to our ftp.askmonty.org/private. Of course, IPs, server names etc. can be obfuscated. Also, what server package are you using? Are you building from source? If so, please paste your cmake options. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Hoang Xuan Phu [ 2015-02-13 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I have attached slaves-status.txt. The bad master is number 5 (renamed "bad-master"). I'm not sure if it's very useful because currently the server is running without parallel replication. In 2 weeks I expect to be able to duplicate the setup and try parallel replication again. MariaDB is build from source. Here are some relevant build configuration lines. The rest is NixOS boilerplate.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-02-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I was able to reproduce the crash. It happens on slightly different circumstances, at least on my build – not during STOP SLAVE, but during restarting the slave server, – but otherwise it's identical, so it must be the same problem: similar stack trace, multi-source replication setup and parallel replication.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kristian Nielsen [ 2015-02-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Ok, I found it. Here is a patch that fixes it: http://lists.askmonty.org/pipermail/commits/2015-February/007452.html I've pushed the patch to 10.0.17. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-02-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
As you can see above, Kristian has fixed the bug which most likely caused the crash that you observed. Still, we would like to make sure it actually solves the problem for you. You said above that you were going to create a new setup. Would it be possible for you to pick up the fixed sources and try them? If you use the bzr tree, it's already in the tree; if you use source tarballs, I will give you the location of the one with the fix. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Hoang Xuan Phu [ 2015-02-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This is great news. Please point me to a tarball with the fix. I'll find time to try it out. Sorry for the delayed response, it was a big holiday | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kristian Nielsen [ 2015-02-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The patch was pushed to 10.0.17. Elena just wanted to keep the bug open in order to have time to double-check that the originally reported problem is the same as the problem fixed by the patch. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-02-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
phunehehe, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Hoang Xuan Phu [ 2015-02-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Is that the same as the one from https://downloads.mariadb.org/mariadb/10.0.17/? I see the fix in the changelog. Will definitely update and test. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-02-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Right, if your mirror already has 10.0.17 package, please use it. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Hoang Xuan Phu [ 2015-03-02 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This might be good or bad news. The crash is no longer reproducible for me. Not with 10.0.16, not with 10.0.17. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-03-02 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Lets hope it's good news. I will consider the bug fixed for now; if you have any new information later, please let us know. |