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":2141.5,"ttfb":657.4000000953674,"pageVisibility":"visible","entityId":66915,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"2c72d8c2-5af0-45b7-9b1b-14c5a4f4983c","navigationType":0,"readyForUser":2288.2000000476837,"redirectCount":0,"resourceLoadedEnd":2067.100000143051,"resourceLoadedStart":663.5,"resourceTiming":[{"duration":415,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":663.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":663.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1078.5,"responseStart":0,"secureConnectionStart":0},{"duration":415.09999990463257,"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":663.8000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":663.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1078.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":659,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":664,"connectEnd":664,"connectStart":664,"domainLookupEnd":664,"domainLookupStart":664,"fetchStart":664,"redirectEnd":0,"redirectStart":0,"requestStart":1074.5,"responseEnd":1323,"responseStart":1099.6000001430511,"secureConnectionStart":664},{"duration":979.6000001430511,"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":664.2000000476837,"connectEnd":664.2000000476837,"connectStart":664.2000000476837,"domainLookupEnd":664.2000000476837,"domainLookupStart":664.2000000476837,"fetchStart":664.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1078.1000001430511,"responseEnd":1643.8000001907349,"responseStart":1118.8000001907349,"secureConnectionStart":664.2000000476837},{"duration":443.2000000476837,"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":664.4000000953674,"connectEnd":664.4000000953674,"connectStart":664.4000000953674,"domainLookupEnd":664.4000000953674,"domainLookupStart":664.4000000953674,"fetchStart":664.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1078.4000000953674,"responseEnd":1107.6000001430511,"responseStart":1104.6000001430511,"secureConnectionStart":664.4000000953674},{"duration":442.2000000476837,"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":664.5,"connectEnd":664.5,"connectStart":664.5,"domainLookupEnd":664.5,"domainLookupStart":664.5,"fetchStart":664.5,"redirectEnd":0,"redirectStart":0,"requestStart":1078.3000001907349,"responseEnd":1106.7000000476837,"responseStart":1102.5,"secureConnectionStart":664.5},{"duration":448.7999999523163,"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":664.7000000476837,"connectEnd":664.7000000476837,"connectStart":664.7000000476837,"domainLookupEnd":664.7000000476837,"domainLookupStart":664.7000000476837,"fetchStart":664.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1088.4000000953674,"responseEnd":1113.5,"responseStart":1108.4000000953674,"secureConnectionStart":664.7000000476837},{"duration":414.09999990463257,"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":664.8000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":664.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1078.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":449.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":665,"connectEnd":665,"connectStart":665,"domainLookupEnd":665,"domainLookupStart":665,"fetchStart":665,"redirectEnd":0,"redirectStart":0,"requestStart":1088.9000000953674,"responseEnd":1114.4000000953674,"responseStart":1109.9000000953674,"secureConnectionStart":665},{"duration":421.90000009536743,"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":665.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":665.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1087.1000001430511,"responseStart":0,"secureConnectionStart":0},{"duration":450.59999990463257,"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":665.4000000953674,"connectEnd":665.4000000953674,"connectStart":665.4000000953674,"domainLookupEnd":665.4000000953674,"domainLookupStart":665.4000000953674,"fetchStart":665.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1089,"responseEnd":1116,"responseStart":1111.4000000953674,"secureConnectionStart":665.4000000953674},{"duration":1038.8000001907349,"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":674,"connectEnd":674,"connectStart":674,"domainLookupEnd":674,"domainLookupStart":674,"fetchStart":674,"redirectEnd":0,"redirectStart":0,"requestStart":1539.1000001430511,"responseEnd":1712.8000001907349,"responseStart":1709.8000001907349,"secureConnectionStart":674},{"duration":1388.2999999523163,"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":678.8000001907349,"connectEnd":678.8000001907349,"connectStart":678.8000001907349,"domainLookupEnd":678.8000001907349,"domainLookupStart":678.8000001907349,"fetchStart":678.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":2055.600000143051,"responseEnd":2067.100000143051,"responseStart":2066.4000000953674,"secureConnectionStart":678.8000001907349},{"duration":572.8999998569489,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1455.1000001430511,"connectEnd":1455.1000001430511,"connectStart":1455.1000001430511,"domainLookupEnd":1455.1000001430511,"domainLookupStart":1455.1000001430511,"fetchStart":1455.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":1984.7000000476837,"responseEnd":2028,"responseStart":2026.6000001430511,"secureConnectionStart":1455.1000001430511}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":467,"responseStart":657,"responseEnd":678,"domLoading":662,"domInteractive":2375,"domContentLoadedEventStart":2375,"domContentLoadedEventEnd":2425,"domComplete":3101,"loadEventStart":3101,"loadEventEnd":3102,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2320.7000000476837},{"name":"bigPipe.sidebar-id.end","time":2321.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":2321.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":2330.100000143051},{"name":"activityTabFullyLoaded","time":2447.100000143051}],"measures":[],"correlationId":"83ff72a36a2a2a","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":121,"dbReadsTimeInMs":23,"dbConnsTimeInMs":33,"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.