10.1 5fe0087a
|
#3 <signal handler called>
|
#4 0x000055be0ec41156 in delete_tree_element (tree=0x7fee10555d38, element=0xa5a5a5a5a5a5a5a5) at /data/src/10.1/mysys/tree.c:182
|
#5 0x000055be0ec41009 in free_tree (tree=0x7fee10555d38, free_flags=0) at /data/src/10.1/mysys/tree.c:145
|
#6 0x000055be0ec41110 in delete_tree (tree=0x7fee10555d38) at /data/src/10.1/mysys/tree.c:168
|
#7 0x000055be0e69b9c6 in Item_func_group_concat::repack_tree (this=0x7fee10555be8, thd=0x7fee123f2070) at /data/src/10.1/sql/item_sum.cc:3348
|
#8 0x000055be0e69bdb4 in Item_func_group_concat::add (this=0x7fee10555be8) at /data/src/10.1/sql/item_sum.cc:3410
|
#9 0x000055be0e69d663 in Aggregator_simple::add (this=0x7fee10556020) at /data/src/10.1/sql/item_sum.h:672
|
#10 0x000055be0e41a64f in Item_sum::aggregator_add (this=0x7fee10555be8) at /data/src/10.1/sql/item_sum.h:521
|
#11 0x000055be0e410c75 in update_sum_func (func_ptr=0x7fee105afaa0) at /data/src/10.1/sql/sql_select.cc:23534
|
#12 0x000055be0e407c2f in end_send_group (join=0x7fee105ae088, join_tab=0x7fee105563e0, end_of_records=false) at /data/src/10.1/sql/sql_select.cc:19824
|
#13 0x000055be0e404fbe in evaluate_join_record (join=0x7fee105ae088, join_tab=0x7fee10556098, error=0) at /data/src/10.1/sql/sql_select.cc:18702
|
#14 0x000055be0e404a64 in sub_select (join=0x7fee105ae088, join_tab=0x7fee10556098, end_of_records=false) at /data/src/10.1/sql/sql_select.cc:18518
|
#15 0x000055be0e404133 in do_select (join=0x7fee105ae088, fields=0x7fee105ae488, table=0x0, procedure=0x0) at /data/src/10.1/sql/sql_select.cc:18134
|
#16 0x000055be0e3de98e in JOIN::exec_inner (this=0x7fee105ae088) at /data/src/10.1/sql/sql_select.cc:3275
|
#17 0x000055be0e3dbc1f in JOIN::exec (this=0x7fee105ae088) at /data/src/10.1/sql/sql_select.cc:2562
|
#18 0x000055be0e3df1b5 in mysql_select (thd=0x7fee123f2070, rref_pointer_array=0x7fee123f6560, tables=0x7fee10447658, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x0, group=0x7fee104489d8, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fee10448b70, unit=0x7fee123f5bb8, select_lex=0x7fee123f62b8) at /data/src/10.1/sql/sql_select.cc:3499
|
#19 0x000055be0e3d486e in handle_select (thd=0x7fee123f2070, lex=0x7fee123f5af0, result=0x7fee10448b70, setup_tables_done_option=0) at /data/src/10.1/sql/sql_select.cc:388
|
#20 0x000055be0e3a4215 in execute_sqlcom_select (thd=0x7fee123f2070, all_tables=0x7fee10447658) at /data/src/10.1/sql/sql_parse.cc:5941
|
#21 0x000055be0e39a897 in mysql_execute_command (thd=0x7fee123f2070) at /data/src/10.1/sql/sql_parse.cc:3038
|
#22 0x000055be0e3a7e59 in mysql_parse (thd=0x7fee123f2070, rawbuf=0x7fee10443088 "SELECT \n( SELECT MAX(a) FROM t1 WHERE t2_sq.c > 0 ) AS f, \nGROUP_CONCAT( t2_sq.b ORDER BY 1 ) AS gc \nFROM\n( SELECT t2_a.* FROM t2 AS t2_a, t2 AS t2_b ) AS t2_sq, \nt3,\nt4 \nGROUP BY f", length=181, parser_state=0x7fee1b7e01e0) at /data/src/10.1/sql/sql_parse.cc:7459
|
#23 0x000055be0e396861 in dispatch_command (command=COM_QUERY, thd=0x7fee123f2070, packet=0x7fee143f0071 "", packet_length=181) at /data/src/10.1/sql/sql_parse.cc:1499
|
#24 0x000055be0e3955ec in do_command (thd=0x7fee123f2070) at /data/src/10.1/sql/sql_parse.cc:1131
|
#25 0x000055be0e4d0f05 in do_handle_one_connection (thd_arg=0x7fee123f2070) at /data/src/10.1/sql/sql_connect.cc:1330
|
#26 0x000055be0e4d0c69 in handle_one_connection (arg=0x7fee123f2070) at /data/src/10.1/sql/sql_connect.cc:1242
|
#27 0x000055be0e7cf618 in pfs_spawn_thread (arg=0x7fee18839ef0) at /data/src/10.1/storage/perfschema/pfs.cc:1861
|
#28 0x00007fee1b460494 in start_thread (arg=0x7fee1b7e1700) at pthread_create.c:333
|
#29 0x00007fee193fb93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
|
SET group_concat_max_len= 8;
|
|
CREATE TABLE t1 (a INT);
|
INSERT INTO t1 VALUES (1),(2);
|
|
CREATE TABLE t2 (b DATE, c INT);
|
INSERT INTO t2 VALUES ('2019-12-04',1),('2020-03-28',2);
|
|
CREATE TABLE t3 (d INT);
|
INSERT INTO t3 VALUES
|
(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14);
|
|
CREATE TABLE t4 (e INT);
|
INSERT INTO t4 VALUES
|
(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15);
|
|
SELECT
|
( SELECT MAX(a) FROM t1 WHERE t2_sq.c > 0 ) AS f,
|
GROUP_CONCAT( t2_sq.b ORDER BY 1 ) AS gc
|
FROM
|
( SELECT t2_a.* FROM t2 AS t2_a, t2 AS t2_b ) AS t2_sq,
|
t3,
|
t4
|
GROUP BY f;
|
|
# Cleanup
|
DROP TABLE t1, t2, t3, t4;
|
Note: The tiny value of group_concat_max_len is not important for the problem to occur, only for the size of the data in the test case.
The failure appeared in 10.1 tree after this commit:
commit 979cad229148ba8d28d94c1ca621bacd11847b66
|
Author: Sergei Golubchik
|
Date: Wed Jun 21 16:07:54 2017 +0200
|
|
MDEV-9531 GROUP_CONCAT with ORDER BY inside takes a lot of memory while it's executed
|
|
group concat tree is allocated in a memroot, so the only way to free
|
memory is to copy a part of the tree into a new memroot.
|
|
track the accumilated length of the result, and when it crosses
|
the threshold - copy the result into a new tree, free the old one.
|
which, despite the date, was only pushed recently to 10.1.
{"report":{"fcp":794.2999999523163,"ttfb":208,"pageVisibility":"visible","entityId":75634,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"208c954a-bec5-43e0-a4c4-77a114ebed0e","navigationType":0,"readyForUser":864.2999999523163,"redirectCount":0,"resourceLoadedEnd":717.3999998569489,"resourceLoadedStart":215,"resourceTiming":[{"duration":63.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":215,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":215,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":278.5,"responseStart":0,"secureConnectionStart":0},{"duration":63.299999952316284,"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":215.20000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":215.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":278.5,"responseStart":0,"secureConnectionStart":0},{"duration":118.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":215.29999995231628,"connectEnd":215.29999995231628,"connectStart":215.29999995231628,"domainLookupEnd":215.29999995231628,"domainLookupStart":215.29999995231628,"fetchStart":215.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":215.29999995231628,"responseEnd":333.59999990463257,"responseStart":333.59999990463257,"secureConnectionStart":215.29999995231628},{"duration":175.40000009536743,"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":215.39999985694885,"connectEnd":215.39999985694885,"connectStart":215.39999985694885,"domainLookupEnd":215.39999985694885,"domainLookupStart":215.39999985694885,"fetchStart":215.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":215.39999985694885,"responseEnd":390.7999999523163,"responseStart":390.7999999523163,"secureConnectionStart":215.39999985694885},{"duration":178.90000009536743,"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":215.59999990463257,"connectEnd":215.59999990463257,"connectStart":215.59999990463257,"domainLookupEnd":215.59999990463257,"domainLookupStart":215.59999990463257,"fetchStart":215.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":215.59999990463257,"responseEnd":394.5,"responseStart":394.5,"secureConnectionStart":215.59999990463257},{"duration":180.10000014305115,"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":215.59999990463257,"connectEnd":215.59999990463257,"connectStart":215.59999990463257,"domainLookupEnd":215.59999990463257,"domainLookupStart":215.59999990463257,"fetchStart":215.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":215.59999990463257,"responseEnd":395.7000000476837,"responseStart":395.7000000476837,"secureConnectionStart":215.59999990463257},{"duration":181.59999990463257,"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":215.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":215.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":397.39999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":180.59999990463257,"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":215.79999995231628,"connectEnd":215.79999995231628,"connectStart":215.79999995231628,"domainLookupEnd":215.79999995231628,"domainLookupStart":215.79999995231628,"fetchStart":215.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":215.79999995231628,"responseEnd":396.39999985694885,"responseStart":396.39999985694885,"secureConnectionStart":215.79999995231628},{"duration":181.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":215.89999985694885,"connectEnd":215.89999985694885,"connectStart":215.89999985694885,"domainLookupEnd":215.89999985694885,"domainLookupStart":215.89999985694885,"fetchStart":215.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":215.89999985694885,"responseEnd":397.5,"responseStart":397.5,"secureConnectionStart":215.89999985694885},{"duration":182.40000009536743,"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":216.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":216.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":398.5,"responseStart":0,"secureConnectionStart":0},{"duration":182.5,"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":216.20000004768372,"connectEnd":216.20000004768372,"connectStart":216.20000004768372,"domainLookupEnd":216.20000004768372,"domainLookupStart":216.20000004768372,"fetchStart":216.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":216.20000004768372,"responseEnd":398.7000000476837,"responseStart":398.7000000476837,"secureConnectionStart":216.20000004768372},{"duration":397.59999990463257,"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":221.20000004768372,"connectEnd":221.20000004768372,"connectStart":221.20000004768372,"domainLookupEnd":221.20000004768372,"domainLookupStart":221.20000004768372,"fetchStart":221.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":221.20000004768372,"responseEnd":618.7999999523163,"responseStart":618.7999999523163,"secureConnectionStart":221.20000004768372},{"duration":496.09999990463257,"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":221.29999995231628,"connectEnd":221.29999995231628,"connectStart":221.29999995231628,"domainLookupEnd":221.29999995231628,"domainLookupStart":221.29999995231628,"fetchStart":221.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":221.29999995231628,"responseEnd":717.3999998569489,"responseStart":717.2999999523163,"secureConnectionStart":221.29999995231628},{"duration":167.29999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":546.7999999523163,"connectEnd":546.7999999523163,"connectStart":546.7999999523163,"domainLookupEnd":546.7999999523163,"domainLookupStart":546.7999999523163,"fetchStart":546.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":546.7999999523163,"responseEnd":714.0999999046326,"responseStart":714.0999999046326,"secureConnectionStart":546.7999999523163},{"duration":132,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":766.0999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":766.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":898.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":164.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bu7/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","startTime":781.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":781.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":945.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":165.39999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/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","startTime":782,"connectEnd":782,"connectStart":782,"domainLookupEnd":782,"domainLookupStart":782,"fetchStart":782,"redirectEnd":0,"redirectStart":0,"requestStart":782,"responseEnd":947.3999998569489,"responseStart":947.3999998569489,"secureConnectionStart":782},{"duration":172.10000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/f51ef5507eea4c158f257c66c93b2a3f-CDN/lu2bu7/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","startTime":782.3999998569489,"connectEnd":782.3999998569489,"connectStart":782.3999998569489,"domainLookupEnd":782.3999998569489,"domainLookupStart":782.3999998569489,"fetchStart":782.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":782.3999998569489,"responseEnd":954.5,"responseStart":954.5,"secureConnectionStart":782.3999998569489}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":75,"responseStart":208,"responseEnd":214,"domLoading":213,"domInteractive":924,"domContentLoadedEventStart":924,"domContentLoadedEventEnd":959,"domComplete":1819,"loadEventStart":1819,"loadEventEnd":1820,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":906.0999999046326},{"name":"bigPipe.sidebar-id.end","time":906.8999998569489},{"name":"bigPipe.activity-panel-pipe-id.start","time":907.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":909.2999999523163},{"name":"activityTabFullyLoaded","time":968.3999998569489}],"measures":[],"correlationId":"200ea0c4b1f746","effectiveType":"4g","downlink":9.1,"rtt":0,"serverDuration":69,"dbReadsTimeInMs":8,"dbConnsTimeInMs":15,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}