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.
After I power off the machine when mariadb is running,of course its data is corrupted.But what is important is that it reports the following assertion failure during recovery:
2015-12-07 09:33:52 7f6ecb1f1760 InnoDB: Assertion failure in thread 140113830942560 in file buf0dblwr.cc line 579
|
InnoDB: We intentionally generate a memory trap.
|
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
|
InnoDB: If you get repeated assertion failures or crashes, even
|
InnoDB: immediately after the mysqld startup, there may be
|
InnoDB: corruption in the InnoDB tablespace. Please refer to
|
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
|
InnoDB: about forcing recovery.
|
151207 9:33:52 [ERROR] mysqld got signal 6 ;
|
This could be because you hit a bug. It is also possible that this binary
|
or one of the libraries it was linked against is corrupt, improperly built,
|
or misconfigured. This error can also be caused by malfunctioning hardware
|
Can mariadb automatically recover data in such situations?
PS:The full error log is in the attachment.
{"report":{"fcp":1373,"ttfb":331,"pageVisibility":"visible","entityId":54502,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":0.5,"journeyId":"319f660a-e0ac-4818-bf66-3244854b47cb","navigationType":0,"readyForUser":1499.2000000476837,"redirectCount":0,"resourceLoadedEnd":1794,"resourceLoadedStart":343.89999985694885,"resourceTiming":[{"duration":367.80000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":343.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":343.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":711.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":367.89999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":344.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":344.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":712.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":379.10000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":344.39999985694885,"connectEnd":344.39999985694885,"connectStart":344.39999985694885,"domainLookupEnd":344.39999985694885,"domainLookupStart":344.39999985694885,"fetchStart":344.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":344.39999985694885,"responseEnd":723.5,"responseStart":723.5,"secureConnectionStart":344.39999985694885},{"duration":501.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":344.59999990463257,"connectEnd":344.59999990463257,"connectStart":344.59999990463257,"domainLookupEnd":344.59999990463257,"domainLookupStart":344.59999990463257,"fetchStart":344.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":344.59999990463257,"responseEnd":845.8999998569489,"responseStart":845.8999998569489,"secureConnectionStart":344.59999990463257},{"duration":513.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":344.7999999523163,"connectEnd":344.7999999523163,"connectStart":344.7999999523163,"domainLookupEnd":344.7999999523163,"domainLookupStart":344.7999999523163,"fetchStart":344.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":344.7999999523163,"responseEnd":857.8999998569489,"responseStart":857.8999998569489,"secureConnectionStart":344.7999999523163},{"duration":515.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":345,"connectEnd":345,"connectStart":345,"domainLookupEnd":345,"domainLookupStart":345,"fetchStart":345,"redirectEnd":0,"redirectStart":0,"requestStart":345,"responseEnd":860.2999999523163,"responseStart":860.2999999523163,"secureConnectionStart":345},{"duration":516.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":345.09999990463257,"connectEnd":345.09999990463257,"connectStart":345.09999990463257,"domainLookupEnd":345.09999990463257,"domainLookupStart":345.09999990463257,"fetchStart":345.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":345.09999990463257,"responseEnd":861.3999998569489,"responseStart":861.3999998569489,"secureConnectionStart":345.09999990463257},{"duration":573.3999998569489,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":345.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":345.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":918.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":516.4000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":345.39999985694885,"connectEnd":345.39999985694885,"connectStart":345.39999985694885,"domainLookupEnd":345.39999985694885,"domainLookupStart":345.39999985694885,"fetchStart":345.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":345.39999985694885,"responseEnd":861.7999999523163,"responseStart":861.7999999523163,"secureConnectionStart":345.39999985694885},{"duration":573.3999998569489,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":345.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":345.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":918.8999998569489,"responseStart":0,"secureConnectionStart":0},{"duration":517.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":345.7000000476837,"connectEnd":345.7000000476837,"connectStart":345.7000000476837,"domainLookupEnd":345.7000000476837,"domainLookupStart":345.7000000476837,"fetchStart":345.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":345.7000000476837,"responseEnd":863.2000000476837,"responseStart":863.2000000476837,"secureConnectionStart":345.7000000476837},{"duration":1307.8999998569489,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":346.5,"connectEnd":346.5,"connectStart":346.5,"domainLookupEnd":346.5,"domainLookupStart":346.5,"fetchStart":346.5,"redirectEnd":0,"redirectStart":0,"requestStart":346.5,"responseEnd":1654.3999998569489,"responseStart":1654.3999998569489,"secureConnectionStart":346.5},{"duration":1447.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":346.5,"connectEnd":346.5,"connectStart":346.5,"domainLookupEnd":346.5,"domainLookupStart":346.5,"fetchStart":346.5,"redirectEnd":0,"redirectStart":0,"requestStart":346.5,"responseEnd":1794,"responseStart":1794,"secureConnectionStart":346.5},{"duration":734.2000000476837,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":931.3999998569489,"connectEnd":931.3999998569489,"connectStart":931.3999998569489,"domainLookupEnd":931.3999998569489,"domainLookupStart":931.3999998569489,"fetchStart":931.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":931.3999998569489,"responseEnd":1665.5999999046326,"responseStart":1665.5999999046326,"secureConnectionStart":931.3999998569489},{"duration":434.80000019073486,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1361.8999998569489,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1361.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1796.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":278.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1672.5999999046326,"connectEnd":1672.5999999046326,"connectStart":1672.5999999046326,"domainLookupEnd":1672.5999999046326,"domainLookupStart":1672.5999999046326,"fetchStart":1672.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1672.5999999046326,"responseEnd":1950.7999999523163,"responseStart":1950.7999999523163,"secureConnectionStart":1672.5999999046326}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":145,"responseStart":331,"responseEnd":333,"domLoading":341,"domInteractive":1862,"domContentLoadedEventStart":1862,"domContentLoadedEventEnd":1934,"domComplete":2084,"loadEventStart":2084,"loadEventEnd":2088,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1800.3999998569489},{"name":"bigPipe.sidebar-id.end","time":1801.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":1801.3999998569489},{"name":"bigPipe.activity-panel-pipe-id.end","time":1803.2999999523163},{"name":"activityTabFullyLoaded","time":1951.8999998569489}],"measures":[],"correlationId":"2b59247111f49b","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":116,"dbReadsTimeInMs":13,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
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.
First, according to your full log, InnoDB considers this particular corruption really bad:
InnoDB: Also the page in the doublewrite buffer is corrupt.
InnoDB: Cannot continue operation.
InnoDB: You can try to recover the database with the my.cnf
InnoDB: option:
InnoDB: innodb_force_recovery=6
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:
MDEV-8963/MDEV-9121. It is said to be fixed in InnoDB 5.6.27, but if you are using XtraDB (which is default), it is not there yet.Nevertheless, you can try different innodb_force_recovery values to see if there is any luck with any of them.