Type:
Bug
Priority:
Major
Resolution:
Unresolved
Affects Version/s:
10.4(EOL) , 10.5 , 10.6 , 10.11 , 11.0(EOL) , 11.1(EOL) , 11.2(EOL) , 11.3(EOL) , 11.4
Recent versions of GCC and clang require much larger thread stack size when the server is built with -DWITH_ASAN=ON . This is by design, and a good thing, because it will allow more stack buffer overflows to be caught.
A number of tests in ./mtr --suite=perfschema are explicitly specifying thread_stack=655360 , which usually is more than twice the DEFAULT_THREAD_STACK that is defined in include/my_pthread.h . However, the minimum for ASAN instrumented builds can be as large as 11 megabytes (more than 10 times this size).
The following patch would prevent server startup failures in a number of tests when I use cmake -DWITH_ASAN=ON on clang 16.0.6:
diff --git a/mysql-test/suite/perfschema/t/max_program_zero-master.opt b/mysql-test/suite/perfschema/t/max_program_zero-master.opt
index 7803f9c5e1b..7e5af1a2e3a 100644
--- a/mysql-test/suite/perfschema/t/max_program_zero-master.opt
+++ b/mysql-test/suite/perfschema/t/max_program_zero-master.opt
@@ -1,3 +1,2 @@
--loose-performance_schema_max_program_instances=0
--loose-performance_schema_max_statement_stack=1
---thread_stack=655360
diff --git a/mysql-test/suite/perfschema/t/start_server_low_digest_sql_length-master.opt b/mysql-test/suite/perfschema/t/start_server_low_digest_sql_length-master.opt
index e6483c360f9..0e7696ccaca 100644
--- a/mysql-test/suite/perfschema/t/start_server_low_digest_sql_length-master.opt
+++ b/mysql-test/suite/perfschema/t/start_server_low_digest_sql_length-master.opt
@@ -1,3 +1,2 @@
---thread_stack=655360
--max_digest_length=10
--loose-performance_schema_max_sql_text_length=10
diff --git a/mysql-test/suite/perfschema/t/start_server_zero_digest_sql_length-master.opt b/mysql-test/suite/perfschema/t/start_server_zero_digest_sql_length-master.opt
index 5ee2230e539..5ddf5d8caae 100644
--- a/mysql-test/suite/perfschema/t/start_server_zero_digest_sql_length-master.opt
+++ b/mysql-test/suite/perfschema/t/start_server_zero_digest_sql_length-master.opt
@@ -1,3 +1,2 @@
---thread_stack=655360
--max_digest_length=0
--loose-performance_schema_max_sql_text_length=0
diff --git a/mysql-test/suite/perfschema/t/statement_digest_long_query-master.opt b/mysql-test/suite/perfschema/t/statement_digest_long_query-master.opt
deleted file mode 100644
index 3f9d7900961..00000000000
--- a/mysql-test/suite/perfschema/t/statement_digest_long_query-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---thread_stack=655360
diff --git a/mysql-test/suite/perfschema/t/statement_program_concurrency-master.opt b/mysql-test/suite/perfschema/t/statement_program_concurrency-master.opt
index 8c0dedeeb17..df5d7b1b706 100644
--- a/mysql-test/suite/perfschema/t/statement_program_concurrency-master.opt
+++ b/mysql-test/suite/perfschema/t/statement_program_concurrency-master.opt
@@ -1 +1 @@
---innodb_lock_wait_timeout=1 --thread_stack=655360
+--innodb_lock_wait_timeout=0
diff --git a/mysql-test/suite/perfschema/t/statement_program_lost_inst-master.opt b/mysql-test/suite/perfschema/t/statement_program_lost_inst-master.opt
index 699c91930ae..0744e09f8ae 100644
--- a/mysql-test/suite/perfschema/t/statement_program_lost_inst-master.opt
+++ b/mysql-test/suite/perfschema/t/statement_program_lost_inst-master.opt
@@ -1,3 +1,3 @@
--loose-performance_schema_max_program_instances=7
--loose-performance_schema_max_statement_stack=2
---thread_stack=655360
+--thread_stack=10485760
diff --git a/mysql-test/suite/perfschema/t/statement_program_lost_inst.test b/mysql-test/suite/perfschema/t/statement_program_lost_inst.test
index 023180b9d2b..fa70ec963e8 100644
--- a/mysql-test/suite/perfschema/t/statement_program_lost_inst.test
+++ b/mysql-test/suite/perfschema/t/statement_program_lost_inst.test
@@ -22,7 +22,7 @@ let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
--exec echo "wait" > $restart_file
--shutdown_server
--source include/wait_until_disconnected.inc
---exec echo "restart:--performance_schema_max_program_instances=7 --performance_schema_max_statement_stack=2 --thread_stack=655360">$restart_file
+--exec echo "restart:--performance_schema_max_program_instances=7 --performance_schema_max_statement_stack=2">$restart_file
--enable_reconnect
--source include/wait_until_connected_again.inc
diff --git a/mysql-test/suite/perfschema/t/statement_program_nested-master.opt b/mysql-test/suite/perfschema/t/statement_program_nested-master.opt
deleted file mode 100644
index 3f9d7900961..00000000000
--- a/mysql-test/suite/perfschema/t/statement_program_nested-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---thread_stack=655360
diff --git a/mysql-test/suite/perfschema/t/statement_program_nesting_event_check-master.opt b/mysql-test/suite/perfschema/t/statement_program_nesting_event_check-master.opt
deleted file mode 100644
index 3f9d7900961..00000000000
--- a/mysql-test/suite/perfschema/t/statement_program_nesting_event_check-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---thread_stack=655360
diff --git a/mysql-test/suite/perfschema/t/statement_program_non_nested-master.opt b/mysql-test/suite/perfschema/t/statement_program_non_nested-master.opt
deleted file mode 100644
index 3f9d7900961..00000000000
--- a/mysql-test/suite/perfschema/t/statement_program_non_nested-master.opt
+++ /dev/null
@@ -1 +0,0 @@
---thread_stack=655360
I did not check what would happen in a build that would use the smaller DEFAULT_THREAD_STACK . The above patch is only indicating what is wrong and needs to be fixed in some way.
{"report":{"fcp":1239.5,"ttfb":443,"pageVisibility":"visible","entityId":127213,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"7647bb76-9f9b-41f4-a431-38026220be07","navigationType":0,"readyForUser":1375.6999998092651,"redirectCount":0,"resourceLoadedEnd":1178.3000001907349,"resourceLoadedStart":448.69999980926514,"resourceTiming":[{"duration":158.60000038146973,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":448.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":448.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":607.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":162.60000038146973,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":449,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":449,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":611.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":351.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":449.19999980926514,"connectEnd":449.19999980926514,"connectStart":449.19999980926514,"domainLookupEnd":449.19999980926514,"domainLookupStart":449.19999980926514,"fetchStart":449.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":619.1000003814697,"responseEnd":800.5,"responseStart":640.8000001907349,"secureConnectionStart":449.19999980926514},{"duration":466,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":449.5,"connectEnd":449.5,"connectStart":449.5,"domainLookupEnd":449.5,"domainLookupStart":449.5,"fetchStart":449.5,"redirectEnd":0,"redirectStart":0,"requestStart":618.8000001907349,"responseEnd":915.5,"responseStart":639.3999996185303,"secureConnectionStart":449.5},{"duration":194.80000019073486,"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":449.69999980926514,"connectEnd":449.69999980926514,"connectStart":449.69999980926514,"domainLookupEnd":449.69999980926514,"domainLookupStart":449.69999980926514,"fetchStart":449.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":619.3000001907349,"responseEnd":644.5,"responseStart":642.6000003814697,"secureConnectionStart":449.69999980926514},{"duration":199,"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":449.80000019073486,"connectEnd":449.80000019073486,"connectStart":449.80000019073486,"domainLookupEnd":449.80000019073486,"domainLookupStart":449.80000019073486,"fetchStart":449.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":623.3000001907349,"responseEnd":648.8000001907349,"responseStart":645.6000003814697,"secureConnectionStart":449.80000019073486},{"duration":197.69999980926514,"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":450,"connectEnd":450,"connectStart":450,"domainLookupEnd":450,"domainLookupStart":450,"fetchStart":450,"redirectEnd":0,"redirectStart":0,"requestStart":623.6000003814697,"responseEnd":647.6999998092651,"responseStart":644.6000003814697,"secureConnectionStart":450},{"duration":162.39999961853027,"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":450.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":450.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":612.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":198.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":450.5,"connectEnd":450.5,"connectStart":450.5,"domainLookupEnd":450.5,"domainLookupStart":450.5,"fetchStart":450.5,"redirectEnd":0,"redirectStart":0,"requestStart":623.8000001907349,"responseEnd":649.3000001907349,"responseStart":646.1999998092651,"secureConnectionStart":450.5},{"duration":163.19999980926514,"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":450.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":450.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":613.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":199.39999961853027,"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":450.80000019073486,"connectEnd":450.80000019073486,"connectStart":450.80000019073486,"domainLookupEnd":450.80000019073486,"domainLookupStart":450.80000019073486,"fetchStart":450.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":625.1000003814697,"responseEnd":650.1999998092651,"responseStart":648.1999998092651,"secureConnectionStart":450.80000019073486},{"duration":507.4000005722046,"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":456.3999996185303,"connectEnd":456.3999996185303,"connectStart":456.3999996185303,"domainLookupEnd":456.3999996185303,"domainLookupStart":456.3999996185303,"fetchStart":456.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":857.5,"responseEnd":963.8000001907349,"responseStart":958.8999996185303,"secureConnectionStart":456.3999996185303},{"duration":721.8000001907349,"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":456.5,"connectEnd":456.5,"connectStart":456.5,"domainLookupEnd":456.5,"domainLookupStart":456.5,"fetchStart":456.5,"redirectEnd":0,"redirectStart":0,"requestStart":1167.5,"responseEnd":1178.3000001907349,"responseStart":1177.6999998092651,"secureConnectionStart":456.5},{"duration":253.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":950.6000003814697,"connectEnd":950.6000003814697,"connectStart":950.6000003814697,"domainLookupEnd":950.6000003814697,"domainLookupStart":950.6000003814697,"fetchStart":950.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":1171.6000003814697,"responseEnd":1204.1000003814697,"responseStart":1202.8000001907349,"secureConnectionStart":950.6000003814697},{"duration":265.5999994277954,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1231.8000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1231.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1497.3999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":324,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1257.3000001907349,"connectEnd":1257.3000001907349,"connectStart":1257.3000001907349,"domainLookupEnd":1257.3000001907349,"domainLookupStart":1257.3000001907349,"fetchStart":1257.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1547.6000003814697,"responseEnd":1581.3000001907349,"responseStart":1579.8999996185303,"secureConnectionStart":1257.3000001907349}],"fetchStart":0,"domainLookupStart":185,"domainLookupEnd":217,"connectStart":217,"connectEnd":236,"secureConnectionStart":225,"requestStart":237,"responseStart":443,"responseEnd":448,"domLoading":446,"domInteractive":1509,"domContentLoadedEventStart":1509,"domContentLoadedEventEnd":1580,"domComplete":3340,"loadEventStart":3340,"loadEventEnd":3341,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1482.3000001907349},{"name":"bigPipe.sidebar-id.end","time":1483.3000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":1483.3999996185303},{"name":"bigPipe.activity-panel-pipe-id.end","time":1486.1000003814697},{"name":"activityTabFullyLoaded","time":1588.6000003814697}],"measures":[],"correlationId":"8ebb7ad66ac16c","effectiveType":"4g","downlink":9.3,"rtt":0,"serverDuration":91,"dbReadsTimeInMs":12,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}