Following Queries crashes the Server:
CREATE TEMPORARY TABLE TableA (A INT AUTO_INCREMENT, B INT, PRIMARY KEY (A));
|
CREATE TEMPORARY TABLE TableB (A VARCHAR(100), B INT);
|
|
(
|
SELECT
|
TableA.A AS AA, TableB.A AS BA
|
FROM TableA
|
LEFT JOIN TableB ON TableB.B = TableA.B
|
GROUP BY TableA.A, TableB.A
|
ORDER BY CAST(CAST(TableB.A AS DECIMAL) AS UNSIGNED)
|
)
|
ORDER BY CAST(CAST(BA AS DECIMAL) AS UNSIGNED)
|
Server-Output:
[ERROR] mysqld got signal 11 ;
|
This could be because you hit a bug. It is also possible that this binary
|
or one of the libraries it was linked against is corrupt, improperly built,
|
or misconfigured. This error can also be caused by malfunctioning hardware.
|
|
To report this bug, see https://mariadb.com/kb/en/reporting-bugs
|
|
We will try our best to scrape up some info that will hopefully help
|
diagnose the problem, but since we have already crashed,
|
something is definitely wrong and this may fail.
|
|
Server version: 10.6.10-MariaDB-1:10.6.10+maria~ubu2004-log
|
key_buffer_size=134217728
|
read_buffer_size=2097152
|
max_used_connections=22
|
max_threads=302
|
thread_count=22
|
It is possible that mysqld could use up to
|
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1994400 K bytes of memory
|
Hope that's ok; if not, decrease some variables in the equation.
|
|
Thread pointer: 0x7f8bcf207718
|
Attempting backtrace. You can use the following information to find out
|
where mysqld died. If you see no messages after this, something went
|
terribly wrong...
|
stack_bottom = 0x7f8bdc0a5558 thread_stack 0x49000
|
Printing to addr2line failed
|
mysqld(my_print_stacktrace+0x32)[0x55a3c860ccf2]
|
mysqld(handle_fatal_signal+0x485)[0x55a3c80cc475]
|
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14420)[0x7f8c7757f420]
|
mysqld(+0x625278)[0x55a3c7d11278]
|
mysqld(_ZN4JOIN8optimizeEv+0xc3)[0x55a3c7f02c83]
|
mysqld(_Z12mysql_selectP3THDP10TABLE_LISTR4ListI4ItemEPS4_jP8st_orderS9_S7_S9_yP13select_resultP18st_select_lex_unitP13st_select_lex+0xb7)[0x55a3c7f02d57]
|
mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x157)[0x55a3c7f03567]
|
mysqld(+0x7a59b1)[0x55a3c7e919b1]
|
mysqld(_Z21mysql_execute_commandP3THDb+0x44d1)[0x55a3c7e9fe11]
|
mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x1e7)[0x55a3c7e8c577]
|
mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjb+0x10b5)[0x55a3c7e988b5]
|
mysqld(_Z10do_commandP3THDb+0x13e)[0x55a3c7e9ab0e]
|
mysqld(_Z24do_handle_one_connectionP7CONNECTb+0x3b7)[0x55a3c7fac5a7]
|
mysqld(handle_one_connection+0x5d)[0x55a3c7fac8fd]
|
mysqld(+0xc27036)[0x55a3c8313036]
|
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8609)[0x7f8c77573609]
|
/lib/x86_64-linux-gnu/libc.so.6(clone+0x43)[0x7f8c7715f133]
|
|
Trying to get some variables.
|
Some pointers may be invalid and cause the dump to abort.
|
Query (0x7f8bcf23f1b0): (
|
SELECT
|
TableA.A AS AA, TableB.A AS BA
|
FROM TableA
|
LEFT JOIN TableB ON TableB.B = TableA.B
|
GROUP BY TableA.A, TableB.A
|
ORDER BY CAST(CAST(TableB.A AS DECIMAL) AS UNSIGNED)
|
)
|
ORDER BY CAST(CAST(BA AS DECIMAL) AS UNSIGNED)
|
|
Connection ID (thread ID): 2684
|
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
|
|
The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
|
information that should help you find out what is causing the crash.
|
Writing a core file...
|
Working directory at /var/lib/mysql
|
Resource Limits:
|
Limit Soft Limit Hard Limit Units
|
Max cpu time unlimited unlimited seconds
|
Max file size unlimited unlimited bytes
|
Max data size unlimited unlimited bytes
|
Max stack size 8388608 unlimited bytes
|
Max core file size unlimited unlimited bytes
|
Max resident set unlimited unlimited bytes
|
Max processes 1048576 1048576 processes
|
Max open files 1048576 1048576 files
|
Max locked memory 65536 65536 bytes
|
Max address space unlimited unlimited bytes
|
Max file locks unlimited unlimited locks
|
Max pending signals 128548 128548 signals
|
Max msgqueue size 819200 819200 bytes
|
Max nice priority 0 0
|
Max realtime priority 0 0
|
Max realtime timeout unlimited unlimited us
|
Core pattern: core
|
This seems to be reproducible in all versions. Also in the current HEAD version
- duplicates
-
MDEV-29681
Server crashes when optimizing SQL with ORDER BY
-
-
Closed
{"report":{"fcp":797.7999999523163,"ttfb":142.60000014305115,"pageVisibility":"visible","entityId":126609,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"63878fe5-4d20-4b55-83bf-600f926470f3","navigationType":0,"readyForUser":889.2999999523163,"redirectCount":0,"resourceLoadedEnd":1009.2000000476837,"resourceLoadedStart":147.10000014305115,"resourceTiming":[{"duration":194.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":147.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":147.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":341.60000014305115,"responseStart":0,"secureConnectionStart":0},{"duration":194.29999995231628,"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":147.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":147.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":341.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":203.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":147.5,"connectEnd":147.5,"connectStart":147.5,"domainLookupEnd":147.5,"domainLookupStart":147.5,"fetchStart":147.5,"redirectEnd":0,"redirectStart":0,"requestStart":147.5,"responseEnd":350.90000009536743,"responseStart":350.90000009536743,"secureConnectionStart":147.5},{"duration":289.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":147.60000014305115,"connectEnd":147.60000014305115,"connectStart":147.60000014305115,"domainLookupEnd":147.60000014305115,"domainLookupStart":147.60000014305115,"fetchStart":147.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":147.60000014305115,"responseEnd":437.2999999523163,"responseStart":437.2999999523163,"secureConnectionStart":147.60000014305115},{"duration":293.2999999523163,"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":147.70000004768372,"connectEnd":147.70000004768372,"connectStart":147.70000004768372,"domainLookupEnd":147.70000004768372,"domainLookupStart":147.70000004768372,"fetchStart":147.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":147.70000004768372,"responseEnd":441,"responseStart":441,"secureConnectionStart":147.70000004768372},{"duration":293.60000014305115,"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":147.79999995231628,"connectEnd":147.79999995231628,"connectStart":147.79999995231628,"domainLookupEnd":147.79999995231628,"domainLookupStart":147.79999995231628,"fetchStart":147.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":147.79999995231628,"responseEnd":441.40000009536743,"responseStart":441.40000009536743,"secureConnectionStart":147.79999995231628},{"duration":293.7999999523163,"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":148,"connectEnd":148,"connectStart":148,"domainLookupEnd":148,"domainLookupStart":148,"fetchStart":148,"redirectEnd":0,"redirectStart":0,"requestStart":148,"responseEnd":441.7999999523163,"responseStart":441.7999999523163,"secureConnectionStart":148},{"duration":289.7000000476837,"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":152.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":152.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":442.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":289.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":152.60000014305115,"connectEnd":152.60000014305115,"connectStart":152.60000014305115,"domainLookupEnd":152.60000014305115,"domainLookupStart":152.60000014305115,"fetchStart":152.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":152.60000014305115,"responseEnd":442.2000000476837,"responseStart":442.2000000476837,"secureConnectionStart":152.60000014305115},{"duration":289.90000009536743,"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":152.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":152.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":442.60000014305115,"responseStart":0,"secureConnectionStart":0},{"duration":289.90000009536743,"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":152.79999995231628,"connectEnd":152.79999995231628,"connectStart":152.79999995231628,"domainLookupEnd":152.79999995231628,"domainLookupStart":152.79999995231628,"fetchStart":152.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":152.79999995231628,"responseEnd":442.7000000476837,"responseStart":442.7000000476837,"secureConnectionStart":152.79999995231628},{"duration":824.0999999046326,"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":169.10000014305115,"connectEnd":169.10000014305115,"connectStart":169.10000014305115,"domainLookupEnd":169.10000014305115,"domainLookupStart":169.10000014305115,"fetchStart":169.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":169.10000014305115,"responseEnd":993.2000000476837,"responseStart":993.2000000476837,"secureConnectionStart":169.10000014305115},{"duration":823,"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":170.70000004768372,"connectEnd":170.70000004768372,"connectStart":170.70000004768372,"domainLookupEnd":170.70000004768372,"domainLookupStart":170.70000004768372,"fetchStart":170.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":170.70000004768372,"responseEnd":993.7000000476837,"responseStart":993.7000000476837,"secureConnectionStart":170.70000004768372},{"duration":33.80000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":503.2999999523163,"connectEnd":503.2999999523163,"connectStart":503.2999999523163,"domainLookupEnd":503.2999999523163,"domainLookupStart":503.2999999523163,"fetchStart":503.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":503.2999999523163,"responseEnd":537.1000001430511,"responseStart":537.1000001430511,"secureConnectionStart":503.2999999523163},{"duration":290.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":718.6000001430511,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":718.6000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1009.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":327.7999999523163,"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":719.4000000953674,"connectEnd":719.4000000953674,"connectStart":719.4000000953674,"domainLookupEnd":719.4000000953674,"domainLookupStart":719.4000000953674,"fetchStart":719.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":719.4000000953674,"responseEnd":1047.2000000476837,"responseStart":1047.2000000476837,"secureConnectionStart":719.4000000953674},{"duration":333.09999990463257,"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":719.7000000476837,"connectEnd":719.7000000476837,"connectStart":719.7000000476837,"domainLookupEnd":719.7000000476837,"domainLookupStart":719.7000000476837,"fetchStart":719.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":719.7000000476837,"responseEnd":1052.7999999523163,"responseStart":1052.7999999523163,"secureConnectionStart":719.7000000476837},{"duration":262.39999985694885,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":791.1000001430511,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":791.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1053.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":10,"responseStart":142,"responseEnd":170,"domLoading":145,"domInteractive":1016,"domContentLoadedEventStart":1016,"domContentLoadedEventEnd":1057,"domComplete":1867,"loadEventStart":1867,"loadEventEnd":1868,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":996.2999999523163},{"name":"bigPipe.sidebar-id.end","time":997.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":997.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.end","time":999.7000000476837},{"name":"activityTabFullyLoaded","time":1064.7999999523163}],"measures":[],"correlationId":"87136e898b05cd","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":65,"dbReadsTimeInMs":8,"dbConnsTimeInMs":14,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}