The two test cases below differ only in FTWRL vs BACKUP STAGE x 2 and cause the same effect, both on release and debug builds.
FTWRL
|
--source include/have_binlog_format_mixed_or_statement.inc
|
|
CREATE TEMPORARY TABLE tmp (a INT);
|
|
--connect (con1,localhost,root,,)
|
FLUSH TABLES WITH READ LOCK;
|
|
--connection default
|
SET lock_wait_timeout= 1;
|
ALTER TABLE tmp;
|
BACKUP STAGE
|
--source include/have_binlog_format_mixed_or_statement.inc
|
|
CREATE TEMPORARY TABLE tmp (a INT);
|
|
--connect (con1,localhost,root,,)
|
BACKUP STAGE START;
|
BACKUP STAGE BLOCK_COMMIT;
|
|
--connection default
|
SET lock_wait_timeout= 1;
|
ALTER TABLE tmp;
|
The backup lock taken by con1 blocks ALTER on a temporary table in the connection default and makes it eventually fail with a timeout. It affects debug and non-debug builds alike.
10.4 880baedc
|
connection default;
|
SET lock_wait_timeout= 1;
|
ALTER TABLE tmp;
|
bug.t [ fail ]
|
Test ended at 2021-04-03 20:00:05
|
|
CURRENT_TEST: bug.t
|
mysqltest: At line 12: query 'ALTER TABLE tmp' failed: 1205: Lock wait timeout exceeded; try restarting transaction
|
Debug builds further abort with an assertion failure in diagnostics area:
10.4 880baedc debug
|
mysqld: /data/src/10.4/sql/sql_error.cc:445: void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*): Assertion `! is_set() || m_can_overwrite_status' failed.
|
210403 20:02:19 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007f081775af36 in __GI___assert_fail (assertion=0x5564e69c1468 "! is_set() || m_can_overwrite_status", file=0x5564e69c1200 "/data/src/10.4/sql/sql_error.cc", line=445, function=0x5564e69c1490 "void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*)") at assert.c:101
|
#8 0x00005564e5c71870 in Diagnostics_area::set_error_status (this=0x7f07f40067a8, sql_errno=1205, message=0x7f08116dc3a0 "Lock wait timeout exceeded; try restarting transaction", sqlstate=0x5564e69e6e6d "HY000", ucid=..., error_condition=0x0) at /data/src/10.4/sql/sql_error.cc:445
|
#9 0x00005564e5c4b83f in THD::raise_condition (this=0x7f07f4000d90, sql_errno=1205, sqlstate=0x5564e69e6e6d "HY000", level=Sql_state_errno_level::WARN_LEVEL_ERROR, ucid=..., msg=0x7f08116dc3a0 "Lock wait timeout exceeded; try restarting transaction") at /data/src/10.4/sql/sql_class.cc:1103
|
#10 0x00005564e5b8cb50 in THD::raise_condition (this=0x7f07f4000d90, sql_errno=1205, sqlstate=0x0, level=Sql_state_errno_level::WARN_LEVEL_ERROR, msg=0x7f08116dc3a0 "Lock wait timeout exceeded; try restarting transaction") at /data/src/10.4/sql/sql_class.h:4400
|
#11 0x00005564e5b7f530 in my_message_sql (error=1205, str=0x7f08116dc3a0 "Lock wait timeout exceeded; try restarting transaction", MyFlags=0) at /data/src/10.4/sql/mysqld.cc:3346
|
#12 0x00005564e68dd15f in my_error (nr=1205, MyFlags=0) at /data/src/10.4/mysys/my_error.c:125
|
#13 0x00005564e5e5f3eb in MDL_context::acquire_lock (this=0x7f07f4000eb0, mdl_request=0x7f08116dc870, lock_wait_timeout=1) at /data/src/10.4/sql/mdl.cc:2365
|
#14 0x00005564e6173c16 in MYSQL_BIN_LOG::write (this=0x5564e7479300 <mysql_bin_log>, event_info=0x7f08116dcab0, with_annotate=0x0) at /data/src/10.4/sql/log.cc:6393
|
#15 0x00005564e5c5cd1e in THD::binlog_query (this=0x7f07f4000d90, qtype=THD::STMT_QUERY_TYPE, query_arg=0x7f07f4014888 "ALTER TABLE tmp", query_len=15, is_trans=false, direct=false, suppress_use=false, errcode=0) at /data/src/10.4/sql/sql_class.cc:7209
|
#16 0x00005564e5da7114 in write_bin_log (thd=0x7f07f4000d90, clear_error=true, query=0x7f07f4014888 "ALTER TABLE tmp", query_length=15, is_trans=false) at /data/src/10.4/sql/sql_table.cc:1987
|
#17 0x00005564e5dbe074 in mysql_alter_table (thd=0x7f07f4000d90, new_db=0x7f07f4005560, new_name=0x7f07f4005988, create_info=0x7f08116df330, table_list=0x7f07f4014948, alter_info=0x7f08116df270, order_num=0, order=0x0, ignore=false) at /data/src/10.4/sql/sql_table.cc:9815
|
#18 0x00005564e5e59264 in Sql_cmd_alter_table::execute (this=0x7f07f4015010, thd=0x7f07f4000d90) at /data/src/10.4/sql/sql_alter.cc:520
|
#19 0x00005564e5ccfd9f in mysql_execute_command (thd=0x7f07f4000d90) at /data/src/10.4/sql/sql_parse.cc:6186
|
#20 0x00005564e5cd519d in mysql_parse (thd=0x7f07f4000d90, rawbuf=0x7f07f4014888 "ALTER TABLE tmp", length=15, parser_state=0x7f08116e0550, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7989
|
#21 0x00005564e5cc13f9 in dispatch_command (command=COM_QUERY, thd=0x7f07f4000d90, packet=0x7f07f400ace1 "ALTER TABLE tmp", packet_length=15, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1855
|
#22 0x00005564e5cbfc61 in do_command (thd=0x7f07f4000d90) at /data/src/10.4/sql/sql_parse.cc:1373
|
#23 0x00005564e5e4f9c1 in do_handle_one_connection (connect=0x5564e92ebfd0) at /data/src/10.4/sql/sql_connect.cc:1412
|
#24 0x00005564e5e4f70a in handle_one_connection (arg=0x5564e92ebfd0) at /data/src/10.4/sql/sql_connect.cc:1316
|
#25 0x00005564e68784e8 in pfs_spawn_thread (arg=0x5564e92381d0) at /data/src/10.4/storage/perfschema/pfs.cc:1869
|
#26 0x00007f0817fdb609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#27 0x00007f0817846293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
|
Query (0x7f07f4014888): ALTER TABLE tmp
|
|
Connection ID (thread ID): 5
|
Status: NOT_KILLED
|
The problem was introduced in 10.4.16/10.5.7 by this commit:
commit 16ea692ed490a1a2c6dc0b855247d5bd02bd2345 (HEAD)
|
Author: Monty
|
Date: Mon Sep 7 10:38:12 2020 +0300
|
|
MDEV-23586 Mariabackup: GTID saved for replication in 10.4.14 is wrong
|
|
MDEV-21953 deadlock between BACKUP STAGE BLOCK_COMMIT and parallel
|
replication
|
|
Fixed by partly reverting MDEV-21953 to put back MDL_BACKUP_COMMIT locking
|
before log_and_order.
|
|
The original problem for MDEV-21953 was that while a thread was waiting in
|
for another threads to commit in 'log_and_order', it had the
|
MDL_BACKUP_COMMIT lock. The backup thread was waiting to get the
|
MDL_BACKUP_WAIT_COMMIT lock, which blocks all new MDL_BACKUP_COMMIT locks.
|
This causes a deadlock as the waited-for thread can never get past the
|
MDL_BACKUP_COMMIT lock in ha_commit_trans.
|
|
The main part of the bug fix is to release the MDL_BACKUP_COMMIT lock while
|
a thread is waiting for other 'previous' threads to commit. This ensures
|
that no transactional thread keeps MDL_BACKUP_COMMIT while waiting, which
|
ensures that there are no deadlocks anymore.
|
I can't figure from the commit comment whether the effect with blocking temporary table actions was intentional. The assertion failure obviously wasn't.
- is caused by
-
MDEV-23586
Mariabackup: GTID saved for replication in 10.4.14 is wrong
-
-
Closed
{"report":{"fcp":1299.3999999999069,"ttfb":373.29999999993015,"pageVisibility":"visible","entityId":98525,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"66dcd038-a2f9-4dd5-baae-1f27fe13b39c","navigationType":0,"readyForUser":1407.6999999999534,"redirectCount":0,"resourceLoadedEnd":1845,"resourceLoadedStart":378.5999999999767,"resourceTiming":[{"duration":112.09999999997672,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":378.5999999999767,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":378.5999999999767,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":490.69999999995343,"responseStart":0,"secureConnectionStart":0},{"duration":112.60000000009313,"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":378.89999999990687,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":378.89999999990687,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":491.5,"responseStart":0,"secureConnectionStart":0},{"duration":165.59999999997672,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":379.0999999999767,"connectEnd":379.0999999999767,"connectStart":379.0999999999767,"domainLookupEnd":379.0999999999767,"domainLookupStart":379.0999999999767,"fetchStart":379.0999999999767,"redirectEnd":0,"redirectStart":0,"requestStart":379.0999999999767,"responseEnd":544.6999999999534,"responseStart":544.6999999999534,"secureConnectionStart":379.0999999999767},{"duration":609.4000000000233,"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":379.19999999995343,"connectEnd":379.19999999995343,"connectStart":379.19999999995343,"domainLookupEnd":379.19999999995343,"domainLookupStart":379.19999999995343,"fetchStart":379.19999999995343,"redirectEnd":0,"redirectStart":0,"requestStart":379.19999999995343,"responseEnd":988.5999999999767,"responseStart":988.5999999999767,"secureConnectionStart":379.19999999995343},{"duration":612.7999999999302,"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":379.5,"connectEnd":379.5,"connectStart":379.5,"domainLookupEnd":379.5,"domainLookupStart":379.5,"fetchStart":379.5,"redirectEnd":0,"redirectStart":0,"requestStart":379.5,"responseEnd":992.2999999999302,"responseStart":992.2999999999302,"secureConnectionStart":379.5},{"duration":612.9000000000233,"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":379.69999999995343,"connectEnd":379.69999999995343,"connectStart":379.69999999995343,"domainLookupEnd":379.69999999995343,"domainLookupStart":379.69999999995343,"fetchStart":379.69999999995343,"redirectEnd":0,"redirectStart":0,"requestStart":379.69999999995343,"responseEnd":992.5999999999767,"responseStart":992.5999999999767,"secureConnectionStart":379.69999999995343},{"duration":614.2000000000698,"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":379.89999999990687,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":379.89999999990687,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":994.0999999999767,"responseStart":0,"secureConnectionStart":0},{"duration":613.1000000000931,"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":379.89999999990687,"connectEnd":379.89999999990687,"connectStart":379.89999999990687,"domainLookupEnd":379.89999999990687,"domainLookupStart":379.89999999990687,"fetchStart":379.89999999990687,"redirectEnd":0,"redirectStart":0,"requestStart":379.89999999990687,"responseEnd":993,"responseStart":993,"secureConnectionStart":379.89999999990687},{"duration":613.2999999999302,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":380.0999999999767,"connectEnd":380.0999999999767,"connectStart":380.0999999999767,"domainLookupEnd":380.0999999999767,"domainLookupStart":380.0999999999767,"fetchStart":380.0999999999767,"redirectEnd":0,"redirectStart":0,"requestStart":380.0999999999767,"responseEnd":993.3999999999069,"responseStart":993.3999999999069,"secureConnectionStart":380.0999999999767},{"duration":613.9000000000233,"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":380.29999999993015,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":380.29999999993015,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":994.1999999999534,"responseStart":0,"secureConnectionStart":0},{"duration":613.2999999999302,"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":380.5,"connectEnd":380.5,"connectStart":380.5,"domainLookupEnd":380.5,"domainLookupStart":380.5,"fetchStart":380.5,"redirectEnd":0,"redirectStart":0,"requestStart":380.5,"responseEnd":993.7999999999302,"responseStart":993.7999999999302,"secureConnectionStart":380.5},{"duration":844.0999999999767,"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":385.5,"connectEnd":385.5,"connectStart":385.5,"domainLookupEnd":385.5,"domainLookupStart":385.5,"fetchStart":385.5,"redirectEnd":0,"redirectStart":0,"requestStart":385.5,"responseEnd":1229.5999999999767,"responseStart":1229.5999999999767,"secureConnectionStart":385.5},{"duration":1447.5999999999767,"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":385.5,"connectEnd":385.5,"connectStart":385.5,"domainLookupEnd":385.5,"domainLookupStart":385.5,"fetchStart":385.5,"redirectEnd":0,"redirectStart":0,"requestStart":385.5,"responseEnd":1833.0999999999767,"responseStart":1833.0999999999767,"secureConnectionStart":385.5},{"duration":483.9000000000233,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":688.7999999999302,"connectEnd":688.7999999999302,"connectStart":688.7999999999302,"domainLookupEnd":688.7999999999302,"domainLookupStart":688.7999999999302,"fetchStart":688.7999999999302,"redirectEnd":0,"redirectStart":0,"requestStart":688.7999999999302,"responseEnd":1172.6999999999534,"responseStart":1172.6999999999534,"secureConnectionStart":688.7999999999302},{"duration":579.1000000000931,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bv2/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":1254.8999999999069,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1254.8999999999069,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1834,"responseStart":0,"secureConnectionStart":0},{"duration":581,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":1255.7999999999302,"connectEnd":1255.7999999999302,"connectStart":1255.7999999999302,"domainLookupEnd":1255.7999999999302,"domainLookupStart":1255.7999999999302,"fetchStart":1255.7999999999302,"redirectEnd":0,"redirectStart":0,"requestStart":1255.7999999999302,"responseEnd":1836.7999999999302,"responseStart":1836.7999999999302,"secureConnectionStart":1255.7999999999302},{"duration":588.8000000000466,"initiatorType":"script","name":"https://jira.mariadb.org/s/53a43b6764f587426c7bb9a150184c00-CDN/lu2bv2/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":1256.1999999999534,"connectEnd":1256.1999999999534,"connectStart":1256.1999999999534,"domainLookupEnd":1256.1999999999534,"domainLookupStart":1256.1999999999534,"fetchStart":1256.1999999999534,"redirectEnd":0,"redirectStart":0,"requestStart":1256.1999999999534,"responseEnd":1845,"responseStart":1845,"secureConnectionStart":1256.1999999999534}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":162,"responseStart":373,"responseEnd":378,"domLoading":376,"domInteractive":1856,"domContentLoadedEventStart":1856,"domContentLoadedEventEnd":1896,"domComplete":3440,"loadEventStart":3440,"loadEventEnd":3442,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1838},{"name":"bigPipe.sidebar-id.end","time":1838.6999999999534},{"name":"bigPipe.activity-panel-pipe-id.start","time":1838.7999999999302},{"name":"bigPipe.activity-panel-pipe-id.end","time":1841},{"name":"activityTabFullyLoaded","time":1902.8999999999069}],"measures":[],"correlationId":"5b4b397d1d1da8","effectiveType":"4g","downlink":9.2,"rtt":0,"serverDuration":93,"dbReadsTimeInMs":10,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}