10.3 3722372ae56b7ea90
|
mysqld: /data/src/10.3/storage/innobase/include/trx0sys.h:186: bool trx_id_check(const void*, trx_id_t): Assertion `id == 0 || id > trx_id' failed.
|
171024 20:59:53 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007f00bc64bee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
|
#8 0x00005639db364f32 in trx_id_check (db_trx_id=0x7f00b6258082, trx_id=1287) at /data/src/10.3/storage/innobase/include/trx0sys.h:186
|
#9 0x00005639db384c68 in row_log_table_apply_delete (thr=0x7f006c14b160, trx_id_col=1, mrec=0x7f00b40df01f "\200", moffsets=0x7f006c17d230, offsets_heap=0x7f006c0645d0, heap=0x7f006c060540, log=0x7f006c040400, save_ext=0x0, ext_size=0) at /data/src/10.3/storage/innobase/row/row0log.cc:2065
|
#10 0x00005639db3869b9 in row_log_table_apply_op (thr=0x7f006c14b160, new_trx_id_col=1, dup=0x7f00b426d560, error=0x7f00b426d30c, offsets_heap=0x7f006c0645d0, heap=0x7f006c060540, mrec=0x7f00b40df01f "\200", mrec_end=0x7f00b40df030 "", offsets=0x7f006c17d230) at /data/src/10.3/storage/innobase/row/row0log.cc:2624
|
#11 0x00005639db388ca8 in row_log_table_apply_ops (thr=0x7f006c14b160, dup=0x7f00b426d560, stage=0x7f006c17b350) at /data/src/10.3/storage/innobase/row/row0log.cc:3177
|
#12 0x00005639db389267 in row_log_table_apply (thr=0x7f006c14b160, old_table=0x7f006c093d88, table=0x7f006c152bd0, stage=0x7f006c17b350) at /data/src/10.3/storage/innobase/row/row0log.cc:3276
|
#13 0x00005639db259e2f in commit_try_rebuild (ha_alter_info=0x7f00b426e520, ctx=0x7f006c015fc8, altered_table=0x7f006c152bd0, old_table=0x7f006c14fbd0, trx=0x7f00b65780d8, table_name=0x7f006c14e20d "t2") at /data/src/10.3/storage/innobase/handler/handler0alter.cc:8301
|
#14 0x00005639db254a90 in ha_innobase::commit_inplace_alter_table (this=0x7f006c1507f8, altered_table=0x7f006c152bd0, ha_alter_info=0x7f00b426e520, commit=true) at /data/src/10.3/storage/innobase/handler/handler0alter.cc:9137
|
#15 0x00005639daef0c76 in handler::ha_commit_inplace_alter_table (this=0x7f006c1507f8, altered_table=0x7f006c152bd0, ha_alter_info=0x7f00b426e520, commit=true) at /data/src/10.3/sql/handler.cc:4251
|
#16 0x00005639dacf7f58 in mysql_inplace_alter_table (thd=0x7f006c000b00, table_list=0x7f006c014ae8, table=0x7f006c14fbd0, altered_table=0x7f006c152bd0, ha_alter_info=0x7f00b426e520, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7f00b426e590, alter_ctx=0x7f00b426f150) at /data/src/10.3/sql/sql_table.cc:7229
|
#17 0x00005639dacfd23c in mysql_alter_table (thd=0x7f006c000b00, new_db=0x7f006c0150f8 "test", new_name=0x0, create_info=0x7f00b426fd60, table_list=0x7f006c014ae8, alter_info=0x7f00b426fcb0, order_num=0, order=0x0, ignore=false) at /data/src/10.3/sql/sql_table.cc:9205
|
#18 0x00005639dad7be7b in Sql_cmd_alter_table::execute (this=0x7f006c015100, thd=0x7f006c000b00) at /data/src/10.3/sql/sql_alter.cc:331
|
#19 0x00005639dac2f172 in mysql_execute_command (thd=0x7f006c000b00) at /data/src/10.3/sql/sql_parse.cc:6236
|
#20 0x00005639dac33a1c in mysql_parse (thd=0x7f006c000b00, rawbuf=0x7f006c0149f8 "ALTER TABLE t2 ROW_FORMAT=DYNAMIC", length=33, parser_state=0x7f00b4271610, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7921
|
#21 0x00005639dac211bd in dispatch_command (command=COM_QUERY, thd=0x7f006c000b00, packet=0x7f006c08fce1 "ALTER TABLE t2 ROW_FORMAT=DYNAMIC", packet_length=33, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1819
|
#22 0x00005639dac1fc1b in do_command (thd=0x7f006c000b00) at /data/src/10.3/sql/sql_parse.cc:1370
|
#23 0x00005639dad769f4 in do_handle_one_connection (connect=0x5639de539bc0) at /data/src/10.3/sql/sql_connect.cc:1418
|
#24 0x00005639dad76781 in handle_one_connection (arg=0x5639de539bc0) at /data/src/10.3/sql/sql_connect.cc:1324
|
#25 0x00005639db1f0f4c in pfs_spawn_thread (arg=0x5639de5567b0) at /data/src/10.3/storage/perfschema/pfs.cc:1862
|
#26 0x00007f00be590494 in start_thread (arg=0x7f00b4272700) at pthread_create.c:333
|
#27 0x00007f00bc70893f in clone () from /lib/x86_64-linux-gnu/libc.so.6
|
The test case is not deterministic. If it doesn't fail right away, try running with --repeat.
Also, running with innodb_flush_log_at_trx_commit=2 significantly increased the probability of the race condition in original stress tests while running on disk – once in a few minutes vs once in many hours; and further, running in shm increased the probability even more, to once in a few seconds. Currently the MTR test below fails pretty much every time for me, even on disk and without innodb_flush_log_at_trx_commit=2, so I cannot say whether those options have any effect on it.
--source include/have_innodb.inc
|
|
CREATE TABLE t1 (pk INT PRIMARY KEY, i INT) ENGINE=InnoDB;
|
CREATE TABLE t2 (pk INT PRIMARY KEY, i INT) ENGINE=InnoDB;
|
|
--connect (con1,localhost,root,,test)
|
BEGIN;
|
--send
|
INSERT INTO t1 VALUES (1,10);
|
|
--connection default
|
--send
|
ALTER TABLE t2 ROW_FORMAT=DYNAMIC;
|
|
--connection con1
|
--reap
|
INSERT INTO t2 VALUES (2,20);
|
ROLLBACK;
|
|
--connection default
|
--reap
|
|
# Cleanup
|
--disconnect con1
|
--connection default
|
DROP TABLE t1, t2;
|
Does not fail on 10.2.
No visible effect on 10.3 non-debug build.
The problem rather badly affects upgrade tests on 10.3 (the laste step, when DDL/DML is running on the upgraded server), causes a lot of failures unrelated to upgrade as such.
{"report":{"fcp":910.5999999046326,"ttfb":265.30000019073486,"pageVisibility":"visible","entityId":63176,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"8b6468da-768a-4c1d-81fa-bc0b32187c0d","navigationType":0,"readyForUser":1023.6999998092651,"redirectCount":0,"resourceLoadedEnd":996.1999998092651,"resourceLoadedStart":270.90000009536743,"resourceTiming":[{"duration":99.69999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":270.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":270.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":370.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":100,"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":271.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":271.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":371.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":154.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":271.30000019073486,"connectEnd":271.30000019073486,"connectStart":271.30000019073486,"domainLookupEnd":271.30000019073486,"domainLookupStart":271.30000019073486,"fetchStart":271.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":271.30000019073486,"responseEnd":425.90000009536743,"responseStart":425.90000009536743,"secureConnectionStart":271.30000019073486},{"duration":271.30000019073486,"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":271.59999990463257,"connectEnd":271.59999990463257,"connectStart":271.59999990463257,"domainLookupEnd":271.59999990463257,"domainLookupStart":271.59999990463257,"fetchStart":271.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":271.59999990463257,"responseEnd":542.9000000953674,"responseStart":542.9000000953674,"secureConnectionStart":271.59999990463257},{"duration":275.30000019073486,"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":271.69999980926514,"connectEnd":271.69999980926514,"connectStart":271.69999980926514,"domainLookupEnd":271.69999980926514,"domainLookupStart":271.69999980926514,"fetchStart":271.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":271.69999980926514,"responseEnd":547,"responseStart":547,"secureConnectionStart":271.69999980926514},{"duration":267.59999990463257,"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":279.80000019073486,"connectEnd":279.80000019073486,"connectStart":279.80000019073486,"domainLookupEnd":279.80000019073486,"domainLookupStart":279.80000019073486,"fetchStart":279.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":279.80000019073486,"responseEnd":547.4000000953674,"responseStart":547.4000000953674,"secureConnectionStart":279.80000019073486},{"duration":267.6000003814697,"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":280.19999980926514,"connectEnd":280.19999980926514,"connectStart":280.19999980926514,"domainLookupEnd":280.19999980926514,"domainLookupStart":280.19999980926514,"fetchStart":280.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":280.19999980926514,"responseEnd":547.8000001907349,"responseStart":547.8000001907349,"secureConnectionStart":280.19999980926514},{"duration":289.19999980926514,"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":280.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":280.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":569.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":267.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":280.59999990463257,"connectEnd":280.59999990463257,"connectStart":280.59999990463257,"domainLookupEnd":280.59999990463257,"domainLookupStart":280.59999990463257,"fetchStart":280.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":280.59999990463257,"responseEnd":548.1999998092651,"responseStart":548.1999998092651,"secureConnectionStart":280.59999990463257},{"duration":289.09999990463257,"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":280.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":280.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":569.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":267.90000009536743,"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":281,"connectEnd":281,"connectStart":281,"domainLookupEnd":281,"domainLookupStart":281,"fetchStart":281,"redirectEnd":0,"redirectStart":0,"requestStart":281,"responseEnd":548.9000000953674,"responseStart":548.9000000953674,"secureConnectionStart":281},{"duration":338.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":287.30000019073486,"connectEnd":287.30000019073486,"connectStart":287.30000019073486,"domainLookupEnd":287.30000019073486,"domainLookupStart":287.30000019073486,"fetchStart":287.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":287.30000019073486,"responseEnd":625.9000000953674,"responseStart":625.9000000953674,"secureConnectionStart":287.30000019073486},{"duration":395.7999997138977,"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":287.40000009536743,"connectEnd":287.40000009536743,"connectStart":287.40000009536743,"domainLookupEnd":287.40000009536743,"domainLookupStart":287.40000009536743,"fetchStart":287.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":287.40000009536743,"responseEnd":683.1999998092651,"responseStart":683.1999998092651,"secureConnectionStart":287.40000009536743},{"duration":53.40000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":597.9000000953674,"connectEnd":597.9000000953674,"connectStart":597.9000000953674,"domainLookupEnd":597.9000000953674,"domainLookupStart":597.9000000953674,"fetchStart":597.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":597.9000000953674,"responseEnd":651.3000001907349,"responseStart":651.3000001907349,"secureConnectionStart":597.9000000953674},{"duration":138.7999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/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&whisper-enabled=true","startTime":857.4000000953674,"connectEnd":857.4000000953674,"connectStart":857.4000000953674,"domainLookupEnd":857.4000000953674,"domainLookupStart":857.4000000953674,"fetchStart":857.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":857.4000000953674,"responseEnd":996.1999998092651,"responseStart":996.1999998092651,"secureConnectionStart":857.4000000953674},{"duration":205.80000019073486,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":902,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":902,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1107.8000001907349,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":77,"responseStart":266,"responseEnd":280,"domLoading":269,"domInteractive":1151,"domContentLoadedEventStart":1151,"domContentLoadedEventEnd":1236,"domComplete":1275,"loadEventStart":1275,"loadEventEnd":1276,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1110.9000000953674},{"name":"bigPipe.sidebar-id.end","time":1111.6999998092651},{"name":"bigPipe.activity-panel-pipe-id.start","time":1111.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.end","time":1115.5},{"name":"activityTabFullyLoaded","time":1258}],"measures":[],"correlationId":"bde8ec4ba72333","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":120,"dbReadsTimeInMs":16,"dbConnsTimeInMs":25,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
When logging ROW_T_INSERT or ROW_T_UPDATE records, we did not normalize the DB_TRX_ID of the current transaction into 0 if the current transaction had started (modifying other tables) before the ALTER TABLE started.
Starting with
MDEV-13654, this normalization was already performed for ROW_T_DELETE, and for all operations with ADD PRIMARY KEY, in row_log_table_get_pk().