Issue has also been filed in alpine packages
The following issue appeared with mariadb 10.5.8 (there is no issue with alpine 3.12 and mariadb 10.4.x):
- On arm v7 (32 bits) mysqld consumes about 100% cpu when idle, but still works.
- On arm v8 (64 bits) or amd64, it consumes near 0% cpu when idle as expected.
I see only one difference in start logs (but that may be irrelevant):
- arm v7 : "Using generic crc32 instructions"
- arm v8 : "Using ARMv8 crc32 instructions"
Any idea why this happens and if there is an option in mysqld to circumvent the issue?
Steps to reproduce:
~ # apk --update --upgrade add mariadb sudo
|
~ # mkdir /run/mysqld
|
~ # chown mysql:mysql /run/mysqld
|
~ # sudo -su mysql
|
~ $ mysql_install_db
|
~ $ mysqld --datadir=./data
|
{"report":{"fcp":986.6999998092651,"ttfb":292.5,"pageVisibility":"visible","entityId":96502,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":0.5,"journeyId":"0faf038d-94e7-433b-819b-ca1b0df8bd1a","navigationType":0,"readyForUser":1067.5,"redirectCount":0,"resourceLoadedEnd":479.59999990463257,"resourceLoadedStart":300.19999980926514,"resourceTiming":[{"duration":70.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":300.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":300.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":370.69999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":71.7999997138977,"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":300.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":300.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":372.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":135.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":300.59999990463257,"connectEnd":300.59999990463257,"connectStart":300.59999990463257,"domainLookupEnd":300.59999990463257,"domainLookupStart":300.59999990463257,"fetchStart":300.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":374.69999980926514,"responseEnd":435.90000009536743,"responseStart":386.09999990463257,"secureConnectionStart":300.59999990463257},{"duration":161.2000002861023,"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":300.7999997138977,"connectEnd":300.7999997138977,"connectStart":300.7999997138977,"domainLookupEnd":300.7999997138977,"domainLookupStart":300.7999997138977,"fetchStart":300.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":374.69999980926514,"responseEnd":462,"responseStart":389.19999980926514,"secureConnectionStart":300.7999997138977},{"duration":98.69999980926514,"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":301,"connectEnd":301,"connectStart":301,"domainLookupEnd":301,"domainLookupStart":301,"fetchStart":301,"redirectEnd":0,"redirectStart":0,"requestStart":376,"responseEnd":399.69999980926514,"responseStart":398.90000009536743,"secureConnectionStart":301},{"duration":103.80000019073486,"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":301.09999990463257,"connectEnd":301.09999990463257,"connectStart":301.09999990463257,"domainLookupEnd":301.09999990463257,"domainLookupStart":301.09999990463257,"fetchStart":301.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":377.40000009536743,"responseEnd":404.90000009536743,"responseStart":403.59999990463257,"secureConnectionStart":301.09999990463257},{"duration":108.10000038146973,"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":301.2999997138977,"connectEnd":301.2999997138977,"connectStart":301.2999997138977,"domainLookupEnd":301.2999997138977,"domainLookupStart":301.2999997138977,"fetchStart":301.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":378.19999980926514,"responseEnd":409.40000009536743,"responseStart":408.40000009536743,"secureConnectionStart":301.2999997138977},{"duration":76.40000009536743,"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":301.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":301.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":377.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":119.60000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":301.7999997138977,"connectEnd":301.7999997138977,"connectStart":301.7999997138977,"domainLookupEnd":301.7999997138977,"domainLookupStart":301.7999997138977,"fetchStart":301.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":380,"responseEnd":421.40000009536743,"responseStart":420.69999980926514,"secureConnectionStart":301.7999997138977},{"duration":77.2999997138977,"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":301.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":301.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":379.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":96.40000009536743,"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":302.09999990463257,"connectEnd":383.59999990463257,"connectStart":383.59999990463257,"domainLookupEnd":383.59999990463257,"domainLookupStart":383.59999990463257,"fetchStart":302.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":384,"responseEnd":398.5,"responseStart":394.19999980926514,"secureConnectionStart":383.59999990463257},{"duration":173.59999990463257,"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":305.19999980926514,"connectEnd":305.19999980926514,"connectStart":305.19999980926514,"domainLookupEnd":305.19999980926514,"domainLookupStart":305.19999980926514,"fetchStart":305.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":468.09999990463257,"responseEnd":478.7999997138977,"responseStart":477.69999980926514,"secureConnectionStart":305.19999980926514},{"duration":170.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":309.09999990463257,"connectEnd":309.09999990463257,"connectStart":309.09999990463257,"domainLookupEnd":309.09999990463257,"domainLookupStart":309.09999990463257,"fetchStart":309.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":468.2999997138977,"responseEnd":479.59999990463257,"responseStart":479,"secureConnectionStart":309.09999990463257},{"duration":304.59999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":645,"connectEnd":645,"connectStart":645,"domainLookupEnd":645,"domainLookupStart":645,"fetchStart":645,"redirectEnd":0,"redirectStart":0,"requestStart":919.1999998092651,"responseEnd":949.5999999046326,"responseStart":948.7999997138977,"secureConnectionStart":645}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":122,"responseStart":292,"responseEnd":308,"domLoading":295,"domInteractive":1155,"domContentLoadedEventStart":1155,"domContentLoadedEventEnd":1196,"domComplete":1608,"loadEventStart":1608,"loadEventEnd":1609,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1113.4000000953674},{"name":"bigPipe.sidebar-id.end","time":1114.2999997138977},{"name":"bigPipe.activity-panel-pipe-id.start","time":1114.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":1116.4000000953674},{"name":"activityTabFullyLoaded","time":1217}],"measures":[],"correlationId":"87dcfa686a1c53","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":106,"dbReadsTimeInMs":14,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
perf.data is rather raw, it needs the ELF binary to resolve. Can you try `perf report -g --no-children -i ~/perf.data` and/or `objdump -d /usr/bin/mysqld` should give address that we can map to the perf data.
Thanks for trying strace, its looking very much like an endless loop. The gdb of the running process will still be useful if you have it compiled with debug symbols (cflag=-g).