MDEV-12353 deliberately tries to avoid memory alignment overhead in log_phys_t, storing the stream of log records bytes straight after a header object. But, the code triggers WITH_UBSAN errors:
10.5 e9b3d44c6eef3d7b4944d724ba597035798324ad
|
storage/innobase/log/log0recv.cc:118:71: runtime error: member call on null pointer of type 'struct log_phys_t'
|
storage/innobase/log/log0recv.cc:103:50: runtime error: member access within null pointer of type 'struct log_phys_t'
|
It turns out that we can move the uint16_t len data member to be part of the byte stream that immediately follows the object, and use memcpy to access that. Even on systems whose ABI does not allow unaligned memory access (such as ARM or POWER) there should be no additional overhead (no actual call to memcpy()) if we use my_assume_aligned to explicitly declare the alignment.
The motivation of this tight packing is related to MDEV-19176 and MDEV-21351, and we definitely do not want to waste 6 bytes per redo log snippet due to uint16_t len being padded to 8 bytes.
- is caused by
-
MDEV-12353
Efficient InnoDB redo log record format
-
-
Closed
There are no comments yet on this issue.
{"report":{"fcp":1779,"ttfb":620.7999997138977,"pageVisibility":"visible","entityId":93757,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"c2b0068a-3725-4e87-88e4-8fa0d960aee2","navigationType":0,"readyForUser":1905.6999998092651,"redirectCount":0,"resourceLoadedEnd":1543.7999997138977,"resourceLoadedStart":628.4000000953674,"resourceTiming":[{"duration":310,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":628.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":628.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":938.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":309.90000009536743,"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":628.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":628.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":938.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":624.7999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":628.9000000953674,"connectEnd":628.9000000953674,"connectStart":628.9000000953674,"domainLookupEnd":628.9000000953674,"domainLookupStart":628.9000000953674,"fetchStart":628.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":944.5,"responseEnd":1253.6999998092651,"responseStart":992.4000000953674,"secureConnectionStart":628.9000000953674},{"duration":818.0999999046326,"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":629.0999999046326,"connectEnd":629.0999999046326,"connectStart":629.0999999046326,"domainLookupEnd":629.0999999046326,"domainLookupStart":629.0999999046326,"fetchStart":629.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":945.0999999046326,"responseEnd":1447.1999998092651,"responseStart":998,"secureConnectionStart":629.0999999046326},{"duration":371.5,"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":629.1999998092651,"connectEnd":629.1999998092651,"connectStart":629.1999998092651,"domainLookupEnd":629.1999998092651,"domainLookupStart":629.1999998092651,"fetchStart":629.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":954.4000000953674,"responseEnd":1000.6999998092651,"responseStart":990.7999997138977,"secureConnectionStart":629.1999998092651},{"duration":371.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":629.4000000953674,"connectEnd":629.4000000953674,"connectStart":629.4000000953674,"domainLookupEnd":629.4000000953674,"domainLookupStart":629.4000000953674,"fetchStart":629.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":954.6999998092651,"responseEnd":1000.9000000953674,"responseStart":991.6999998092651,"secureConnectionStart":629.4000000953674},{"duration":373.59999990463257,"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":629.5999999046326,"connectEnd":629.5999999046326,"connectStart":629.5999999046326,"domainLookupEnd":629.5999999046326,"domainLookupStart":629.5999999046326,"fetchStart":629.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":954.7999997138977,"responseEnd":1003.1999998092651,"responseStart":994.6999998092651,"secureConnectionStart":629.5999999046326},{"duration":321.90000009536743,"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":630,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":630,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":951.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":374.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":630.0999999046326,"connectEnd":630.0999999046326,"connectStart":630.0999999046326,"domainLookupEnd":630.0999999046326,"domainLookupStart":630.0999999046326,"fetchStart":630.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":955,"responseEnd":1005,"responseStart":997.2999997138977,"secureConnectionStart":630.0999999046326},{"duration":322.80000019073486,"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":630.2999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":630.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":953.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":378.19999980926514,"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":630.5,"connectEnd":630.5,"connectStart":630.5,"domainLookupEnd":630.5,"domainLookupStart":630.5,"fetchStart":630.5,"redirectEnd":0,"redirectStart":0,"requestStart":973.0999999046326,"responseEnd":1008.6999998092651,"responseStart":1003.2999997138977,"secureConnectionStart":630.5},{"duration":807.6999998092651,"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":631.5,"connectEnd":631.5,"connectStart":631.5,"domainLookupEnd":631.5,"domainLookupStart":631.5,"fetchStart":631.5,"redirectEnd":0,"redirectStart":0,"requestStart":1419.9000000953674,"responseEnd":1439.1999998092651,"responseStart":1437.4000000953674,"secureConnectionStart":631.5},{"duration":912.2999997138977,"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":631.5,"connectEnd":631.5,"connectStart":631.5,"domainLookupEnd":631.5,"domainLookupStart":631.5,"fetchStart":631.5,"redirectEnd":0,"redirectStart":0,"requestStart":1523,"responseEnd":1543.7999997138977,"responseStart":1543.1999998092651,"secureConnectionStart":631.5},{"duration":149.10000038146973,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1404.2999997138977,"connectEnd":1404.2999997138977,"connectStart":1404.2999997138977,"domainLookupEnd":1404.2999997138977,"domainLookupStart":1404.2999997138977,"fetchStart":1404.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":1518.1999998092651,"responseEnd":1553.4000000953674,"responseStart":1552.1999998092651,"secureConnectionStart":1404.2999997138977}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":433,"responseStart":621,"responseEnd":626,"domLoading":625,"domInteractive":1984,"domContentLoadedEventStart":1984,"domContentLoadedEventEnd":2040,"domComplete":2926,"loadEventStart":2926,"loadEventEnd":2926,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1959},{"name":"bigPipe.sidebar-id.end","time":1959.7999997138977},{"name":"bigPipe.activity-panel-pipe-id.start","time":1960},{"name":"bigPipe.activity-panel-pipe-id.end","time":1960.5},{"name":"activityTabFullyLoaded","time":2052.4000000953674}],"measures":[],"correlationId":"db79ee1c5178ab","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":91,"dbReadsTimeInMs":14,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}