10.3 server crashes with a non-debug assertion failure when it starts on the attached datadir.
The datadir was created on the current 10.0 server as a part of the undo-upgrade scenario:
- start the current 10.0 server;
- create some tables and run some DML on them;
- kill the server during operation (with SIGKILL);
- restart the server with innodb-force-recovery=3, no client activity;
- shutdown the server normally;
Then the current 10.3 server is started on the same datadir. It starts, but crashes immediately afterwards as below.
10.3 b52bb6eb82db8
|
2018-06-12 18:15:28 0x7fb1809ea700 InnoDB: Assertion failure in file /data/src/10.3/storage/innobase/trx/trx0purge.cc line 121
|
InnoDB: Failing assertion: purge_sys.tail.commit <= purge_sys.rseg->last_commit
|
|
#5 0x00007fb1a1634448 in __GI_abort () at abort.c:89
|
#6 0x00007fb1a44f44fb in ut_dbg_assertion_failed (expr=0x7fb1a4b6b0c8 "purge_sys.tail.commit <= purge_sys.rseg->last_commit", file=0x7fb1a4b6af80 "/data/src/10.3/storage/innobase/trx/trx0purge.cc", line=121) at /data/src/10.3/storage/innobase/ut/ut0dbg.cc:61
|
#7 0x00007fb1a44c2dfb in TrxUndoRsegsIterator::set_next (this=0x7fb1a530c0a0 <purge_sys+416>) at /data/src/10.3/storage/innobase/trx/trx0purge.cc:121
|
#8 0x00007fb1a44c0d4b in trx_purge_choose_next_log () at /data/src/10.3/storage/innobase/trx/trx0purge.cc:1213
|
#9 0x00007fb1a44c0fa4 in trx_purge_get_next_rec (n_pages_handled=0x7fb1809e9dd0, heap=0x7fb1a85d2780) at /data/src/10.3/storage/innobase/trx/trx0purge.cc:1286
|
#10 0x00007fb1a44c11f5 in trx_purge_fetch_next_rec (roll_ptr=0x7fb17400d8f0, n_pages_handled=0x7fb1809e9dd0, heap=0x7fb1a85d2780) at /data/src/10.3/storage/innobase/trx/trx0purge.cc:1356
|
#11 0x00007fb1a44c151c in trx_purge_attach_undo_recs (n_purge_threads=4) at /data/src/10.3/storage/innobase/trx/trx0purge.cc:1429
|
#12 0x00007fb1a44c19ff in trx_purge (n_purge_threads=4, truncate=false) at /data/src/10.3/storage/innobase/trx/trx0purge.cc:1559
|
#13 0x00007fb1a4492d44 in srv_do_purge (n_total_purged=0x7fb1809e9ed0) at /data/src/10.3/storage/innobase/srv/srv0srv.cc:2583
|
#14 0x00007fb1a4493172 in srv_purge_coordinator_thread (arg=0x0) at /data/src/10.3/storage/innobase/srv/srv0srv.cc:2714
|
#15 0x00007fb1a3293064 in start_thread (arg=0x7fb1809ea700) at pthread_create.c:309
|
#16 0x00007fb1a16e662d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
|
This current test was run with --innodb-page-size=8K --loose-innodb_log_compressed_pages=on --loose-innodb-change-buffering=none, I'm not sure whether any of them important. Naturally, to reproduce the crash on the attached datadir, the server needs to be also started with --innodb-page-size=8K, other two options don't make a difference; otherwise all defaults.
ib_logfile-s are compressed and attached separately just to overcome the 10M limitation in JIRA. I don't know if they are needed, the crash happens with and without them.
Similar-looking crashes upon upgrade from 10.1 have also been observed before.
10.2 doesn't crash on the same datadir.
{"report":{"fcp":1806.3000001907349,"ttfb":591.6999998092651,"pageVisibility":"visible","entityId":66915,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"c0495c11-dd67-4eaa-822f-679f6921bcc7","navigationType":0,"readyForUser":1904.6999998092651,"redirectCount":0,"resourceLoadedEnd":2467.9000000953674,"resourceLoadedStart":619.0999999046326,"resourceTiming":[{"duration":654.9000000953674,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":619.0999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":619.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1274,"responseStart":0,"secureConnectionStart":0},{"duration":655,"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":619.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":619.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1274.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":711.1999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":619.5,"connectEnd":619.5,"connectStart":619.5,"domainLookupEnd":619.5,"domainLookupStart":619.5,"fetchStart":619.5,"redirectEnd":0,"redirectStart":0,"requestStart":619.5,"responseEnd":1330.6999998092651,"responseStart":1330.6999998092651,"secureConnectionStart":619.5},{"duration":811,"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":619.8000001907349,"connectEnd":619.8000001907349,"connectStart":619.8000001907349,"domainLookupEnd":619.8000001907349,"domainLookupStart":619.8000001907349,"fetchStart":619.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":619.8000001907349,"responseEnd":1430.8000001907349,"responseStart":1430.8000001907349,"secureConnectionStart":619.8000001907349},{"duration":814.9000000953674,"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":620,"connectEnd":620,"connectStart":620,"domainLookupEnd":620,"domainLookupStart":620,"fetchStart":620,"redirectEnd":0,"redirectStart":0,"requestStart":620,"responseEnd":1434.9000000953674,"responseStart":1434.9000000953674,"secureConnectionStart":620},{"duration":815.3000001907349,"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":620.0999999046326,"connectEnd":620.0999999046326,"connectStart":620.0999999046326,"domainLookupEnd":620.0999999046326,"domainLookupStart":620.0999999046326,"fetchStart":620.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":620.0999999046326,"responseEnd":1435.4000000953674,"responseStart":1435.4000000953674,"secureConnectionStart":620.0999999046326},{"duration":815.3999996185303,"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":620.3000001907349,"connectEnd":620.3000001907349,"connectStart":620.3000001907349,"domainLookupEnd":620.3000001907349,"domainLookupStart":620.3000001907349,"fetchStart":620.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":620.3000001907349,"responseEnd":1435.6999998092651,"responseStart":1435.6999998092651,"secureConnectionStart":620.3000001907349},{"duration":858.0999999046326,"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":620.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":620.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1478.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":815.5999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":620.5999999046326,"connectEnd":620.5999999046326,"connectStart":620.5999999046326,"domainLookupEnd":620.5999999046326,"domainLookupStart":620.5999999046326,"fetchStart":620.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":620.5999999046326,"responseEnd":1436.1999998092651,"responseStart":1436.1999998092651,"secureConnectionStart":620.5999999046326},{"duration":857.8999996185303,"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":620.8000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":620.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1478.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":817.4000000953674,"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":620.9000000953674,"connectEnd":620.9000000953674,"connectStart":620.9000000953674,"domainLookupEnd":620.9000000953674,"domainLookupStart":620.9000000953674,"fetchStart":620.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":620.9000000953674,"responseEnd":1438.3000001907349,"responseStart":1438.3000001907349,"secureConnectionStart":620.9000000953674},{"duration":1584.4000000953674,"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":622.5,"connectEnd":622.5,"connectStart":622.5,"domainLookupEnd":622.5,"domainLookupStart":622.5,"fetchStart":622.5,"redirectEnd":0,"redirectStart":0,"requestStart":622.5,"responseEnd":2206.9000000953674,"responseStart":2206.9000000953674,"secureConnectionStart":622.5},{"duration":1845.3000001907349,"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":622.5999999046326,"connectEnd":622.5999999046326,"connectStart":622.5999999046326,"domainLookupEnd":622.5999999046326,"domainLookupStart":622.5999999046326,"fetchStart":622.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":622.5999999046326,"responseEnd":2467.9000000953674,"responseStart":2467.9000000953674,"secureConnectionStart":622.5999999046326},{"duration":759.5999999046326,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1490.9000000953674,"connectEnd":1490.9000000953674,"connectStart":1490.9000000953674,"domainLookupEnd":1490.9000000953674,"domainLookupStart":1490.9000000953674,"fetchStart":1490.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1490.9000000953674,"responseEnd":2250.5,"responseStart":2250.5,"secureConnectionStart":1490.9000000953674},{"duration":755.7000002861023,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1798.6999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1798.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2554.4000000953674,"responseStart":0,"secureConnectionStart":0}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":397,"responseStart":592,"responseEnd":597,"domLoading":617,"domInteractive":2501,"domContentLoadedEventStart":2501,"domContentLoadedEventEnd":2550,"domComplete":3218,"loadEventStart":3218,"loadEventEnd":3219,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2475.9000000953674},{"name":"bigPipe.sidebar-id.end","time":2476.800000190735},{"name":"bigPipe.activity-panel-pipe-id.start","time":2476.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":2479.199999809265},{"name":"activityTabFullyLoaded","time":2567.5}],"measures":[],"correlationId":"51e38596c332a7","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":131,"dbReadsTimeInMs":27,"dbConnsTimeInMs":38,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
We may have to introduce trx_rseg_t::old_insert_cached and some separate mechanism that will guarantee that old insert_undo pages from before the upgrade to 10.3 (or later) will eventually be freed, without interfering with the purge of transaction history.