The following error was observed in https://buildbot.mariadb.org/#/builders/195/builds/3048/steps/7/logs/stdio and is nondeterministically repeatable locally. I got it replayed under rr after setting -DPLUGIN_PERFSCHEMA=NO:
10.6 b740b2356d539a27f8a7a9e9b6455f31bc6c9196
|
Version: '10.6.5-MariaDB-debug-log' socket: '/dev/shm/10.6msan/mysql-test/var/tmp/mysqld.1.sock' port: 16060 Source distribution
|
==1210070==WARNING: MemorySanitizer: use-of-uninitialized-value
|
#0 0x56542be6fbff in int10_to_str /mariadb/10.6/strings/int2str.c:168:3
|
#1 0x56542be77b1a in process_int_arg /mariadb/10.6/strings/my_vsnprintf.c
|
#2 0x56542be7256f in my_vsnprintf_ex /mariadb/10.6/strings/my_vsnprintf.c:764:11
|
#3 0x56542be783d3 in my_vsnprintf /mariadb/10.6/strings/my_vsnprintf.c:815:10
|
#4 0x56542be783d3 in my_snprintf /mariadb/10.6/strings/my_vsnprintf.c:824:11
|
#5 0x565429507e96 in thd_get_error_context_description /mariadb/10.6/sql/sql_show.cc:10190:8
|
#6 0x56542ac3bb84 in innobase_mysql_print_thd(_IO_FILE*, THD*, unsigned int) /mariadb/10.6/storage/innobase/handler/ha_innodb.cc:2333:8
|
#7 0x56542aebb2b9 in lock_trx_print_wait_and_mvcc_state(_IO_FILE*, trx_t const*, my_hrtime_t) /mariadb/10.6/storage/innobase/lock/lock0lock.cc:4185:2
|
Here is a better stack trace from my rr replay session:
10.6 b740b2356d539a27f8a7a9e9b6455f31bc6c9196
|
(rr) set print frame-arguments scalars
|
(rr) bt
|
#0 innobase_mysql_print_thd (f=0x714000000a00, f@entry=0x7fe86a231318, thd=0x72b00007e018, max_query_len=600) at /mariadb/10.6/storage/innobase/handler/ha_innodb.cc:2330
|
#1 0x000056542b4a1d4d in trx_print_low (f=<optimized out>, f@entry=0x38, trx=trx@entry=0xfffffffffffff290, max_query_len=56, max_query_len@entry=140636058381456, n_rec_locks=80,
|
n_rec_locks@entry=124519691848192, n_trx_locks=n_trx_locks@entry=6269010687742184054, heap_size=<optimized out>) at /mariadb/10.6/storage/innobase/trx/trx0trx.cc:1744
|
#2 0x000056542b4a20ba in trx_print_latched (f=0x38, f@entry=0x7fe86a231318, trx=<optimized out>, trx@entry=0x7fe86a231318, max_query_len=140636058381456, max_query_len@entry=600)
|
at /mariadb/10.6/storage/innobase/trx/trx0trx.cc:1763
|
#3 0x000056542aebb2ba in lock_trx_print_wait_and_mvcc_state (file=0x714000000a00, trx=0x7fe86a231318, now=...) at /mariadb/10.6/storage/innobase/lock/lock0lock.cc:4185
|
#4 0x000056542aeed8b5 in lock_print_info::operator() (this=this@entry=0x7fe8624d7068, trx=...) at /mariadb/10.6/storage/innobase/lock/lock0lock.cc:4251
|
#5 0x000056542aee5ff6 in thread_safe_trx_ilist_t::for_each<lock_print_info> (this=0x56542cdf6d40 <trx_sys+128>, callback=...) at /mariadb/10.6/storage/innobase/include/trx0sys.h:828
|
#6 0x000056542aebdf6f in lock_print_info_all_transactions (file=<optimized out>) at /mariadb/10.6/storage/innobase/lock/lock0lock.cc:4272
|
#7 0x000056542b3aec49 in srv_printf_innodb_monitor (file=0x714000000a00, nowait=nowait@entry=0, trx_start_pos=trx_start_pos@entry=0x7fe8624d7970, trx_end=trx_end@entry=0x7fe8624d7968)
|
at /mariadb/10.6/storage/innobase/srv/srv0srv.cc:830
|
#8 0x000056542acd1d2c in innodb_show_status (hton=<optimized out>, thd=0x72b000070018,
|
stat_print=0x565429ea61a0 <stat_print(THD*, char const*, unsigned long, char const*, unsigned long, char const*, unsigned long)>) at /mariadb/10.6/storage/innobase/handler/ha_innodb.cc:16109
|
#9 innobase_show_status (hton=<optimized out>, hton@entry=0x714000000818, thd=thd@entry=0x72b000070018,
|
stat_print=0x565429ea61a0 <stat_print(THD*, char const*, unsigned long, char const*, unsigned long, char const*, unsigned long)>, stat_type=<optimized out>)
|
at /mariadb/10.6/storage/innobase/handler/ha_innodb.cc:16191
|
#10 0x0000565429ea59c3 in ha_show_status (thd=thd@entry=0x72b000070018, db_type=0x714000000818, stat=stat@entry=HA_ENGINE_STATUS) at /mariadb/10.6/sql/handler.cc:6898
|
The transaction had been created here:
Thread 5 hit Hardware watchpoint 2: -location trx.id
|
|
Old value = 0
|
New value = 88
|
trx_sys_t::register_rw (this=0x56542cdf6cc0 <trx_sys>, trx=0x7fe86a231318) at /mariadb/10.6/storage/innobase/include/trx0sys.h:1102
|
1102 rw_trx_hash.insert(trx);
|
(rr) bt
|
#0 trx_sys_t::register_rw (this=0x56542cdf6cc0 <trx_sys>, trx=0x7fe86a231318) at /mariadb/10.6/storage/innobase/include/trx0sys.h:1102
|
#1 trx_start_low (trx=<optimized out>, read_write=true) at /mariadb/10.6/storage/innobase/trx/trx0trx.cc:947
|
#2 0x000056542b4a5e62 in trx_start_internal_low (trx=0x0, trx@entry=0x7fe86a231318, read_write=<optimized out>) at /mariadb/10.6/storage/innobase/trx/trx0trx.cc:2100
|
#3 0x000056542b7ff1b5 in dict_stats_save (table_orig=0x719000020398, table_orig@entry=0x716000041d88, only_for_index=only_for_index@entry=0x0) at /mariadb/10.6/storage/innobase/dict/dict0stats.cc:3106
|
#4 0x000056542b80c4a1 in dict_stats_update (table=<optimized out>, table@entry=0x716000041d88, stats_upd_option=stats_upd_option@entry=DICT_STATS_RECALC_PERSISTENT)
|
at /mariadb/10.6/storage/innobase/dict/dict0stats.cc:3854
|
#5 0x000056542b82db1a in dict_stats_process_entry_from_recalc_pool (thd=0x72b00007e018) at /mariadb/10.6/storage/innobase/dict/dict0stats_bg.cc:340
|
#6 dict_stats_func () at /mariadb/10.6/storage/innobase/dict/dict0stats_bg.cc:393
|
#7 0x000056542ba63910 in tpool::thread_pool_generic::timer_generic::run (this=0x711000014640) at /mariadb/10.6/tpool/tpool_generic.cc:313
|
Starting with the fix of MDEV-25919, background THDs may wait for MDL or InnoDB locks.
The problem appears to be that thd->real_id is not initialized. Its value consists of 0xa5 bytes, and the MSAN shadow bits for it are all set.
10190 len= my_snprintf(header, sizeof(header),
|
10191 "MariaDB thread id %u, OS thread handle %lu, query id %llu",
|
10192 (uint)thd->thread_id, (ulong) thd->real_id, (ulonglong) thd->query_id);
|
- is caused by
-
MDEV-25919
InnoDB reports misleading lock wait timeout on DDL operations
-
-
Closed
{"report":{"fcp":802.8000001907349,"ttfb":198,"pageVisibility":"visible","entityId":102928,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"cbca0f53-5ce0-4777-98f0-87c6884c1d81","navigationType":0,"readyForUser":883.3000001907349,"redirectCount":0,"resourceLoadedEnd":534,"resourceLoadedStart":202.80000019073486,"resourceTiming":[{"duration":19,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":202.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":202.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":221.80000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":18.799999952316284,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":203.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":203.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":221.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":227.89999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":203.10000014305115,"connectEnd":203.10000014305115,"connectStart":203.10000014305115,"domainLookupEnd":203.10000014305115,"domainLookupStart":203.10000014305115,"fetchStart":203.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":226.5,"responseEnd":431,"responseStart":254.80000019073486,"secureConnectionStart":203.10000014305115},{"duration":330.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":203.20000004768372,"connectEnd":203.20000004768372,"connectStart":203.20000004768372,"domainLookupEnd":203.20000004768372,"domainLookupStart":203.20000004768372,"fetchStart":203.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":228.20000004768372,"responseEnd":534,"responseStart":289.30000019073486,"secureConnectionStart":203.20000004768372},{"duration":63.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":203.30000019073486,"connectEnd":203.30000019073486,"connectStart":203.30000019073486,"domainLookupEnd":203.30000019073486,"domainLookupStart":203.30000019073486,"fetchStart":203.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":228.90000009536743,"responseEnd":266.5,"responseStart":264.2000000476837,"secureConnectionStart":203.30000019073486},{"duration":67.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":203.5,"connectEnd":203.5,"connectStart":203.5,"domainLookupEnd":203.5,"domainLookupStart":203.5,"fetchStart":203.5,"redirectEnd":0,"redirectStart":0,"requestStart":229,"responseEnd":270.7000000476837,"responseStart":265.2000000476837,"secureConnectionStart":203.5},{"duration":67.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":203.5,"connectEnd":203.5,"connectStart":203.5,"domainLookupEnd":203.5,"domainLookupStart":203.5,"fetchStart":203.5,"redirectEnd":0,"redirectStart":0,"requestStart":229.10000014305115,"responseEnd":271.10000014305115,"responseStart":266.7000000476837,"secureConnectionStart":203.5},{"duration":24.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":203.60000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":203.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":228.10000014305115,"responseStart":0,"secureConnectionStart":0},{"duration":68.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":203.70000004768372,"connectEnd":203.70000004768372,"connectStart":203.70000004768372,"domainLookupEnd":203.70000004768372,"domainLookupStart":203.70000004768372,"fetchStart":203.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":231.60000014305115,"responseEnd":272.30000019073486,"responseStart":268.30000019073486,"secureConnectionStart":203.70000004768372},{"duration":24.899999856948853,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":203.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":203.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":228.70000004768372,"responseStart":0,"secureConnectionStart":0},{"duration":79,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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.90000009536743,"connectEnd":203.90000009536743,"connectStart":203.90000009536743,"domainLookupEnd":203.90000009536743,"domainLookupStart":203.90000009536743,"fetchStart":203.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":232.80000019073486,"responseEnd":282.90000009536743,"responseStart":269.2000000476837,"secureConnectionStart":203.90000009536743},{"duration":285.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":214.80000019073486,"connectEnd":214.80000019073486,"connectStart":214.80000019073486,"domainLookupEnd":214.80000019073486,"domainLookupStart":214.80000019073486,"fetchStart":214.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":282.60000014305115,"responseEnd":500.10000014305115,"responseStart":495,"secureConnectionStart":214.80000019073486},{"duration":283,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":217.40000009536743,"connectEnd":217.40000009536743,"connectStart":217.40000009536743,"domainLookupEnd":217.40000009536743,"domainLookupStart":217.40000009536743,"fetchStart":217.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":284.7000000476837,"responseEnd":500.40000009536743,"responseStart":495.60000014305115,"secureConnectionStart":217.40000009536743},{"duration":204.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":569.9000000953674,"connectEnd":569.9000000953674,"connectStart":569.9000000953674,"domainLookupEnd":569.9000000953674,"domainLookupStart":569.9000000953674,"fetchStart":569.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":740.1000001430511,"responseEnd":774.4000000953674,"responseStart":773.4000000953674,"secureConnectionStart":569.9000000953674},{"duration":93.10000014305115,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":796.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":796.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":889.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":135.59999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":815.1000001430511,"connectEnd":815.1000001430511,"connectStart":815.1000001430511,"domainLookupEnd":815.1000001430511,"domainLookupStart":815.1000001430511,"fetchStart":815.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":916.1000001430511,"responseEnd":950.7000000476837,"responseStart":950.3000001907349,"secureConnectionStart":815.1000001430511}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":43,"responseStart":198,"responseEnd":218,"domLoading":202,"domInteractive":979,"domContentLoadedEventStart":979,"domContentLoadedEventEnd":1022,"domComplete":1243,"loadEventStart":1243,"loadEventEnd":1244,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":958.4000000953674},{"name":"bigPipe.sidebar-id.end","time":959.1000001430511},{"name":"bigPipe.activity-panel-pipe-id.start","time":959.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":960.1000001430511},{"name":"activityTabFullyLoaded","time":1037.8000001907349}],"measures":[],"correlationId":"fa7b2dd281480b","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":76,"dbReadsTimeInMs":12,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I initialize all of these things with 0 now.marko, if you like real_id to refer to something meaningful (I doubt this is useful, outside of debug session), then you'd need to set it yourself, in a thread that uses a background THD.