Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
10.8(EOL) , 10.9(EOL) , 10.10(EOL) , 10.11 , 11.0(EOL) , 11.1(EOL) , 11.2(EOL) , 11.3(EOL)
mleich provided an rr replay trace where encryption_crypt() hits SIGSEGV because it is being invoked with *dlen==0 :
#0 0x000055d2158ee6b8 in log_decrypt_buf (iv=iv@entry=0x7ffcb3d01710 "",
buf=buf@entry=0x7ffcb3cfd645 "\037\002\347", ' ' <repeats 110 times>, "qul", ' ' <repeats 57 times>, "\220\b\\\b(\a\364\a\300\a\214\aX\a$\006\360\006\274\006\210\006T\006 ", <incomplete sequence \354>...,
data=data@entry=0x7f9c1bffc5db "\241\350G\200Y\202\005\341,~\263\321%\371\071\200Y\202\005\341$\201\214\365\262\277>\260\200@v\214P;\302\373\n!.>\270\207\345]\344\301(\333\327NE\032\360\227z\027\215\256}4\005\236F\362\217\220\036\311?\272", len=len@entry=0) at /data/Server/bb-11.2-MDEV-32452/storage/innobase/log/log0crypt.cc:473
#1 0x000055d2158d8ec3 in recv_ring::copy_if_needed (this=this@entry=0x7ffcb3d01908, iv=iv@entry=0x7ffcb3d01710 "",
tmp=tmp@entry=0x7ffcb3cfd640 "\024\200Y\202\005\037\002\347", ' ' <repeats 110 times>, "qul", ' ' <repeats 57 times>, "\220\b\\\b(\a\364\a\300\a\214\aX\a$\006\360\006\274\006\210\006"..., start=...,
start@entry=..., len=len@entry=0) at /data/Server/bb-11.2-MDEV-32452/storage/innobase/log/log0recv.cc:2334
#2 0x000055d2158ebcc0 in recv_sys_t::parse<recv_ring, true> (this=this@entry=0x55d2167df780 <recv_sys>, l=..., if_exists=if_exists@entry=false) at /usr/include/c++/9/bits/stl_tree.h:348
#3 0x000055d2158ed421 in recv_sys_t::parse_pmem<true> (if_exists=if_exists@entry=false) at /data/Server/bb-11.2-MDEV-32452/storage/innobase/log/log0recv.cc:2211
#4 0x000055d2158d5f36 in recv_scan_log (last_phase=last_phase@entry=false) at /data/Server/bb-11.2-MDEV-32452/storage/innobase/log/log0recv.cc:4060
#5 0x000055d2158d6c88 in recv_recovery_from_checkpoint_start () at /data/Server/bb-11.2-MDEV-32452/storage/innobase/log/log0recv.cc:4489
#6 0x000055d215a30590 in srv_start (create_new_db=<optimized out>) at /data/Server/bb-11.2-MDEV-32452/storage/innobase/srv/srv0start.cc:1523
#7 0x000055d215836ccf in innodb_init (p=<optimized out>) at /data/Server/bb-11.2-MDEV-32452/storage/innobase/handler/ha_innodb.cc:4166
I was not able to reproduce this crash with the 2 copies of a data directory that I found in the environment. However, I think that the following patch should fix this:
diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc
index f479428d987..ac4a68a0569 100644
--- a/storage/innobase/log/log0recv.cc
+++ b/storage/innobase/log/log0recv.cc
@@ -2409,7 +2409,7 @@ struct recv_ring : public recv_buf
{
const size_t s(*this - start);
ut_ad(s + len <= srv_page_size);
- if (!log_sys.is_encrypted())
+ if (!len || !log_sys.is_encrypted())
{
if (start.ptr + s == ptr && ptr + len <= end())
return ptr;
A corresponding condition exists in recv_buf::copy_if_needed() . That is, if there is no actual payload in a MDEV-14425 redo log record, nothing needs to be encrypted. The page numbers and file names are never encrypted. For an INIT_PAGE or FREE_PAGE record, we only need to know the page identifier, nothing else.
is caused by
MDEV-14425
Change the InnoDB redo log format to reduce write amplification
Closed
{"report":{"fcp":1202.0999999046326,"ttfb":275.7999999523163,"pageVisibility":"visible","entityId":126312,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"4a446908-9b1d-45c0-b958-cbc4516ad337","navigationType":0,"readyForUser":1276.5999999046326,"redirectCount":0,"resourceLoadedEnd":1599.1999999284744,"resourceLoadedStart":281.1999999284744,"resourceTiming":[{"duration":430.7000000476837,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":281.1999999284744,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":281.1999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":711.8999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":430.6999999284744,"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":281.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":281.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":712.1999999284744,"responseStart":0,"secureConnectionStart":0},{"duration":455.8000000715256,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":281.59999990463257,"connectEnd":281.59999990463257,"connectStart":281.59999990463257,"domainLookupEnd":281.59999990463257,"domainLookupStart":281.59999990463257,"fetchStart":281.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":281.59999990463257,"responseEnd":737.3999999761581,"responseStart":737.3999999761581,"secureConnectionStart":281.59999990463257},{"duration":549.3999999761581,"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":281.7999999523163,"connectEnd":281.7999999523163,"connectStart":281.7999999523163,"domainLookupEnd":281.7999999523163,"domainLookupStart":281.7999999523163,"fetchStart":281.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":281.7999999523163,"responseEnd":831.1999999284744,"responseStart":831.1999999284744,"secureConnectionStart":281.7999999523163},{"duration":553.2999999523163,"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":282,"connectEnd":282,"connectStart":282,"domainLookupEnd":282,"domainLookupStart":282,"fetchStart":282,"redirectEnd":0,"redirectStart":0,"requestStart":282,"responseEnd":835.2999999523163,"responseStart":835.2999999523163,"secureConnectionStart":282},{"duration":553.6000000238419,"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":282.1999999284744,"connectEnd":282.1999999284744,"connectStart":282.1999999284744,"domainLookupEnd":282.1999999284744,"domainLookupStart":282.1999999284744,"fetchStart":282.1999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":282.1999999284744,"responseEnd":835.7999999523163,"responseStart":835.7999999523163,"secureConnectionStart":282.1999999284744},{"duration":553.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":282.2999999523163,"connectEnd":282.2999999523163,"connectStart":282.2999999523163,"domainLookupEnd":282.2999999523163,"domainLookupStart":282.2999999523163,"fetchStart":282.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":282.2999999523163,"responseEnd":836.0999999046326,"responseStart":836.0999999046326,"secureConnectionStart":282.2999999523163},{"duration":600.1999999284744,"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":282.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":282.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":882.6999999284744,"responseStart":0,"secureConnectionStart":0},{"duration":554.8999999761581,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":282.6999999284744,"connectEnd":282.6999999284744,"connectStart":282.6999999284744,"domainLookupEnd":282.6999999284744,"domainLookupStart":282.6999999284744,"fetchStart":282.6999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":282.6999999284744,"responseEnd":837.5999999046326,"responseStart":837.5999999046326,"secureConnectionStart":282.6999999284744},{"duration":600,"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":282.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":282.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":882.8999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":555.2999999523163,"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":283,"connectEnd":283,"connectStart":283,"domainLookupEnd":283,"domainLookupStart":283,"fetchStart":283,"redirectEnd":0,"redirectStart":0,"requestStart":283,"responseEnd":838.2999999523163,"responseStart":838.2999999523163,"secureConnectionStart":283},{"duration":1083.2000000476837,"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":283.7999999523163,"connectEnd":283.7999999523163,"connectStart":283.7999999523163,"domainLookupEnd":283.7999999523163,"domainLookupStart":283.7999999523163,"fetchStart":283.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":283.7999999523163,"responseEnd":1367,"responseStart":1367,"secureConnectionStart":283.7999999523163},{"duration":1311.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":287.89999997615814,"connectEnd":287.89999997615814,"connectStart":287.89999997615814,"domainLookupEnd":287.89999997615814,"domainLookupStart":287.89999997615814,"fetchStart":287.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":287.89999997615814,"responseEnd":1599.1999999284744,"responseStart":1599.1999999284744,"secureConnectionStart":287.89999997615814},{"duration":483.3000000715256,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":913.1999999284744,"connectEnd":913.1999999284744,"connectStart":913.1999999284744,"domainLookupEnd":913.1999999284744,"domainLookupStart":913.1999999284744,"fetchStart":913.1999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":913.1999999284744,"responseEnd":1396.5,"responseStart":1396.5,"secureConnectionStart":913.1999999284744},{"duration":446.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1194.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1194.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1641.2999999523163,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":123,"responseStart":276,"responseEnd":280,"domLoading":279,"domInteractive":1647,"domContentLoadedEventStart":1647,"domContentLoadedEventEnd":1687,"domComplete":2954,"loadEventStart":2954,"loadEventEnd":2956,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1606.2999999523163},{"name":"bigPipe.sidebar-id.end","time":1607.1999999284744},{"name":"bigPipe.activity-panel-pipe-id.start","time":1607.3999999761581},{"name":"bigPipe.activity-panel-pipe-id.end","time":1609.8999999761581},{"name":"activityTabFullyLoaded","time":1693.2999999523163}],"measures":[],"correlationId":"c13bc6d1122a97","effectiveType":"4g","downlink":9.4,"rtt":0,"serverDuration":95,"dbReadsTimeInMs":11,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}