Type:
Bug
Priority:
Critical
Resolution:
Unresolved
Affects Version/s:
11.1.2 , 11.2.1 , 10.4(EOL) , 10.5 , 10.6 , 10.9(EOL) , 10.10(EOL) , 10.11 , 11.0(EOL) , 11.1(EOL) , 11.2(EOL)
Environment:
Ubuntu 20.04 x86-64, docker image mariadb:11.1.2
PoC:
SELECT ( WITH RECURSIVE x AS ( WITH x AS ( SELECT 1 FROM t14 ) SELECT x ) , t14 AS ( SELECT 1 UNION SELECT 'x' FROM x ) SELECT x FROM x WHERE ( SELECT x FROM x ) ) ;
docker log:
mariadbd(my_print_stacktrace+0x32)[0x5617194927c2]
mariadbd(handle_fatal_signal+0x488)[0x561718f6bcf8]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7ff65ab11520]
mariadbd(_ZN18st_select_lex_unit7cleanupEv+0x97)[0x561718dce0c7]
mariadbd(_ZN18st_select_lex_unit7prepareEP10TABLE_LISTP13select_resulty+0x841)[0x561718dcead1]
mariadbd(+0x7ed21f)[0x561718cb321f]
mariadbd(_Z27mysql_handle_single_derivedP3LEXP10TABLE_LISTj+0xda)[0x561718cb1e7a]
mariadbd(_ZN13st_select_lex14handle_derivedEP3LEXj+0x47)[0x561718cd0697]
mariadbd(_ZN4JOIN7prepareEP10TABLE_LISTP4ItemjP8st_orderbS5_S3_S5_P13st_select_lexP18st_select_lex_unit+0x20f)[0x561718d649ff]
mariadbd(+0xb8b908)[0x561719051908]
mariadbd(_ZN14Item_subselect10fix_fieldsEP3THDPP4Item+0x1ad)[0x561719050fcd]
mariadbd(_Z12setup_fieldsP3THD20Bounds_checked_arrayIP4ItemER4ListIS2_E17enum_column_usagePS6_S9_b+0x147)[0x561718c8b0a7]
mariadbd(_ZN4JOIN7prepareEP10TABLE_LISTP4ItemjP8st_orderbS5_S3_S5_P13st_select_lexP18st_select_lex_unit+0x52d)[0x561718d64d1d]
mariadbd(_Z12mysql_selectP3THDP10TABLE_LISTR4ListI4ItemEPS4_jP8st_orderS9_S7_S9_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x624)[0x561718d79474]
mariadbd(_Z13handle_selectP3THDP3LEXP13select_resulty+0x154)[0x561718d79774]
mariadbd(+0x826f55)[0x561718cecf55]
mariadbd(_Z21mysql_execute_commandP3THDb+0x419e)[0x561718cfbf0e]
mariadbd(_Z11mysql_parseP3THDPcjP12Parser_state+0x1e7)[0x561718cfd237]
mariadbd(_Z16dispatch_command19enum_server_commandP3THDPcjb+0x14bd)[0x561718cffa1d]
mariadbd(_Z10do_commandP3THDb+0x138)[0x561718d01818]
mariadbd(_Z24do_handle_one_connectionP7CONNECTb+0x3bf)[0x561718e293af]
mariadbd(handle_one_connection+0x5d)[0x561718e296fd]
mariadbd(+0xcd1906)[0x561719197906]
/lib/x86_64-linux-gnu/libc.so.6(+0x94b43)[0x7ff65ab63b43]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x44)[0x7ff65abf4bb4]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7ff5f40130d8): SELECT ( WITH RECURSIVE x AS ( WITH x AS ( SELECT 1 FROM t14 ) SELECT x ) , t14 AS ( SELECT 1 UNION SELECT 'x' FROM x ) SELECT x FROM x WHERE ( SELECT x FROM x ) )
Connection ID (thread ID): 4
Status: NOT_KILLED
Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off,hash_join_cardinality=on
relates to
MDEV-32724
Segmentation fault due to Deep Recursion in table.cc and sql_lex.cc
Confirmed
{"report":{"fcp":894.3999996185303,"ttfb":228.0999994277954,"pageVisibility":"visible","entityId":125446,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"e424c931-40cd-4d7f-8f3b-c1fe609a2018","navigationType":0,"readyForUser":960.0999994277954,"redirectCount":0,"resourceLoadedEnd":524.5999994277954,"resourceLoadedStart":238.39999961853027,"resourceTiming":[{"duration":37,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":238.39999961853027,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":238.39999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":275.3999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":37.30000019073486,"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":238.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":238.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":276,"responseStart":0,"secureConnectionStart":0},{"duration":199.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":238.89999961853027,"connectEnd":238.89999961853027,"connectStart":238.89999961853027,"domainLookupEnd":238.89999961853027,"domainLookupStart":238.89999961853027,"fetchStart":238.89999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":278.29999923706055,"responseEnd":438.69999980926514,"responseStart":302.19999980926514,"secureConnectionStart":238.89999961853027},{"duration":285.69999980926514,"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":238.89999961853027,"connectEnd":238.89999961853027,"connectStart":238.89999961853027,"domainLookupEnd":238.89999961853027,"domainLookupStart":238.89999961853027,"fetchStart":238.89999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":280.5999994277954,"responseEnd":524.5999994277954,"responseStart":303.5999994277954,"secureConnectionStart":238.89999961853027},{"duration":69.79999923706055,"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":239,"connectEnd":239,"connectStart":239,"domainLookupEnd":239,"domainLookupStart":239,"fetchStart":239,"redirectEnd":0,"redirectStart":0,"requestStart":281.5,"responseEnd":308.79999923706055,"responseStart":305,"secureConnectionStart":239},{"duration":69.90000057220459,"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":239.0999994277954,"connectEnd":239.0999994277954,"connectStart":239.0999994277954,"domainLookupEnd":239.0999994277954,"domainLookupStart":239.0999994277954,"fetchStart":239.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":282.0999994277954,"responseEnd":309,"responseStart":306.79999923706055,"secureConnectionStart":239.0999994277954},{"duration":42.80000019073486,"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":239.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":239.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":282,"responseStart":0,"secureConnectionStart":0},{"duration":80.5,"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":239.19999980926514,"connectEnd":239.19999980926514,"connectStart":239.19999980926514,"domainLookupEnd":239.19999980926514,"domainLookupStart":239.19999980926514,"fetchStart":239.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":284.0999994277954,"responseEnd":319.69999980926514,"responseStart":317.69999980926514,"secureConnectionStart":239.19999980926514},{"duration":80.70000076293945,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":239.29999923706055,"connectEnd":239.29999923706055,"connectStart":239.29999923706055,"domainLookupEnd":239.29999923706055,"domainLookupStart":239.29999923706055,"fetchStart":239.29999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":284.29999923706055,"responseEnd":320,"responseStart":318.5999994277954,"secureConnectionStart":239.29999923706055},{"duration":44.29999923706055,"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":239.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":239.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":283.79999923706055,"responseStart":0,"secureConnectionStart":0},{"duration":87,"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":239.5999994277954,"connectEnd":239.5999994277954,"connectStart":239.5999994277954,"domainLookupEnd":239.5999994277954,"domainLookupStart":239.5999994277954,"fetchStart":239.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":287.5999994277954,"responseEnd":326.5999994277954,"responseStart":323.3999996185303,"secureConnectionStart":239.5999994277954},{"duration":265.20000076293945,"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":242.29999923706055,"connectEnd":242.29999923706055,"connectStart":242.29999923706055,"domainLookupEnd":242.29999923706055,"domainLookupStart":242.29999923706055,"fetchStart":242.29999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":340.79999923706055,"responseEnd":507.5,"responseStart":504.19999980926514,"secureConnectionStart":242.29999923706055},{"duration":269.3999996185303,"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":242.39999961853027,"connectEnd":242.39999961853027,"connectStart":242.39999961853027,"domainLookupEnd":242.39999961853027,"domainLookupStart":242.39999961853027,"fetchStart":242.39999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":429,"responseEnd":511.79999923706055,"responseStart":508.29999923706055,"secureConnectionStart":242.39999961853027},{"duration":292.30000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":652.2999992370605,"connectEnd":652.2999992370605,"connectStart":652.2999992370605,"domainLookupEnd":652.2999992370605,"domainLookupStart":652.2999992370605,"fetchStart":652.2999992370605,"redirectEnd":0,"redirectStart":0,"requestStart":914.7999992370605,"responseEnd":944.5999994277954,"responseStart":943.6999998092651,"secureConnectionStart":652.2999992370605},{"duration":110.30000019073486,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":833.0999994277954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":833.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":943.3999996185303,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":82,"responseStart":228,"responseEnd":237,"domLoading":233,"domInteractive":1024,"domContentLoadedEventStart":1024,"domContentLoadedEventEnd":1067,"domComplete":1680,"loadEventStart":1680,"loadEventEnd":1681,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1004.3999996185303},{"name":"bigPipe.sidebar-id.end","time":1005.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.start","time":1005.2999992370605},{"name":"bigPipe.activity-panel-pipe-id.end","time":1007.8999996185303},{"name":"activityTabFullyLoaded","time":1077.1999998092651}],"measures":[],"correlationId":"fe9d5b21eb5945","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":89,"dbReadsTimeInMs":10,"dbConnsTimeInMs":17,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}