mleich produced an rr replay trace where two SET GLOBAL innodb_log_file_size are starting execution at around the same time. The first one succeeded in creating ib_logfile101 and set a log_sys.resize_lsn target, in an attempt to change innodb_log_file_size from 157286400:
SET GLOBAL innodb_log_file_size = 104857600 - 52428800;
|
This operation was terminated by a KILL statement and log_t::resize_abort() was invoked, which correctly reset the log_sys.resize_lsn to 0. However, it failed to delete the ib_logfile101.
A little later, another connection is executing the following:
SET GLOBAL innodb_log_file_size = 104857600;
|
It will fail to create the file ib_logfile101 because the file already exists.
The error handling of this is incorrect; log_sys.resize_lsn will remain at 1, signaling that log resizing is about to start, which is not the case. This will eventually trigger an assertion failure:
#6 0x00007aa08a03b507 in __assert_fail (assertion=0x6119ba250330 "resizing == RETAIN_LATCH || (resizing == RESIZING) == (resize_in_progress() > 1)",
|
file=0x6119ba24fbf0 "/data/Server/10.11-MDEV-35699/storage/innobase/log/log0log.cc", line=0x3d2,
|
function=0x6119ba250388 "lsn_t log_t::write_buf() [with resizing_and_latch resizing = log_t::RESIZING; lsn_t = long unsigned int]") at ./assert/assert.c:103
|
#7 0x00006119b9cff262 in log_t::write_buf<(log_t::resizing_and_latch)2> (this=0x6119bb4dbb40 <log_sys>) at /data/Server/10.11-MDEV-35699/storage/innobase/log/log0log.cc:978
|
#8 log_writer_resizing () at /data/Server/10.11-MDEV-35699/storage/innobase/log/log0log.cc:1196
|
#9 0x00006119b9cfd8de in log_write_up_to (lsn=lsn@entry=0xe0e876, durable=0x1, callback=<optimized out>, callback@entry=0x0) at /data/Server/10.11-MDEV-35699/storage/innobase/log/log0log.cc:1172
|
I was not able to reproduce the latter failure with the following change to a regression test:
diff --git a/mysql-test/suite/innodb/t/log_file_size_online.test b/mysql-test/suite/innodb/t/log_file_size_online.test
|
index bf9f3510592..c50365efe32 100644
|
--- a/mysql-test/suite/innodb/t/log_file_size_online.test
|
+++ b/mysql-test/suite/innodb/t/log_file_size_online.test
|
@@ -36,10 +36,15 @@ SET GLOBAL innodb_log_file_buffering=@save;
|
--error ER_INCORRECT_GLOBAL_LOCAL_VAR,ER_UNKNOWN_SYSTEM_VARIABLE
|
SET GLOBAL innodb_log_file_mmap=OFF;
|
|
+let $datadir= `SELECT @@datadir`;
|
+--write_file $datadir/ib_logfile101
|
+EOF
|
send SET GLOBAL innodb_log_file_size=5242880;
|
|
--connect con1,localhost,root
|
-send UPDATE t SET b='' WHERE a<10;
|
+SET GLOBAL innodb_flush_log_at_trx_commit=1;
|
+UPDATE t SET b='' WHERE a<10;
|
+send commit;
|
|
--connection default
|
reap;
|
The existence of the file would merely cause the test to fail to change the log file size from 4MiB to 5MiB; there was no assertion failure.
{"report":{"fcp":1186.0999999046326,"ttfb":175.90000009536743,"pageVisibility":"visible","entityId":132318,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"83d0cf09-5635-42e3-92cc-9e693031ae52","navigationType":0,"readyForUser":1298.6999998092651,"redirectCount":0,"resourceLoadedEnd":1598.9000000953674,"resourceLoadedStart":182.30000019073486,"resourceTiming":[{"duration":478.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":182.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":182.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":660.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":478.80000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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","startTime":182.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":182.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":661.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":486.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":182.80000019073486,"connectEnd":182.80000019073486,"connectStart":182.80000019073486,"domainLookupEnd":182.80000019073486,"domainLookupStart":182.80000019073486,"fetchStart":182.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":182.80000019073486,"responseEnd":669.5,"responseStart":669.5,"secureConnectionStart":182.80000019073486},{"duration":558.1999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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","startTime":183,"connectEnd":183,"connectStart":183,"domainLookupEnd":183,"domainLookupStart":183,"fetchStart":183,"redirectEnd":0,"redirectStart":0,"requestStart":183,"responseEnd":741.1999998092651,"responseStart":741.1999998092651,"secureConnectionStart":183},{"duration":566.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":183.09999990463257,"connectEnd":183.09999990463257,"connectStart":183.09999990463257,"domainLookupEnd":183.09999990463257,"domainLookupStart":183.09999990463257,"fetchStart":183.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":183.09999990463257,"responseEnd":749.1999998092651,"responseStart":749.1999998092651,"secureConnectionStart":183.09999990463257},{"duration":566.5999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":183.30000019073486,"connectEnd":183.30000019073486,"connectStart":183.30000019073486,"domainLookupEnd":183.30000019073486,"domainLookupStart":183.30000019073486,"fetchStart":183.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":183.30000019073486,"responseEnd":749.9000000953674,"responseStart":749.9000000953674,"secureConnectionStart":183.30000019073486},{"duration":566.8000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":183.5,"connectEnd":183.5,"connectStart":183.5,"domainLookupEnd":183.5,"domainLookupStart":183.5,"fetchStart":183.5,"redirectEnd":0,"redirectStart":0,"requestStart":183.5,"responseEnd":750.3000001907349,"responseStart":750.3000001907349,"secureConnectionStart":183.5},{"duration":646.5999999046326,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":183.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":183.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":830.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":567,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":183.90000009536743,"connectEnd":183.90000009536743,"connectStart":183.90000009536743,"domainLookupEnd":183.90000009536743,"domainLookupStart":183.90000009536743,"fetchStart":183.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":183.90000009536743,"responseEnd":750.9000000953674,"responseStart":750.9000000953674,"secureConnectionStart":183.90000009536743},{"duration":646.5999999046326,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/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":184,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":184,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":830.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":567.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/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":184.09999990463257,"connectEnd":184.09999990463257,"connectStart":184.09999990463257,"domainLookupEnd":184.09999990463257,"domainLookupStart":184.09999990463257,"fetchStart":184.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":184.09999990463257,"responseEnd":751.4000000953674,"responseStart":751.4000000953674,"secureConnectionStart":184.09999990463257},{"duration":1256.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":185.09999990463257,"connectEnd":185.09999990463257,"connectStart":185.09999990463257,"domainLookupEnd":185.09999990463257,"domainLookupStart":185.09999990463257,"fetchStart":185.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":185.09999990463257,"responseEnd":1441.4000000953674,"responseStart":1441.4000000953674,"secureConnectionStart":185.09999990463257},{"duration":1413.7000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":185.19999980926514,"connectEnd":185.19999980926514,"connectStart":185.19999980926514,"domainLookupEnd":185.19999980926514,"domainLookupStart":185.19999980926514,"fetchStart":185.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":185.19999980926514,"responseEnd":1598.9000000953674,"responseStart":1598.9000000953674,"secureConnectionStart":185.19999980926514},{"duration":635.6999998092651,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":859,"connectEnd":859,"connectStart":859,"domainLookupEnd":859,"domainLookupStart":859,"fetchStart":859,"redirectEnd":0,"redirectStart":0,"requestStart":859,"responseEnd":1494.6999998092651,"responseStart":1494.6999998092651,"secureConnectionStart":859},{"duration":452,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1173.6999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1173.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1625.6999998092651,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":3,"responseStart":176,"responseEnd":177,"domLoading":179,"domInteractive":1632,"domContentLoadedEventStart":1632,"domContentLoadedEventEnd":1696,"domComplete":2983,"loadEventStart":2983,"loadEventEnd":2984,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1603.6999998092651},{"name":"bigPipe.sidebar-id.end","time":1604.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":1604.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.end","time":1607.1999998092651},{"name":"activityTabFullyLoaded","time":1719.8000001907349}],"measures":[],"correlationId":"4d75f84f829fad","effectiveType":"4g","downlink":9.2,"rtt":0,"serverDuration":105,"dbReadsTimeInMs":13,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}