On a server that has a quite old datadir (probably dates back at least to 5.5), upgrading from 10.3.38 to 10.4.28 resulted in mysqld doing a segfault / crash with signal 11 with this backtrace on the error log :
Thread pointer: 0x562278421b08
|
Attempting backtrace. You can use the following information to find out
|
where mysqld died. If you see no messages after this, something went
|
terribly wrong...
|
stack_bottom = 0x7ffe5c9c1248 thread_stack 0x49000
|
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x5622692faf8e]
|
/usr/sbin/mysqld(handle_fatal_signal+0x54d)[0x562268dca99d]
|
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7f0c70c52730]
|
/usr/sbin/mysqld(+0x63307a)[0x562268b5207a]
|
/usr/sbin/mysqld(_Z10acl_reloadP3THD+0x678)[0x562268b5cba8]
|
/usr/sbin/mysqld(_Z8acl_initb+0x133)[0x562268b5df13]
|
/usr/sbin/mysqld(_Z11mysqld_mainiPPc+0x8f0)[0x562268b20e80]
|
csu/libc-start.c:342(__libc_start_main)[0x7f0c7079609b]
|
/usr/sbin/mysqld(_start+0x2a)[0x562268b14a6a]
|
After running the process on gdb (i haven't been able to produce a core file, not sure why), the backtrace revealed that it was crashing on the function get_magic_sort being called from acl_load which was reading the mysql.host table (i removed the optimized out variables) :
Thread 1 "mysqld" received signal SIGSEGV, Segmentation fault.
|
0x0000555555b9222a in get_magic_sort (templ=0x555556410e5c "d", templ@entry=0x555556410e5b "hd") at ./sql/sql_acl_getsort.ic:160
|
160 ./sql/sql_acl_getsort.ic: No such file or directory.
|
(gdb) bt full
|
#0 0x0000555555b9222a in get_magic_sort (templ=0x555556410e5c "d", templ@entry=0x555556410e5b "hd") at ./sql/sql_acl_getsort.ic:160
|
pat = 0x0
|
sort = 0
|
args = {{gp_offset = 24, fp_offset = 0, overflow_arg_area = 0x7fffffffdd40, reg_save_area = 0x7fffffffdcd8}}
|
#1 0x0000555555b9eae0 in acl_load (tables=..., thd=0x555564623758) at ./sql/sql_acl.cc:2442
|
host = {<ACL_ACCESS> = {sort = 0, access = 31931455}, host = {hostname = 0x555564665760 "10.1.0.0/255.255.0.0", ip = 167837696, ip_mask = 4294901760}, db = 0x0}
|
read_record_info = {table = 0x555564637bc8, unlock_row = 0x555555c44f60 <rr_unlock_row(st_join_table*)>, read_record_func = 0x555555f3d850 <rr_sequential(READ_RECORD*)>, thd = 0x555564623758, select = 0x0, ref_length = 7, reclength = 0, rec_cache_size = 0, error_offset = 0, ref_pos = 0x0, rec_buf = 0x0, cache = 0x0, cache_pos = 0x0, cache_end = 0x0, read_positions = 0x0, addon_field = 0x0, io_cache = 0x0, print_error = true, unpack = 0x0, copy_field = 0x0,
|
copy_field_end = 0x0}
|
tmp_name = "`ZbdUU\000\000\000\207\033\221 AF\373\000\004\000\000\000\000\000\000X\nZdUU\000\000\020\000\001\000\000\000\000\000\b\004\000\000\000\000\000\000 \342\377\377\377\177\000\000d\334\063VUU\000\000X7bdUU\000\000\030\352\266VUU\000\000h\225bdUU\000\000H\224bdUU\000\000\320\342\377\377\377\177\000\000\327\212\275UUU\000\000\230\223bdUU\000\000 sbdUU\000\000\370pbdUU\000\000\330RbdUU\000\000\240\070bdUU\000\000\b\232bdUU\000\000(\222bdUU\000\000\000\000\000\000\000\000\000\000\370<bdUU\000\000\320<bdUU\000\000\350SbdUU\000\000("...
|
host_table = @0x7fffffffe160: {<Grant_table_base> = {min_columns = 8, start_priv_columns = 2, end_priv_columns = 20, m_table = 0x555564637bc8}, <No data fields>}
|
So i did copy the myisam files for the table mysql.host to another server and the content did look like this :
*************************** 1. row ***************************
|
Host: 10.1.0.0/255.255.0.0
|
Db:
|
Select_priv: Y
|
Insert_priv: Y
|
Update_priv: Y
|
Delete_priv: Y
|
Create_priv: Y
|
Drop_priv: Y
|
Grant_priv: Y
|
References_priv: Y
|
Index_priv: Y
|
Alter_priv: Y
|
Create_tmp_table_priv: Y
|
Lock_tables_priv: Y
|
Create_view_priv: Y
|
Show_view_priv: Y
|
Create_routine_priv: Y
|
Alter_routine_priv: Y
|
Execute_priv: Y
|
Trigger_priv: N
|
*************************** 2. row ***************************
|
Host: 10.5.0.0/255.255.0.0
|
Db:
|
Select_priv: Y
|
Insert_priv: Y
|
Update_priv: Y
|
Delete_priv: Y
|
Create_priv: Y
|
Drop_priv: Y
|
Grant_priv: Y
|
References_priv: Y
|
Index_priv: Y
|
Alter_priv: Y
|
Create_tmp_table_priv: Y
|
Lock_tables_priv: Y
|
Create_view_priv: Y
|
Show_view_priv: Y
|
Create_routine_priv: Y
|
Alter_routine_priv: Y
|
Execute_priv: Y
|
Trigger_priv: N
|
*************************** 3. row ***************************
|
Host: 10.8.1.0/255.255.255.0
|
Db:
|
Select_priv: Y
|
Insert_priv: Y
|
Update_priv: Y
|
Delete_priv: Y
|
Create_priv: Y
|
Drop_priv: Y
|
Grant_priv: Y
|
References_priv: Y
|
Index_priv: Y
|
Alter_priv: Y
|
Create_tmp_table_priv: Y
|
Lock_tables_priv: Y
|
Create_view_priv: Y
|
Show_view_priv: Y
|
Create_routine_priv: Y
|
Alter_routine_priv: Y
|
Execute_priv: Y
|
Trigger_priv: N
|
Those entries are at least 4 or 5 years old (probably more) as those IP ranges are not in use anymore and have survived several MariaDB major version upgrade.
I assume it's the empty "Db" column that is not valid so i did copy the empty host table from the server i was on to the crashing one and it did fix it.
{"report":{"fcp":912.7000000178814,"ttfb":195.10000002384186,"pageVisibility":"visible","entityId":120044,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"1df8064a-0722-4534-a1ec-67e2cf251953","navigationType":0,"readyForUser":1005.9000000059605,"redirectCount":0,"resourceLoadedEnd":622.9000000059605,"resourceLoadedStart":201.10000002384186,"resourceTiming":[{"duration":253.59999999403954,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":201.10000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":201.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":454.7000000178814,"responseStart":0,"secureConnectionStart":0},{"duration":253.59999999403954,"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":201.40000000596046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":201.40000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":455,"responseStart":0,"secureConnectionStart":0},{"duration":262.09999999403954,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":201.60000002384186,"connectEnd":201.60000002384186,"connectStart":201.60000002384186,"domainLookupEnd":201.60000002384186,"domainLookupStart":201.60000002384186,"fetchStart":201.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":201.60000002384186,"responseEnd":463.7000000178814,"responseStart":463.7000000178814,"secureConnectionStart":201.60000002384186},{"duration":287.30000001192093,"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":201.80000001192093,"connectEnd":201.80000001192093,"connectStart":201.80000001192093,"domainLookupEnd":201.80000001192093,"domainLookupStart":201.80000001192093,"fetchStart":201.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":201.80000001192093,"responseEnd":489.10000002384186,"responseStart":489.10000002384186,"secureConnectionStart":201.80000001192093},{"duration":291,"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":201.90000000596046,"connectEnd":201.90000000596046,"connectStart":201.90000000596046,"domainLookupEnd":201.90000000596046,"domainLookupStart":201.90000000596046,"fetchStart":201.90000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":201.90000000596046,"responseEnd":492.90000000596046,"responseStart":492.90000000596046,"secureConnectionStart":201.90000000596046},{"duration":291.09999999403954,"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":202.2000000178814,"connectEnd":202.2000000178814,"connectStart":202.2000000178814,"domainLookupEnd":202.2000000178814,"domainLookupStart":202.2000000178814,"fetchStart":202.2000000178814,"redirectEnd":0,"redirectStart":0,"requestStart":202.2000000178814,"responseEnd":493.30000001192093,"responseStart":493.30000001192093,"secureConnectionStart":202.2000000178814},{"duration":291.30000001192093,"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":202.40000000596046,"connectEnd":202.40000000596046,"connectStart":202.40000000596046,"domainLookupEnd":202.40000000596046,"domainLookupStart":202.40000000596046,"fetchStart":202.40000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":202.40000000596046,"responseEnd":493.7000000178814,"responseStart":493.7000000178814,"secureConnectionStart":202.40000000596046},{"duration":293.10000002384186,"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":202.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":202.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":495.60000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":291.40000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":202.7000000178814,"connectEnd":202.7000000178814,"connectStart":202.7000000178814,"domainLookupEnd":202.7000000178814,"domainLookupStart":202.7000000178814,"fetchStart":202.7000000178814,"redirectEnd":0,"redirectStart":0,"requestStart":202.7000000178814,"responseEnd":494.10000002384186,"responseStart":494.10000002384186,"secureConnectionStart":202.7000000178814},{"duration":292.80000001192093,"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":202.90000000596046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":202.90000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":495.7000000178814,"responseStart":0,"secureConnectionStart":0},{"duration":291.59999999403954,"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":203.10000002384186,"connectEnd":203.10000002384186,"connectStart":203.10000002384186,"domainLookupEnd":203.10000002384186,"domainLookupStart":203.10000002384186,"fetchStart":203.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":203.10000002384186,"responseEnd":494.7000000178814,"responseStart":494.7000000178814,"secureConnectionStart":203.10000002384186},{"duration":358.40000000596046,"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":204,"connectEnd":204,"connectStart":204,"domainLookupEnd":204,"domainLookupStart":204,"fetchStart":204,"redirectEnd":0,"redirectStart":0,"requestStart":204,"responseEnd":562.4000000059605,"responseStart":562.4000000059605,"secureConnectionStart":204},{"duration":418.90000000596046,"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":204,"connectEnd":204,"connectStart":204,"domainLookupEnd":204,"domainLookupStart":204,"fetchStart":204,"redirectEnd":0,"redirectStart":0,"requestStart":204,"responseEnd":622.9000000059605,"responseStart":622.9000000059605,"secureConnectionStart":204},{"duration":301.69999998807907,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":696.8000000119209,"connectEnd":696.8000000119209,"connectStart":696.8000000119209,"domainLookupEnd":696.8000000119209,"domainLookupStart":696.8000000119209,"fetchStart":696.8000000119209,"redirectEnd":0,"redirectStart":0,"requestStart":696.8000000119209,"responseEnd":998.5,"responseStart":998.5,"secureConnectionStart":696.8000000119209}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":14,"responseStart":195,"responseEnd":197,"domLoading":199,"domInteractive":1071,"domContentLoadedEventStart":1071,"domContentLoadedEventEnd":1117,"domComplete":1768,"loadEventStart":1768,"loadEventEnd":1770,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1052.800000011921},{"name":"bigPipe.sidebar-id.end","time":1053.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1053.7000000178814},{"name":"bigPipe.activity-panel-pipe-id.end","time":1055.9000000059605},{"name":"activityTabFullyLoaded","time":1128.800000011921}],"measures":[],"correlationId":"b21915eb3f965f","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":99,"dbReadsTimeInMs":12,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}