10.2 1ca8637ae35061
|
mysqld: /data/src/10.2/storage/innobase/include/trx0trx.h:1423: static bool TrxInInnoDB::is_aborted(const trx_t*): Assertion `srv_read_only_mode || trx->in_depth > 0' failed.
|
170321 19:54:53 [ERROR] mysqld got signal 6 ;
|
# 2017-03-21T19:55:03 [23375] #7 0x00007f1af3371312 in __GI___assert_fail (assertion=0x7f1af67ef450 "srv_read_only_mode || trx->in_depth > 0", file=0x7f1af67ef418 "/data/src/10.2/storage/innobase/include/trx0trx.h", line=1423, function=0x7f1af67fde60 <TrxInInnoDB::is_aborted(trx_t const*)::__PRETTY_FUNCTION__> "static bool TrxInInnoDB::is_aborted(const trx_t*)") at assert.c:101
|
# 2017-03-21T19:55:03 [23375] #8 0x00007f1af61e7259 in TrxInInnoDB::is_aborted (trx=0x7f1adf401168) at /data/src/10.2/storage/innobase/include/trx0trx.h:1423
|
# 2017-03-21T19:55:03 [23375] #9 0x00007f1af61cee0c in ha_innobase::general_fetch (this=0x7f1ac0ca6888, buf=0x7f1ac0c1e488 "\375\001", direction=1, match_mode=0) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:10304
|
# 2017-03-21T19:55:03 [23375] #10 0x00007f1af61cf4a0 in ha_innobase::rnd_next (this=0x7f1ac0ca6888, buf=0x7f1ac0c1e488 "\375\001") at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:10532
|
# 2017-03-21T19:55:03 [23375] #11 0x00007f1af5ebe121 in handler::ha_rnd_next (this=0x7f1ac0ca6888, buf=0x7f1ac0c1e488 "\375\001") at /data/src/10.2/sql/handler.cc:2577
|
# 2017-03-21T19:55:03 [23375] #12 0x00007f1af60268bc in rr_sequential (info=0x7f1ac0c62188) at /data/src/10.2/sql/records.cc:484
|
# 2017-03-21T19:55:03 [23375] #13 0x00007f1af5cbd0be in sub_select (join=0x7f1ac0c60ff0, join_tab=0x7f1ac0c620c0, end_of_records=false) at /data/src/10.2/sql/sql_select.cc:18436
|
# 2017-03-21T19:55:03 [23375] #14 0x00007f1af5cbc5a3 in do_select (join=0x7f1ac0c60ff0, procedure=0x0) at /data/src/10.2/sql/sql_select.cc:17961
|
# 2017-03-21T19:55:03 [23375] #15 0x00007f1af5c975b7 in JOIN::exec_inner (this=0x7f1ac0c60ff0) at /data/src/10.2/sql/sql_select.cc:3463
|
# 2017-03-21T19:55:03 [23375] #16 0x00007f1af5c96abc in JOIN::exec (this=0x7f1ac0c60ff0) at /data/src/10.2/sql/sql_select.cc:3266
|
# 2017-03-21T19:55:03 [23375] #17 0x00007f1af5c97c2f in mysql_select (thd=0x7f1ac0c16070, tables=0x7f1ac0c608f8, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=553247836928, result=0x7f1ac0c60f48, unit=0x7f1ac0c19b50, select_lex=0x7f1ac0c1a280) at /data/src/10.2/sql/sql_select.cc:3658
|
# 2017-03-21T19:55:03 [23375] #18 0x00007f1af5c8c710 in handle_select (thd=0x7f1ac0c16070, lex=0x7f1ac0c19a88, result=0x7f1ac0c60f48, setup_tables_done_option=1073741824) at /data/src/10.2/sql/sql_select.cc:373
|
# 2017-03-21T19:55:03 [23375] #19 0x00007f1af5c51b98 in mysql_execute_command (thd=0x7f1ac0c16070) at /data/src/10.2/sql/sql_parse.cc:4498
|
# 2017-03-21T19:55:03 [23375] #20 0x00007f1af5c5c52c in mysql_parse (thd=0x7f1ac0c16070, rawbuf=0x7f1ac0c60088 "INSERT INTO tmp SELECT * FROM t2 /* QNO 31 CON_ID 12 */", length=56, parser_state=0x7f1af6d28e20, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7858
|
# 2017-03-21T19:55:03 [23375] #21 0x00007f1af5c4a5f2 in dispatch_command (command=COM_QUERY, thd=0x7f1ac0c16070, packet=0x7f1ac0c54071 " INSERT INTO tmp SELECT * FROM t2 /* QNO 31 CON_ID 12 */ ", packet_length=58, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1812
|
# 2017-03-21T19:55:03 [23375] #22 0x00007f1af5c48f62 in do_command (thd=0x7f1ac0c16070) at /data/src/10.2/sql/sql_parse.cc:1362
|
# 2017-03-21T19:55:03 [23375] #23 0x00007f1af5d91f3f in do_handle_one_connection (connect=0x7f1af2853870) at /data/src/10.2/sql/sql_connect.cc:1358
|
# 2017-03-21T19:55:03 [23375] #24 0x00007f1af5d91ccc in handle_one_connection (arg=0x7f1af2853870) at /data/src/10.2/sql/sql_connect.cc:1264
|
# 2017-03-21T19:55:03 [23375] #25 0x00007f1af5273064 in start_thread (arg=0x7f1af6d2a300) at pthread_create.c:309
|
# 2017-03-21T19:55:03 [23375] #26 0x00007f1af342b62d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
|
Non-deterministic concurrent test
git clone https://github.com/elenst/rqg --branch mdev11197 rqg-mdev11197
|
cd rqg-mdev11197
|
perl ./runall-new.pl --skip-gendata --duration=300 --threads=2 --grammar=conf/mariadb/mdev11197.yy --basedir=<your 10.2 basedir> --vardir=<your vardir>
|
# or, if you want to run it on an already started server (e.g. under debugger),
|
# assuming it's running on port 3306
|
perl ./gentest.pl --duration=300 --threads=2 --grammar=conf/mariadb/mdev11197.yy --dsn='dbi:mysql:host=127.0.0.1:port=3306:user=root:database=test'
|
{"report":{"fcp":808,"ttfb":202.89999997615814,"pageVisibility":"visible","entityId":58760,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"5d4b5aeb-9b96-46f6-bc80-a25f2de08269","navigationType":0,"readyForUser":918.8000000715256,"redirectCount":0,"resourceLoadedEnd":541.3999999761581,"resourceLoadedStart":211.5,"resourceTiming":[{"duration":15.100000023841858,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":211.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":211.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":226.60000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":15.400000095367432,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":211.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":211.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":227.30000007152557,"responseStart":0,"secureConnectionStart":0},{"duration":206.60000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":212.10000002384186,"connectEnd":229.39999997615814,"connectStart":229.39999997615814,"domainLookupEnd":229.39999997615814,"domainLookupStart":229.39999997615814,"fetchStart":212.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":229.89999997615814,"responseEnd":418.7000000476837,"responseStart":244.20000004768372,"secureConnectionStart":229.39999997615814},{"duration":328.6999999284744,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":212.70000004768372,"connectEnd":212.70000004768372,"connectStart":212.70000004768372,"domainLookupEnd":212.70000004768372,"domainLookupStart":212.70000004768372,"fetchStart":212.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":230,"responseEnd":541.3999999761581,"responseStart":247.30000007152557,"secureConnectionStart":212.70000004768372},{"duration":32.300000071525574,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":212.89999997615814,"connectEnd":212.89999997615814,"connectStart":212.89999997615814,"domainLookupEnd":212.89999997615814,"domainLookupStart":212.89999997615814,"fetchStart":212.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":230.30000007152557,"responseEnd":245.20000004768372,"responseStart":242.30000007152557,"secureConnectionStart":212.89999997615814},{"duration":35.700000047683716,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":213,"connectEnd":213,"connectStart":213,"domainLookupEnd":213,"domainLookupStart":213,"fetchStart":213,"redirectEnd":0,"redirectStart":0,"requestStart":232.20000004768372,"responseEnd":248.70000004768372,"responseStart":246.70000004768372,"secureConnectionStart":213},{"duration":53.799999952316284,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":213.20000004768372,"connectEnd":213.20000004768372,"connectStart":213.20000004768372,"domainLookupEnd":213.20000004768372,"domainLookupStart":213.20000004768372,"fetchStart":213.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":233.70000004768372,"responseEnd":267,"responseStart":262.2000000476837,"secureConnectionStart":213.20000004768372},{"duration":19.300000071525574,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":213.39999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":213.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":232.70000004768372,"responseStart":0,"secureConnectionStart":0},{"duration":53.60000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":213.60000002384186,"connectEnd":213.60000002384186,"connectStart":213.60000002384186,"domainLookupEnd":213.60000002384186,"domainLookupStart":213.60000002384186,"fetchStart":213.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":236.5,"responseEnd":267.2000000476837,"responseStart":262.89999997615814,"secureConnectionStart":213.60000002384186},{"duration":20,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":213.80000007152557,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":213.80000007152557,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":233.80000007152557,"responseStart":0,"secureConnectionStart":0},{"duration":54.10000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":213.89999997615814,"connectEnd":213.89999997615814,"connectStart":213.89999997615814,"domainLookupEnd":213.89999997615814,"domainLookupStart":213.89999997615814,"fetchStart":213.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":236.60000002384186,"responseEnd":268,"responseStart":263.5,"secureConnectionStart":213.89999997615814},{"duration":305.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":219.80000007152557,"connectEnd":219.80000007152557,"connectStart":219.80000007152557,"domainLookupEnd":219.80000007152557,"domainLookupStart":219.80000007152557,"fetchStart":219.80000007152557,"redirectEnd":0,"redirectStart":0,"requestStart":261.2000000476837,"responseEnd":525.3000000715256,"responseStart":518.5,"secureConnectionStart":219.80000007152557},{"duration":297.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":228.10000002384186,"connectEnd":228.10000002384186,"connectStart":228.10000002384186,"domainLookupEnd":228.10000002384186,"domainLookupStart":228.10000002384186,"fetchStart":228.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":278,"responseEnd":525.5,"responseStart":519.2000000476837,"secureConnectionStart":228.10000002384186},{"duration":104.10000002384186,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":566.1000000238419,"connectEnd":566.1000000238419,"connectStart":566.1000000238419,"domainLookupEnd":566.1000000238419,"domainLookupStart":566.1000000238419,"fetchStart":566.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":635.8999999761581,"responseEnd":670.2000000476837,"responseStart":669.1000000238419,"secureConnectionStart":566.1000000238419},{"duration":233,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":801.3000000715256,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":801.3000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1034.3000000715256,"responseStart":0,"secureConnectionStart":0},{"duration":212.29999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":808.1000000238419,"connectEnd":808.1000000238419,"connectStart":808.1000000238419,"domainLookupEnd":808.1000000238419,"domainLookupStart":808.1000000238419,"fetchStart":808.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":990,"responseEnd":1020.3999999761581,"responseStart":1019.3000000715256,"secureConnectionStart":808.1000000238419}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":20,"responseStart":203,"responseEnd":228,"domLoading":206,"domInteractive":980,"domContentLoadedEventStart":980,"domContentLoadedEventEnd":1030,"domComplete":1450,"loadEventStart":1450,"loadEventEnd":1451,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":954.7000000476837},{"name":"bigPipe.sidebar-id.end","time":955.3000000715256},{"name":"bigPipe.activity-panel-pipe-id.start","time":955.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":958},{"name":"activityTabFullyLoaded","time":1047.8000000715256}],"measures":[],"correlationId":"10f20bf2448564","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":110,"dbReadsTimeInMs":12,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
It seems to me that there could be a problem when merging from MySQL 5.7. The function innobase_kill_connection() which is bound to handlerton::kill_connection does not exist in MariaDB, but instead we have a similar function innobase_kill_query() that is bound to handlerton::kill_query().
At the very least, comments that refer to innobase_kill_connection() should be revised to refer to innobase_kill_query(). I suspect some difference near lock_trx_handle_wait().
While I was investigating this bug, I came up with the following clean-up patch that might marginally improve performance:
diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h
index d0a67a7ed28..2d4132237af 100644
--- a/storage/innobase/include/trx0trx.h
+++ b/storage/innobase/include/trx0trx.h
@@ -1473,12 +1473,8 @@ class TrxInInnoDB {
ut_ad(!is_async_rollback(trx));
- ++trx->in_depth;
-
- /* If trx->in_depth is greater than 1 then
- transaction is already in InnoDB. */
- if (trx->in_depth > 1) {
-
+ if (trx->in_depth++) {
+ /* The transaction is already inside InnoDB. */
return;
}
@@ -1528,9 +1524,7 @@ class TrxInInnoDB {
ut_ad(trx->in_depth > 0);
- --trx->in_depth;
-
- if (trx->in_depth > 0) {
+ if (--trx->in_depth > 0) {
return;
Also, while I was looking at this, I noticed that my change to deprecate innodb_support_xa in MySQL 5.7.10 has not been merged.