[Current thread is 1 (Thread 0x14d5607c4700 (LWP 3602388))]
(gdb) bt
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
#1 0x000055969b0bd343 in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
#2 0x000055969a85dd1d in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:331
#3 <signal handler called>
#4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#5 0x000014d569c29859 in __GI_abort () at abort.c:79
#6 0x000055969aea265c in ut_dbg_assertion_failed (expr=expr@entry=0x55969b4cff50 "trx->roll_limit <= trx->undo_no", file=file@entry=0x55969b4cfeb8 "/test/10.6_dbg/storage/innobase/trx/trx0roll.cc", line=line@entry=869) at /test/10.6_dbg/storage/innobase/ut/ut0dbg.cc:60
#7 0x000055969ae79acf in trx_rollback_start (roll_limit=1, trx=0x14d560a7e168) at /test/10.6_dbg/storage/innobase/trx/trx0roll.cc:869
#8 trx_rollback_step (thr=thr@entry=0x14d50c024678) at /test/10.6_dbg/storage/innobase/trx/trx0roll.cc:935
#9 0x000055969ad70653 in que_thr_step (thr=0x14d50c024678) at /test/10.6_dbg/storage/innobase/que/que0que.cc:659
#10 que_run_threads_low (thr=0x14d50c024678) at /test/10.6_dbg/storage/innobase/que/que0que.cc:709
#11 que_run_threads (thr=thr@entry=0x14d50c024678) at /test/10.6_dbg/storage/innobase/que/que0que.cc:729
#12 0x000055969ae7d34d in trx_t::rollback_low (this=this@entry=0x14d560a7e168, savept=savept@entry=0x14d50c0080a0) at /test/10.6_dbg/storage/innobase/trx/trx0roll.cc:116
#13 0x000055969ae79ca0 in trx_t::rollback (this=this@entry=0x14d560a7e168, savept=savept@entry=0x14d50c0080a0) at /test/10.6_dbg/storage/innobase/trx/trx0roll.cc:164
#14 0x000055969ae7ba4d in trx_rollback_to_savepoint_for_mysql_low (mysql_binlog_cache_pos=0x14d5607c2cd8, savep=0x14d50c008098, trx=0x14d560a7e168) at /test/10.6_dbg/storage/innobase/trx/trx0roll.cc:419
#15 trx_rollback_to_savepoint_for_mysql (trx=trx@entry=0x14d560a7e168, savepoint_name=savepoint_name@entry=0x14d5607c2d00 "84AJ5M0EG", mysql_binlog_cache_pos=mysql_binlog_cache_pos@entry=0x14d5607c2cd8) at /test/10.6_dbg/storage/innobase/trx/trx0roll.cc:478
#16 0x000055969ac4745e in innobase_rollback_to_savepoint (hton=<optimized out>, thd=0x14d50c000db8, savepoint=0x14d50c019c88) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:4387
#17 0x000055969a863fa0 in ha_rollback_to_savepoint (thd=thd@entry=0x14d50c000db8, sv=sv@entry=0x14d50c019c50) at /test/10.6_dbg/sql/handler.cc:2502
#18 0x000055969a70b78c in trans_rollback_to_savepoint (thd=thd@entry=0x14d50c000db8, name=<optimized out>) at /test/10.6_dbg/sql/transaction.cc:697
#19 0x000055969a5a2b88 in mysql_execute_command (thd=thd@entry=0x14d50c000db8) at /test/10.6_dbg/sql/sql_parse.cc:5670
#20 0x000055969a58a264 in mysql_parse (thd=thd@entry=0x14d50c000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14d5607c3410) at /test/10.6_dbg/sql/sql_parse.cc:8004
#21 0x000055969a598e6a in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14d50c000db8, packet=packet@entry=0x14d50c00b359 "ROLLBACK TO SAVEPOINT a3", packet_length=packet_length@entry=24, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1331
#22 0x000055969a59c245 in do_command (thd=0x14d50c000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1399
#23 0x000055969a6f5452 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55969cc4c8a8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
#24 0x000055969a6f5a57 in handle_one_connection (arg=arg@entry=0x55969cc4c8a8) at /test/10.6_dbg/sql/sql_connect.cc:1312
#25 0x000055969ab9fea5 in pfs_spawn_thread (arg=0x55969cb70f48) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
#26 0x000014d56a137609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#27 0x000014d569d26293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
MDEV-25315 May end up being a duplicate of this one. It has many new stacks, and all testcase disable both unique & FK checks.
Roel Van de Paar
added a comment - - edited MDEV-25315 May end up being a duplicate of this one. It has many new stacks, and all testcase disable both unique & FK checks.
Roel, ok, it seems they're needed because after MDEV-24818 they enable new 10.6 feature MDEV-515, InnoDB bulk insert
Sergei Golubchik
added a comment - - edited Roel , ok, it seems they're needed because after MDEV-24818 they enable new 10.6 feature MDEV-515 , InnoDB bulk insert
Here is a simpler test case. The tables may be temporary or persistent ones; it does not matter.
--source include/have_innodb.inc
CREATETEMPORARYTABLE t1 (c INTKEY) ENGINE=InnoDB;
CREATETEMPORARYTABLE t2 (c INT) ENGINE=InnoDB;
SET SESSION foreign_key_checks=0, unique_checks=0;
BEGIN;
INSERTINTO t1 VALUES(0);
SAVEPOINT x;
INSERTINTO t2 VALUES(0);
--error ER_DUP_ENTRY
INSERTINTO t1 VALUES(0);
ROLLBACKTO SAVEPOINT x;
COMMIT;
SELECT * FROM t1;
SELECT * FROM t2;
DROPTEMPORARYTABLE t1,t2;
The problem is that with the MDEV-24818 optimization, on any error we will intentionally roll back to the start of the transaction. We should probably reset all ‘promised’ savepoints to point to the start of the transaction at that point. The assertion fails, because we are attempting to roll back to a ‘future’ savepoint.
Marko Mäkelä
added a comment - Here is a simpler test case. The tables may be temporary or persistent ones; it does not matter.
--source include/have_innodb.inc
CREATE TEMPORARY TABLE t1 (c INT KEY ) ENGINE=InnoDB;
CREATE TEMPORARY TABLE t2 (c INT ) ENGINE=InnoDB;
SET SESSION foreign_key_checks=0, unique_checks=0;
BEGIN ;
INSERT INTO t1 VALUES (0);
SAVEPOINT x;
INSERT INTO t2 VALUES (0);
--error ER_DUP_ENTRY
INSERT INTO t1 VALUES (0);
ROLLBACK TO SAVEPOINT x;
COMMIT ;
SELECT * FROM t1;
SELECT * FROM t2;
DROP TEMPORARY TABLE t1,t2;
The problem is that with the MDEV-24818 optimization, on any error we will intentionally roll back to the start of the transaction. We should probably reset all ‘promised’ savepoints to point to the start of the transaction at that point. The assertion fails, because we are attempting to roll back to a ‘future’ savepoint.
When the MDEV-24818 multi-statement bulk insert fails, we will roll back to the start of the transaction.
To fix this bug, we will discard any savepoints, so that ROLLBACK TO SAVEPOINT will report an error instead of attempting to roll back to a savepoint that is no longer valid.
Marko Mäkelä
added a comment - When the MDEV-24818 multi-statement bulk insert fails, we will roll back to the start of the transaction.
To fix this bug, we will discard any savepoints, so that ROLLBACK TO SAVEPOINT will report an error instead of attempting to roll back to a savepoint that is no longer valid.
People
Marko Mäkelä
Roel Van de Paar
Votes:
0Vote for this issue
Watchers:
4Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":1093.4000000953674,"ttfb":223.5,"pageVisibility":"visible","entityId":98394,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"d4839e2d-e58c-49cd-80a8-5370e359187a","navigationType":0,"readyForUser":1203.9000000953674,"redirectCount":0,"resourceLoadedEnd":1257.3000001907349,"resourceLoadedStart":230.30000019073486,"resourceTiming":[{"duration":328.19999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":230.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":230.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":558.5,"responseStart":0,"secureConnectionStart":0},{"duration":328.2000002861023,"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":230.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":230.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":558.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":336,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":230.80000019073486,"connectEnd":230.80000019073486,"connectStart":230.80000019073486,"domainLookupEnd":230.80000019073486,"domainLookupStart":230.80000019073486,"fetchStart":230.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":230.80000019073486,"responseEnd":566.8000001907349,"responseStart":566.8000001907349,"secureConnectionStart":230.80000019073486},{"duration":496.80000019073486,"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":231,"connectEnd":231,"connectStart":231,"domainLookupEnd":231,"domainLookupStart":231,"fetchStart":231,"redirectEnd":0,"redirectStart":0,"requestStart":231,"responseEnd":727.8000001907349,"responseStart":727.8000001907349,"secureConnectionStart":231},{"duration":501.59999990463257,"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":231.2000002861023,"connectEnd":231.2000002861023,"connectStart":231.2000002861023,"domainLookupEnd":231.2000002861023,"domainLookupStart":231.2000002861023,"fetchStart":231.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":231.2000002861023,"responseEnd":732.8000001907349,"responseStart":732.8000001907349,"secureConnectionStart":231.2000002861023},{"duration":524,"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":231.40000009536743,"connectEnd":231.40000009536743,"connectStart":231.40000009536743,"domainLookupEnd":231.40000009536743,"domainLookupStart":231.40000009536743,"fetchStart":231.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":231.40000009536743,"responseEnd":755.4000000953674,"responseStart":755.4000000953674,"secureConnectionStart":231.40000009536743},{"duration":524.3000001907349,"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":231.59999990463257,"connectEnd":231.59999990463257,"connectStart":231.59999990463257,"domainLookupEnd":231.59999990463257,"domainLookupStart":231.59999990463257,"fetchStart":231.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":231.59999990463257,"responseEnd":755.9000000953674,"responseStart":755.9000000953674,"secureConnectionStart":231.59999990463257},{"duration":540.2999997138977,"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":231.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":231.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":772.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":538.2000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":232,"connectEnd":232,"connectStart":232,"domainLookupEnd":232,"domainLookupStart":232,"fetchStart":232,"redirectEnd":0,"redirectStart":0,"requestStart":232,"responseEnd":770.2000002861023,"responseStart":770.2000002861023,"secureConnectionStart":232},{"duration":540.0999999046326,"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":232.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":232.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":772.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":538.5,"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":232.30000019073486,"connectEnd":232.30000019073486,"connectStart":232.30000019073486,"domainLookupEnd":232.30000019073486,"domainLookupStart":232.30000019073486,"fetchStart":232.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":232.30000019073486,"responseEnd":770.8000001907349,"responseStart":770.8000001907349,"secureConnectionStart":232.30000019073486},{"duration":791.8000001907349,"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":239,"connectEnd":239,"connectStart":239,"domainLookupEnd":239,"domainLookupStart":239,"fetchStart":239,"redirectEnd":0,"redirectStart":0,"requestStart":239,"responseEnd":1030.8000001907349,"responseStart":1030.8000001907349,"secureConnectionStart":239},{"duration":1017,"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":239.09999990463257,"connectEnd":239.09999990463257,"connectStart":239.09999990463257,"domainLookupEnd":239.09999990463257,"domainLookupStart":239.09999990463257,"fetchStart":239.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":239.09999990463257,"responseEnd":1256.0999999046326,"responseStart":1256,"secureConnectionStart":239.09999990463257},{"duration":263.7000002861023,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":755.5,"connectEnd":755.5,"connectStart":755.5,"domainLookupEnd":755.5,"domainLookupStart":755.5,"fetchStart":755.5,"redirectEnd":0,"redirectStart":0,"requestStart":755.5,"responseEnd":1019.2000002861023,"responseStart":1019.2000002861023,"secureConnectionStart":755.5},{"duration":214.90000009536743,"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":1042.4000000953674,"connectEnd":1042.4000000953674,"connectStart":1042.4000000953674,"domainLookupEnd":1042.4000000953674,"domainLookupStart":1042.4000000953674,"fetchStart":1042.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1042.4000000953674,"responseEnd":1257.3000001907349,"responseStart":1257.3000001907349,"secureConnectionStart":1042.4000000953674},{"duration":241.69999980926514,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1086.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1086.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1328,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":37,"responseStart":223,"responseEnd":228,"domLoading":227,"domInteractive":1402,"domContentLoadedEventStart":1402,"domContentLoadedEventEnd":1462,"domComplete":2508,"loadEventStart":2508,"loadEventEnd":2509,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1334.5},{"name":"bigPipe.sidebar-id.end","time":1335.3000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":1335.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1338.0999999046326},{"name":"activityTabFullyLoaded","time":1484.7000002861023}],"measures":[],"correlationId":"7d88cbc6eadb93","effectiveType":"4g","downlink":9.4,"rtt":0,"serverDuration":116,"dbReadsTimeInMs":19,"dbConnsTimeInMs":29,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
MDEV-25315May end up being a duplicate of this one. It has many new stacks, and all testcase disable both unique & FK checks.