[MDEV-9242] Innodb reports Assertion failure in file buf0dblwr.cc line 579 Created: 2015-12-07 Updated: 2016-04-29 Resolved: 2016-04-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB, Storage Engine - XtraDB |
| Affects Version/s: | 10.1.10 |
| Fix Version/s: | 10.1.14 |
| Type: | Bug | Priority: | Major |
| Reporter: | chen yuanyuan | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Centos 6.7 x86_64 |
||
| Attachments: |
|
| Sprint: | 10.1.14 |
| Description |
|
I have installed mariadb 10.1.9 in virtualbox with some tables compressed using "ENGINE=Innodb,COLLATE=utf8mb4_bin,page_compressed=1;" in create statements.
Can mariadb automatically recover data in such situations? |
| Comments |
| Comment by Elena Stepanova [ 2015-12-26 ] | |||||
|
Generally yes, InnoDB can often recover data in such situations. It can do it automatically if the damage is not big, or can do it upon request, controlled by innodb_force_recovery option. See MariaDB KB for a short reference on available values, or MySQL manual for a more detailed discussion. However, there are two things that make your case more complicated.
innodb_force_recovery=6 is a really desperate measure, and if InnoDB correctly detects that it's the only option (and is not just being pessimistic), chances on binary recovery are nearly non-existent, the best you can hope for to be able to dump the data and load it into a clean server. Secondly, there is a known upstream issue with high values of innodb_force_recovery: Nevertheless, you can try different innodb_force_recovery values to see if there is any luck with any of them. | |||||
| Comment by chen yuanyuan [ 2015-12-27 ] | |||||
|
Thanks for your explanation. | |||||
| Comment by Elena Stepanova [ 2015-12-29 ] | |||||
|
For the first point, it's the general nasty habit of InnoDB to handle errors by going down with assertion failures. I agree it is ugly and hard to deal with, but that's how it is now, and I doubt it is realistic to fix it everywhere in reasonable time.
For the second point, my guess (and it's really a guess) – the reason why only compressed tables are affected is the same as for everything compressed – it's far more prone to irreparable damage, on more or less obvious reasons. I don't quite understand what you mean by "avoiding the host crash" – you said before that the machine was powered off in the middle of operation, how can it be avoided? Or, if you mean the crash upon recovery, there is only so much damage the system can get – if the data is really, really damaged, the crash is not only unavoidable, but is also the only way to do, because trying to work with damaged data is far more dangerous. In any case, it is just my opinion, I am re-assigning it to jplindst, the InnoDB expert, for further consideration. | |||||
| Comment by Jan Lindström (Inactive) [ 2015-12-30 ] | |||||
|
Hi, This looks like a bug. Can you share the database or some instructions how to repeat ? R: Jan | |||||
| Comment by Jan Lindström (Inactive) [ 2016-04-28 ] | |||||
|
Problem repeated using a customer database. | |||||
| Comment by Jan Lindström (Inactive) [ 2016-04-29 ] | |||||
|
commit 037b78e5ec2e28d0d4573605f7dc8d5e2b36a66f Analysis: When pages in doublewrite buffer are analyzed compressed Fix: Decompress page before checksum is compared. If decompression |