Core was generated by `/test/MD190922-mariadb-10.11.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
Program terminated with signal SIGABRT, Aborted.
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
[Current thread is 1 (Thread 0x152434cd0700 (LWP 875027))]
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x000015245b45a859 in __GI_abort () at abort.c:79
#2 0x000015245b45a729 in __assert_fail_base (fmt=0x15245b5f0588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5605426b33c6 "0", file=0x56054275e7b8 "/test/10.11_dbg/storage/innobase/row/row0upd.cc", line=1969, function=<optimized out>) at assert.c:92
#3 0x000015245b46bfd6 in __GI___assert_fail (assertion=assertion@entry=0x5605426b33c6 "0", file=file@entry=0x56054275e7b8 "/test/10.11_dbg/storage/innobase/row/row0upd.cc", line=line@entry=1969, function=function@entry=0x56054275f798 "dberr_t row_upd_sec_index_entry(upd_node_t*, que_thr_t*)") at assert.c:101
#4 0x00005605420e9203 in row_upd_sec_index_entry (node=node@entry=0x1523c0035fd0, thr=thr@entry=0x1523c0036298) at /test/10.11_dbg/storage/innobase/row/row0upd.cc:1969
#5 0x00005605420ec55a in row_upd_sec_step (thr=0x1523c0036298, node=0x1523c0035fd0) at /test/10.11_dbg/storage/innobase/row/row0upd.cc:2094
#6 row_upd (thr=0x1523c0036298, node=0x1523c0035fd0) at /test/10.11_dbg/storage/innobase/row/row0upd.cc:2818
#7 row_upd_step (thr=thr@entry=0x1523c0036298) at /test/10.11_dbg/storage/innobase/row/row0upd.cc:2933
#8 0x0000560542093dfe in row_update_for_mysql (prebuilt=0x1523c00355e0) at /test/10.11_dbg/storage/innobase/row/row0mysql.cc:1686
#9 0x0000560541f0ed1a in ha_innobase::delete_row (this=0x1523c0034da0, record=0x1523c00330a8 "\375\001") at /test/10.11_dbg/storage/innobase/handler/ha_innodb.cc:8706
#10 0x0000560541c09b19 in handler::ha_delete_row (this=0x1523c0034da0, buf=0x1523c00330a8 "\375\001") at /test/10.11_dbg/sql/handler.cc:7715
#11 0x00005605418b97f5 in TABLE::delete_row (this=0x1523c001f218) at /test/10.11_dbg/sql/sql_delete.cc:281
#12 0x00005605418b7c02 in mysql_delete (thd=thd@entry=0x1523c0000d48, table_list=0x1523c00132c0, conds=<optimized out>, order_list=order_list@entry=0x1523c0005a68, limit=18446744073709551615, options=<optimized out>, result=<optimized out>) at /test/10.11_dbg/sql/sql_delete.cc:842
#13 0x00005605419145e0 in mysql_execute_command (thd=thd@entry=0x1523c0000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.11_dbg/sql/sql_limit.h:85
#14 0x000056054190003c in mysql_parse (thd=thd@entry=0x1523c0000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x152434ccf330) at /test/10.11_dbg/sql/sql_parse.cc:8037
#15 0x000056054190d66d in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1523c0000d48, packet=packet@entry=0x1523c000aed9 "DELETE FROM t1", packet_length=packet_length@entry=14, blocking=blocking@entry=true) at /test/10.11_dbg/sql/sql_class.h:1345
#16 0x000056054190fd97 in do_command (thd=0x1523c0000d48, blocking=blocking@entry=true) at /test/10.11_dbg/sql/sql_parse.cc:1407
#17 0x0000560541a73fb9 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5605444a0f78, put_in_cache=put_in_cache@entry=true) at /test/10.11_dbg/sql/sql_connect.cc:1416
#18 0x0000560541a744c3 in handle_one_connection (arg=0x5605444a0f78) at /test/10.11_dbg/sql/sql_connect.cc:1318
#19 0x000015245b96b609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#20 0x000015245b557133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
The crash is confirmed present in:
MariaDB: 10.7.6 (dbg), 10.8.5 (dbg), 10.9.3 (dbg), 10.10.2 (dbg), 10.11.0 (dbg)
Based on the test case, it seems more likely that this was caused by MDEV-24621 or subsequent changes in that area. It is notable that the fix of MDEV-29570 had not been merged to 10.11 as of 6ebdd3013a18b01dbecec76b870810329eb76586.
Marko Mäkelä
added a comment - Based on the test case, it seems more likely that this was caused by MDEV-24621 or subsequent changes in that area. It is notable that the fix of MDEV-29570 had not been merged to 10.11 as of 6ebdd3013a18b01dbecec76b870810329eb76586.
Could this simply be a duplicate of MDEV-29570 ?
It is not immediately obvious how to bisect which commit introduced this, as for example even a build of 27/5/22 (10.10, debug, b3df1ec97aacc27678c44eefe56ea8680456d608) will crash with the same stack, but this could have been the previous bug as well.
Now checking if it is fixed by recent commit as per marko (thanks!).
Roel Van de Paar
added a comment - - edited It is not immediately obvious how to bisect which commit introduced this, as for example even a build of 27/5/22 (10.10, debug, b3df1ec97aacc27678c44eefe56ea8680456d608) will crash with the same stack, but this could have been the previous bug as well.
Now checking if it is fixed by recent commit as per marko (thanks!).
I can repeat this with the latest 10.7. Here is a simplified test case:
--source include/have_innodb.inc
CREATETEMPORARYTABLE t(c INT);
INSERTINTO t VALUES(1),(1);
CREATETABLE t1 (c INTUNIQUE) ENGINE=InnoDB;
SET unique_checks=0,foreign_key_checks=0;
INSERTINTO t1 SELECT 1 FROM t;
CHECKTABLE t1;
SELECT * FROM t1;
DROPTABLE t1;
10.7 b6ebadaa66ee68b1880c0e10669543d1ba058c18
Table Op Msg_type Msg_text
test.t1 check Warning InnoDB: Index 'c' contains 0 entries, should be 2.
Marko Mäkelä
added a comment - I can repeat this with the latest 10.7. Here is a simplified test case:
--source include/have_innodb.inc
CREATE TEMPORARY TABLE t(c INT );
INSERT INTO t VALUES (1),(1);
CREATE TABLE t1 (c INT UNIQUE ) ENGINE=InnoDB;
SET unique_checks=0,foreign_key_checks=0;
INSERT INTO t1 SELECT 1 FROM t;
CHECK TABLE t1;
SELECT * FROM t1;
DROP TABLE t1;
10.7 b6ebadaa66ee68b1880c0e10669543d1ba058c18
Table Op Msg_type Msg_text
test.t1 check Warning InnoDB: Index 'c' contains 0 entries, should be 2.
Thank you marko. Confirmed that 10.7 at b6ebadaa66ee68b1880c0e10669543d1ba058c18 reproduces crash with original testcase.
With the updated testcase, when executed at the CLI, I get:
Roel Van de Paar
added a comment - - edited Thank you marko . Confirmed that 10.7 at b6ebadaa66ee68b1880c0e10669543d1ba058c18 reproduces crash with original testcase.
With the updated testcase, when executed at the CLI, I get:
10.7.7 b6ebadaa66ee68b1880c0e10669543d1ba058c18 (Debug)
10.7.7-dbg>CHECK TABLE t1;
+---------+-------+----------+----------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+---------+-------+----------+----------------------------------------------------+
| test.t1 | check | Warning | InnoDB: Index 'c' contains 0 entries, should be 2. |
| test.t1 | check | error | Corrupt |
+---------+-------+----------+----------------------------------------------------+
2 rows in set (0.001 sec)
10.7.7-dbg>SELECT * FROM t1;
ERROR 1712 (HY000): Index t1 is corrupted
And:
10.7.7 b6ebadaa66ee68b1880c0e10669543d1ba058c18 (Debug)
2022-10-14 16:04:12 4 [ERROR] InnoDB: Flagged corruption of `c` in table `test`.`t1` in CHECK TABLE; Wrong count
2022-10-14 16:04:12 4 [ERROR] Got error 180 when reading table './test/t1'
$ . /bin/perror 180
MariaDB error code 180: Index corrupted
This looks mostly correct to me. Should trx_t::bulk_insert_apply() attempt to process all tables and return a combined error? Is there a multi-table scenario where the suggested patch would misbehave because it is only rolling back changes to one table, instead of rolling back to the oldest problematic change?
I would suggest a different name for the added member function:
/** @return the first undo record that modified the table */
undo_no_t get_first() const
If this fixes also MDEV-29801, please add also that test case to the regression suite.
Marko Mäkelä
added a comment - This looks mostly correct to me. Should trx_t::bulk_insert_apply() attempt to process all tables and return a combined error? Is there a multi-table scenario where the suggested patch would misbehave because it is only rolling back changes to one table, instead of rolling back to the oldest problematic change?
I would suggest a different name for the added member function:
/** @return the first undo record that modified the table */
undo_no_t get_first() const
If this fixes also MDEV-29801 , please add also that test case to the regression suite.
People
Thirunarayanan Balathandayuthapani
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":1360,"ttfb":214.10000038146973,"pageVisibility":"visible","entityId":115420,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"e349f8c1-d58d-41b3-a9b4-4f0b2c3db87b","navigationType":0,"readyForUser":1518.5,"redirectCount":0,"resourceLoadedEnd":1094.8000001907349,"resourceLoadedStart":222.10000038146973,"resourceTiming":[{"duration":33.89999961853027,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":222.10000038146973,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":222.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":256,"responseStart":0,"secureConnectionStart":0},{"duration":34,"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":222.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":222.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":256.5,"responseStart":0,"secureConnectionStart":0},{"duration":420.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":222.7000002861023,"connectEnd":222.7000002861023,"connectStart":222.7000002861023,"domainLookupEnd":222.7000002861023,"domainLookupStart":222.7000002861023,"fetchStart":222.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":262.40000009536743,"responseEnd":643.3000001907349,"responseStart":292.40000009536743,"secureConnectionStart":222.7000002861023},{"duration":834.5,"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":222.90000009536743,"connectEnd":222.90000009536743,"connectStart":222.90000009536743,"domainLookupEnd":222.90000009536743,"domainLookupStart":222.90000009536743,"fetchStart":222.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":262.30000019073486,"responseEnd":1057.4000000953674,"responseStart":291.6000003814697,"secureConnectionStart":222.90000009536743},{"duration":79,"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":223.2000002861023,"connectEnd":223.2000002861023,"connectStart":223.2000002861023,"domainLookupEnd":223.2000002861023,"domainLookupStart":223.2000002861023,"fetchStart":223.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":262.6000003814697,"responseEnd":302.2000002861023,"responseStart":299.40000009536743,"secureConnectionStart":223.2000002861023},{"duration":78.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":223.30000019073486,"connectEnd":223.30000019073486,"connectStart":223.30000019073486,"domainLookupEnd":223.30000019073486,"domainLookupStart":223.30000019073486,"fetchStart":223.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":263.2000002861023,"responseEnd":301.6000003814697,"responseStart":296.6000003814697,"secureConnectionStart":223.30000019073486},{"duration":83.7000002861023,"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":223.5,"connectEnd":223.5,"connectStart":223.5,"domainLookupEnd":223.5,"domainLookupStart":223.5,"fetchStart":223.5,"redirectEnd":0,"redirectStart":0,"requestStart":263.5,"responseEnd":307.2000002861023,"responseStart":302.7000002861023,"secureConnectionStart":223.5},{"duration":37.09999990463257,"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":223.60000038146973,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":223.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":260.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":148.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":223.80000019073486,"connectEnd":223.80000019073486,"connectStart":223.80000019073486,"domainLookupEnd":223.80000019073486,"domainLookupStart":223.80000019073486,"fetchStart":223.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":288.90000009536743,"responseEnd":372.30000019073486,"responseStart":367.7000002861023,"secureConnectionStart":223.80000019073486},{"duration":54.200000286102295,"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":224,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":224,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":278.2000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":148.30000019073486,"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":224.30000019073486,"connectEnd":224.30000019073486,"connectStart":224.30000019073486,"domainLookupEnd":224.30000019073486,"domainLookupStart":224.30000019073486,"fetchStart":224.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":289.1000003814697,"responseEnd":372.6000003814697,"responseStart":368.6000003814697,"secureConnectionStart":224.30000019073486},{"duration":862.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":231.80000019073486,"connectEnd":231.80000019073486,"connectStart":231.80000019073486,"domainLookupEnd":231.80000019073486,"domainLookupStart":231.80000019073486,"fetchStart":231.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":406.5,"responseEnd":1094.4000000953674,"responseStart":1083.7000002861023,"secureConnectionStart":231.80000019073486},{"duration":845.3000001907349,"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":249.5,"connectEnd":249.5,"connectStart":249.5,"domainLookupEnd":249.5,"domainLookupStart":249.5,"fetchStart":249.5,"redirectEnd":0,"redirectStart":0,"requestStart":426.90000009536743,"responseEnd":1094.8000001907349,"responseStart":1084.5,"secureConnectionStart":249.5},{"duration":330.2999997138977,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":959.6000003814697,"connectEnd":959.6000003814697,"connectStart":959.6000003814697,"domainLookupEnd":959.6000003814697,"domainLookupStart":959.6000003814697,"fetchStart":959.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":1234.1000003814697,"responseEnd":1289.9000000953674,"responseStart":1269.5,"secureConnectionStart":959.6000003814697},{"duration":349.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1305.7000002861023,"connectEnd":1305.7000002861023,"connectStart":1305.7000002861023,"domainLookupEnd":1305.7000002861023,"domainLookupStart":1305.7000002861023,"fetchStart":1305.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":1619.5,"responseEnd":1655.6000003814697,"responseStart":1655,"secureConnectionStart":1305.7000002861023},{"duration":318.19999980926514,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1350.1000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1350.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1668.3000001907349,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":29,"responseStart":214,"responseEnd":249,"domLoading":221,"domInteractive":1689,"domContentLoadedEventStart":1689,"domContentLoadedEventEnd":1756,"domComplete":2069,"loadEventStart":2069,"loadEventEnd":2069,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1578.2000002861023},{"name":"bigPipe.sidebar-id.end","time":1586.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":1587.1000003814697},{"name":"bigPipe.activity-panel-pipe-id.end","time":1590.5},{"name":"activityTabFullyLoaded","time":1774.8000001907349}],"measures":[],"correlationId":"cdb0053d45d88e","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":111,"dbReadsTimeInMs":17,"dbConnsTimeInMs":26,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Based on the test case, it seems more likely that this was caused by
MDEV-24621or subsequent changes in that area. It is notable that the fix ofMDEV-29570had not been merged to 10.11 as of 6ebdd3013a18b01dbecec76b870810329eb76586.Could this simply be a duplicate of
MDEV-29570?