[MDEV-8877] Inrecoverable InnoDB/XtraDB database after power failure (hard crash) Created: 2015-09-30 Updated: 2015-11-06 Resolved: 2015-11-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.1.7 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Norbert van Nobelen | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | innodb | ||
| Environment: |
OpenSuse 12.1, ZFS 0.6.5, innodb doublewrite=off (ZFS takes care of consistency). ZFS config: atime=off, compress=lz4, recordsize=8k (to get rid of 16k page unsupported warnings), l2arc, logs on separate SSD devices, database on traditional HD. MariaDB 10.1.7 binary download (https://downloads.mariadb.org/interstitial/mariadb-10.1.7/bintar-linux-glibc_214-x86_64/mariadb-10.1.7-linux-glibc_214-x86_64.tar.gz), compressed and partitioned tables (barracuda file format in use) |
||
| Issue Links: |
|
||||||||
| Description |
|
After a power loss, the InnoDB/XtraDB database is not recoverable. 2015-09-30 20:17:29 140193769776992 [Note] /opt/mariadb-10.1.7-linux-x86_64/bin/mysqld (mysqld 10.1.7-MariaDB-log) starting as process 2319 ... To report this bug, see http://kb.askmonty.org/en/reporting-bugs We will try our best to scrape up some info that will hopefully help Server version: 10.1.7-MariaDB-log Thread pointer: 0x0x0 |
| Comments |
| Comment by Elena Stepanova [ 2015-09-30 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Did you try using innodb_force_recovery as the message in the log suggests? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Norbert van Nobelen [ 2015-10-01 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
No, I will once the database server is available again: Created a snapshot of the corrupt db, and then started over from a backup. It is an estimated 14 day processing run, so I will get back on this once this new run is over. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Norbert van Nobelen [ 2015-10-12 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Second server same issue. No other way to restore the database then from backup. 151012 18:41:47 [Note] InnoDB: Using mutexes to ref count buffer pool pages To report this bug, see http://kb.askmonty.org/en/reporting-bugs We will try our best to scrape up some info that will hopefully help Server version: 10.0.17-MariaDB-log Thread pointer: 0x0x0 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-10-18 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Norbert van Nobelen, Upd: regarding non-functional innodb_force_recovery, it turns out there is an upstream bug https://bugs.mysql.com/bug.php?id=77654 which was brought to our attention in recently filed | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Axel Schwenke [ 2015-10-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
That second case looks like a corruption of either table space or redo log. For the first case the assertion in line 2846 of log0recv.cc is for a garbled redo log block. So at a first glance it looks as if the "atomic writes" guarantee does not hold for ZFS on Linux. Which would make the whole thing a ZFS bug. If the second one is also for a garbled redo log, it might not even be related to the double write buffer setting. Norbert: can you share your my.cnf? Especially what InnoDB flushing method and flush log at trx commit setting you use. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Norbert van Nobelen [ 2015-10-21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@Elana Stepanova: The posted log is generated with innodb_force_recovery=0. Once using 4 or higher the InnoDB is just not loaded anymore and mariadb will start, but just without my database and some errors in the information schema. The stack trace is pretty useless (I realize) since it just tells what is the result of the crash (data loss), but in the sceond case not the cause of the crash. The second machine I have the issue on did not crash, only mariadb crashed. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Norbert van Nobelen [ 2015-10-21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@Axel Schwenke: I have been running MySQL with ZFS for about 6 years now, without any issues, with a well researched ZFS suitable configuration. ZFS is as far as I know the only FS where doublewrite can be turned off since it already takes care of data consistency (atomic). I actually used a backup script which just snapshots the running database without quieting the database for a moment and use the InnoDB recovery to get me a running database again. (Sadly I did not have this script running on these servers at the time of the crashes, else I would have had more chance of saving my data). Please Google on this reported InnoDB failure: There are a few more posts on stackoverflow and other sites with the same crash type: MariaDB crashes (either due to system crash or by itself) and destroys the InnoDB database with it, so it seems to occur in multiple configurations with either ZFS or other FS. My my.cnf on crash 1 (opensuse 12.1, original post) (relevant parts only):
My my.cnf on crash 2 (opensuse 12.3, original post) (relevant parts only):
Sample of the data model (1 unrecoverable table even in Barracuda file format, import ibd file after recovery of the .frm file, table size ~122GB):
About the after crash situation: About the crash cause: Sadly I do not have more logging on the cause of the crash (especially in the second situation). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-10-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
So, we have (at least) two problems here: 1) innodb_force_recovery not working: it might be related https://bugs.mysql.com/bug.php?id=77654 or different. If it's the upstream bug, it's up to you to decide whether we will wait for their bugfix or not, but it seems strange to me that it has been staying open for quite a while by now – not being able to recover the data at all seems as critical as it gets; 2) second crash which was not caused by power failure: apparently we don't have a stack trace from the initial crash, but there is one when InnoDB fails to recover after it, see comments – maybe you will recognize something familiar in here. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2015-10-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
1) Will be fixed on next release, just use innodb_plugin for recovery (not sure if xtradb 5.6.27 is out by then) |