Run the test case with --mysqld=--lock-wait-timeout=2 --repeat=50 --mem.
--source include/have_innodb.inc
|
|
CREATE TABLE t1 (y YEAR, vy YEAR AS (y) VIRTUAL, pk INT, PRIMARY KEY(pk), UNIQUE(vy)) ENGINE=InnoDB;
|
|
INSERT IGNORE INTO t1 (pk,y) VALUES (1,2022);
|
REPLACE INTO t1 (pk,y) SELECT pk,y FROM t1;
|
ALTER TABLE t1 ENGINE=InnoDB;
|
REPLACE INTO t1 (pk,y) SELECT pk,y FROM t1;
|
TRUNCATE TABLE t1;
|
|
# Cleanup
|
DROP TABLE t1;
|
10.3 18e8d420b796
|
mysqld: /data/src/10.3/storage/innobase/handler/ha_innodb.cc:21079: dfield_t* innobase_get_computed_value(const dtuple_t*, const dict_v_col_t*, const dict_index_t*, mem_heap_t**, mem_heap_t*, const dict_field_t*, THD*, TABLE*, const dict_table_t*, upd_t*, dict_foreign_t*): Assertion `mysql_table' failed.
|
180412 21:12:28 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007ff408cd1ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
|
#8 0x0000559e7ce7dbef in innobase_get_computed_value (row=0x7ff3cc015dd0, col=0x7ff3ac075198, index=0x7ff3ac1738f8, local_heap=0x7ff3ecff7990, heap=0x7ff3cc015d00, ifield=0x0, thd=0x7ff3cc000b00, mysql_table=0x0, old_table=0x0, parent_update=0x0, foreign=0x0) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:21079
|
#9 0x0000559e7d0281bd in row_vers_build_clust_v_col (row=0x7ff3cc015dd0, clust_index=0x7ff3ac1738f8, index=0x7ff3ac174658, heap=0x7ff3cc015d00) at /data/src/10.3/storage/innobase/row/row0vers.cc:473
|
#10 0x0000559e7d0291dc in row_vers_old_has_index_entry (also_curr=1, rec=0x7ff3fe76c07e "\200", mtr=0x7ff3ecff7ac0, index=0x7ff3ac174658, ientry=0x7ff3cc0144e8, roll_ptr=3940649694921243, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:921
|
#11 0x0000559e7cfdda78 in row_purge_poss_sec (node=0x559e7f8df308, index=0x7ff3ac174658, entry=0x7ff3cc0144e8) at /data/src/10.3/storage/innobase/row/row0purge.cc:265
|
#12 0x0000559e7cfde2a5 in row_purge_remove_sec_if_poss_leaf (node=0x559e7f8df308, index=0x7ff3ac174658, entry=0x7ff3cc0144e8) at /data/src/10.3/storage/innobase/row/row0purge.cc:477
|
#13 0x0000559e7cfde75e in row_purge_remove_sec_if_poss (node=0x559e7f8df308, index=0x7ff3ac174658, entry=0x7ff3cc0144e8) at /data/src/10.3/storage/innobase/row/row0purge.cc:584
|
#14 0x0000559e7cfde95b in row_purge_del_mark (node=0x559e7f8df308) at /data/src/10.3/storage/innobase/row/row0purge.cc:654
|
#15 0x0000559e7cfdfdc7 in row_purge_record_func (node=0x559e7f8df308, undo_rec=0x559e7f8df8b8 "", thr=0x559e7f8df138, updated_extern=false) at /data/src/10.3/storage/innobase/row/row0purge.cc:1043
|
#16 0x0000559e7cfe00e4 in row_purge (node=0x559e7f8df308, undo_rec=0x559e7f8df8b8 "", thr=0x559e7f8df138) at /data/src/10.3/storage/innobase/row/row0purge.cc:1108
|
#17 0x0000559e7cfe03e5 in row_purge_step (thr=0x559e7f8df138) at /data/src/10.3/storage/innobase/row/row0purge.cc:1187
|
#18 0x0000559e7cf646cc in que_thr_step (thr=0x559e7f8df138) at /data/src/10.3/storage/innobase/que/que0que.cc:1051
|
#19 0x0000559e7cf648ff in que_run_threads_low (thr=0x559e7f8df138) at /data/src/10.3/storage/innobase/que/que0que.cc:1113
|
#20 0x0000559e7cf64af0 in que_run_threads (thr=0x559e7f8df138) at /data/src/10.3/storage/innobase/que/que0que.cc:1153
|
#21 0x0000559e7d031916 in srv_task_execute () at /data/src/10.3/storage/innobase/srv/srv0srv.cc:2485
|
#22 0x0000559e7d031abb in srv_worker_thread (arg=0x0) at /data/src/10.3/storage/innobase/srv/srv0srv.cc:2533
|
#23 0x00007ff40a9a8494 in start_thread (arg=0x7ff3ecff9700) at pthread_create.c:333
|
#24 0x00007ff408d8e93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
|
Couldn't reproduce on 10.2.
See comments for the test case which affects non-debug build.
{"report":{"fcp":1104.1999998092651,"ttfb":294.2999997138977,"pageVisibility":"visible","entityId":66809,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"73f59ec6-40c9-4c54-8bed-152cd347b37b","navigationType":0,"readyForUser":1216.5,"redirectCount":0,"resourceLoadedEnd":1287.7999997138977,"resourceLoadedStart":303.19999980926514,"resourceTiming":[{"duration":166,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":303.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":303.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":469.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":166.10000038146973,"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":303.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":303.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":469.5,"responseStart":0,"secureConnectionStart":0},{"duration":231.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":303.69999980926514,"connectEnd":303.69999980926514,"connectStart":303.69999980926514,"domainLookupEnd":303.69999980926514,"domainLookupStart":303.69999980926514,"fetchStart":303.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":303.69999980926514,"responseEnd":535.2999997138977,"responseStart":535.2999997138977,"secureConnectionStart":303.69999980926514},{"duration":377,"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":303.7999997138977,"connectEnd":303.7999997138977,"connectStart":303.7999997138977,"domainLookupEnd":303.7999997138977,"domainLookupStart":303.7999997138977,"fetchStart":303.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":303.7999997138977,"responseEnd":680.7999997138977,"responseStart":680.7999997138977,"secureConnectionStart":303.7999997138977},{"duration":400.90000009536743,"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":304.09999990463257,"connectEnd":304.09999990463257,"connectStart":304.09999990463257,"domainLookupEnd":304.09999990463257,"domainLookupStart":304.09999990463257,"fetchStart":304.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":304.09999990463257,"responseEnd":705,"responseStart":705,"secureConnectionStart":304.09999990463257},{"duration":401.30000019073486,"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":304.19999980926514,"connectEnd":304.19999980926514,"connectStart":304.19999980926514,"domainLookupEnd":304.19999980926514,"domainLookupStart":304.19999980926514,"fetchStart":304.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":304.19999980926514,"responseEnd":705.5,"responseStart":705.5,"secureConnectionStart":304.19999980926514},{"duration":401.5,"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":304.3999996185303,"connectEnd":304.3999996185303,"connectStart":304.3999996185303,"domainLookupEnd":304.3999996185303,"domainLookupStart":304.3999996185303,"fetchStart":304.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":304.3999996185303,"responseEnd":705.8999996185303,"responseStart":705.8999996185303,"secureConnectionStart":304.3999996185303},{"duration":420.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":304.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":304.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":724.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":401.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":304.69999980926514,"connectEnd":304.69999980926514,"connectStart":304.69999980926514,"domainLookupEnd":304.69999980926514,"domainLookupStart":304.69999980926514,"fetchStart":304.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":304.69999980926514,"responseEnd":706.3999996185303,"responseStart":706.3999996185303,"secureConnectionStart":304.69999980926514},{"duration":419.90000009536743,"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":304.8999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":304.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":724.7999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":412.69999980926514,"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":305,"connectEnd":305,"connectStart":305,"domainLookupEnd":305,"domainLookupStart":305,"fetchStart":305,"redirectEnd":0,"redirectStart":0,"requestStart":305,"responseEnd":717.6999998092651,"responseStart":717.6999998092651,"secureConnectionStart":305},{"duration":528.5999999046326,"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":306.59999990463257,"connectEnd":306.59999990463257,"connectStart":306.59999990463257,"domainLookupEnd":306.59999990463257,"domainLookupStart":306.59999990463257,"fetchStart":306.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":306.59999990463257,"responseEnd":835.1999998092651,"responseStart":835.1999998092651,"secureConnectionStart":306.59999990463257},{"duration":677.8000001907349,"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":332.2999997138977,"connectEnd":332.2999997138977,"connectStart":332.2999997138977,"domainLookupEnd":332.2999997138977,"domainLookupStart":332.2999997138977,"fetchStart":332.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":332.2999997138977,"responseEnd":1010.0999999046326,"responseStart":1010.0999999046326,"secureConnectionStart":332.2999997138977},{"duration":112.10000038146973,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":753.8999996185303,"connectEnd":753.8999996185303,"connectStart":753.8999996185303,"domainLookupEnd":753.8999996185303,"domainLookupStart":753.8999996185303,"fetchStart":753.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":753.8999996185303,"responseEnd":866,"responseStart":866,"secureConnectionStart":753.8999996185303},{"duration":42.60000038146973,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/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&whisper-enabled=true","startTime":1009.8999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1009.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1052.5,"responseStart":0,"secureConnectionStart":0},{"duration":42.30000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/50bc9be5bfead1a25e72c1a9338c94f6-CDN/lu2cib/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/css/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1010.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1010.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1052.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":272.2000002861023,"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":1011.3999996185303,"connectEnd":1011.3999996185303,"connectStart":1011.3999996185303,"domainLookupEnd":1011.3999996185303,"domainLookupStart":1011.3999996185303,"fetchStart":1011.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":1011.3999996185303,"responseEnd":1283.5999999046326,"responseStart":1283.5999999046326,"secureConnectionStart":1011.3999996185303},{"duration":274.2000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/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&whisper-enabled=true","startTime":1011.7999997138977,"connectEnd":1011.7999997138977,"connectStart":1011.7999997138977,"domainLookupEnd":1011.7999997138977,"domainLookupStart":1011.7999997138977,"fetchStart":1011.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":1011.7999997138977,"responseEnd":1286,"responseStart":1286,"secureConnectionStart":1011.7999997138977},{"duration":275.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/e0bf5781d46ea69fb123572974cf39de-CDN/lu2cib/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/js/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":1012.1999998092651,"connectEnd":1012.1999998092651,"connectStart":1012.1999998092651,"domainLookupEnd":1012.1999998092651,"domainLookupStart":1012.1999998092651,"fetchStart":1012.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1012.1999998092651,"responseEnd":1287.7999997138977,"responseStart":1287.7999997138977,"secureConnectionStart":1012.1999998092651}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":88,"responseStart":294,"responseEnd":299,"domLoading":299,"domInteractive":1322,"domContentLoadedEventStart":1322,"domContentLoadedEventEnd":1398,"domComplete":1822,"loadEventStart":1822,"loadEventEnd":1823,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1265.5999999046326},{"name":"bigPipe.sidebar-id.end","time":1266.3999996185303},{"name":"bigPipe.activity-panel-pipe-id.start","time":1266.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1272.0999999046326},{"name":"activityTabFullyLoaded","time":1422}],"measures":[],"correlationId":"3a62e81846e09e","effectiveType":"4g","downlink":9.8,"rtt":0,"serverDuration":135,"dbReadsTimeInMs":24,"dbConnsTimeInMs":34,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Problem is that there is a deadlock between purge and truncate operation.
Truncate operation holds MDL LOCK on the table (t1) and tries to acquire InnoDB dict_operation_lock.
Purge holds InnoDB dict_operation_lock and tries to acquire MDL LOCK on the table (t1) to calculate
the virtual column value. It leads to hang of server.
Test case scenario has lock_wait_timeout as 2 seconds. So it leads to crash else it could lead to hang.