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":3049.699999809265,"ttfb":362.7999997138977,"pageVisibility":"visible","entityId":66915,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"7b43d373-b2a4-4643-95a3-551d83084dc8","navigationType":0,"readyForUser":3176,"redirectCount":0,"resourceLoadedEnd":2714.2999997138977,"resourceLoadedStart":370.90000009536743,"resourceTiming":[{"duration":72,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":370.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":370.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":442.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":72,"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":371.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":371.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":443.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":2160.8999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":371.40000009536743,"connectEnd":371.40000009536743,"connectStart":371.40000009536743,"domainLookupEnd":371.40000009536743,"domainLookupStart":371.40000009536743,"fetchStart":371.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":446.09999990463257,"responseEnd":2532.2999997138977,"responseStart":619.0999999046326,"secureConnectionStart":371.40000009536743},{"duration":2342.699999809265,"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":371.59999990463257,"connectEnd":371.59999990463257,"connectStart":371.59999990463257,"domainLookupEnd":371.59999990463257,"domainLookupStart":371.59999990463257,"fetchStart":371.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":446.2999997138977,"responseEnd":2714.2999997138977,"responseStart":653.5999999046326,"secureConnectionStart":371.59999990463257},{"duration":509,"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":371.69999980926514,"connectEnd":371.69999980926514,"connectStart":371.69999980926514,"domainLookupEnd":371.69999980926514,"domainLookupStart":371.69999980926514,"fetchStart":371.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":446.69999980926514,"responseEnd":880.6999998092651,"responseStart":687.5,"secureConnectionStart":371.69999980926514},{"duration":508.5,"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":371.90000009536743,"connectEnd":371.90000009536743,"connectStart":371.90000009536743,"domainLookupEnd":371.90000009536743,"domainLookupStart":371.90000009536743,"fetchStart":371.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":446.40000009536743,"responseEnd":880.4000000953674,"responseStart":678.4000000953674,"secureConnectionStart":371.90000009536743},{"duration":509.5,"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":372.09999990463257,"connectEnd":372.09999990463257,"connectStart":372.09999990463257,"domainLookupEnd":372.09999990463257,"domainLookupStart":372.09999990463257,"fetchStart":372.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":446.7999997138977,"responseEnd":881.5999999046326,"responseStart":825.9000000953674,"secureConnectionStart":372.09999990463257},{"duration":71.2000002861023,"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":372.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":372.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":443.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":1138.3999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":372.40000009536743,"connectEnd":372.40000009536743,"connectStart":372.40000009536743,"domainLookupEnd":372.40000009536743,"domainLookupStart":372.40000009536743,"fetchStart":372.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":447,"responseEnd":1510.7999997138977,"responseStart":1448,"secureConnectionStart":372.40000009536743},{"duration":72.40000009536743,"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":372.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":372.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":444.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":980.8000001907349,"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":372.69999980926514,"connectEnd":372.69999980926514,"connectStart":372.69999980926514,"domainLookupEnd":372.69999980926514,"domainLookupStart":372.69999980926514,"fetchStart":372.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":447,"responseEnd":1353.5,"responseStart":838,"secureConnectionStart":372.69999980926514},{"duration":2265,"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":380.59999990463257,"connectEnd":380.59999990463257,"connectStart":380.59999990463257,"domainLookupEnd":380.59999990463257,"domainLookupStart":380.59999990463257,"fetchStart":380.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":494.40000009536743,"responseEnd":2645.5999999046326,"responseStart":2630.199999809265,"secureConnectionStart":380.59999990463257},{"duration":2265.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":380.69999980926514,"connectEnd":380.69999980926514,"connectStart":380.69999980926514,"domainLookupEnd":380.69999980926514,"domainLookupStart":380.69999980926514,"fetchStart":380.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":570.7999997138977,"responseEnd":2646.199999809265,"responseStart":2641.5999999046326,"secureConnectionStart":380.69999980926514},{"duration":383.59999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":2682.699999809265,"connectEnd":2682.699999809265,"connectStart":2682.699999809265,"domainLookupEnd":2682.699999809265,"domainLookupStart":2682.699999809265,"fetchStart":2682.699999809265,"redirectEnd":0,"redirectStart":0,"requestStart":2995.199999809265,"responseEnd":3066.2999997138977,"responseStart":3047.5,"secureConnectionStart":2682.699999809265},{"duration":292,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":3003,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":3003,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":3295,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":117,"responseStart":363,"responseEnd":373,"domLoading":369,"domInteractive":3333,"domContentLoadedEventStart":3333,"domContentLoadedEventEnd":3399,"domComplete":4170,"loadEventStart":4170,"loadEventEnd":4171,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":3297.5},{"name":"bigPipe.sidebar-id.end","time":3298.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":3298.7999997138977},{"name":"bigPipe.activity-panel-pipe-id.end","time":3301},{"name":"activityTabFullyLoaded","time":3413.0999999046326}],"measures":[],"correlationId":"47559c2c41f262","effectiveType":"4g","downlink":9.3,"rtt":0,"serverDuration":144,"dbReadsTimeInMs":24,"dbConnsTimeInMs":35,"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.