Bug #92651 main.parser-big-64bit fails with sanitizers enabled

Submitted: 3 Oct 2018 8:30 Modified: 4 Nov 2018 17:59
Reporter: Przemysław Skibiński (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Server Severity:S7 (Test Cases)
Version:8.0.12 OS:Any
Assigned to: CPU Architecture:Any

[3 Oct 2018 8:30] Przemysław Skibiński
Description:
main.parser-big-64bit fails with -DWITH_UBSAN=ON:

CURRENT_TEST: main.parser-big-64bit
--- /github/percona-server/8.0-mysql/mysql-test/r/parser-big-64bit.result	2018-08-15 11:18:59.817082561 +0300
+++ /github/percona-server/8.0-mysql-asan/mysql-test/var/log/parser-big-64bit.reject	2018-10-03 11:07:07.709548561 +0300
@@ -39,7 +39,7 @@
 16149996
 SELECT @@global.thread_stack, @@global.max_allowed_packet;
 @@global.thread_stack	@@global.max_allowed_packet
-286720	16999424
+860160	16999424
 DROP FUNCTION f1;
 DROP PROCEDURE p1;
 DROP TABLE t1;

How to repeat:
./mysql-test/mtr --debug-server --sanitize parser-big-64bit

Suggested fix:
The issue is caused by following my_thread.h definitions:

#elif defined HAVE_UBSAN
#define STACK_MULTIPLIER 3UL
#else
#define STACK_MULTIPLIER 1UL
#endif

#define DEFAULT_THREAD_STACK (STACK_MULTIPLIER * 280UL * 1024UL)
[5 Oct 2018 10:34] MySQL Verification Team
Hello Przemysław,

Thank you for the report and feedback!

regards,
Umesh
[18 Oct 2018 13:06] Tor Didriksen
Posted by developer:
 
Fixed by
Bug #28186188 INCREASE MINIMUM VALUE OF THREAD_STACK FOR CLANG/UBSAN BUILDS
Bug #91260 increase minimum value of thread_stack for clang/ubsan builds

index b2ef82f8277..94de5959dd2 100644
--- a/mysql-test/include/parser-big.inc
+++ b/mysql-test/include/parser-big.inc
@@ -50,10 +50,7 @@ DELIMITER ;|
 
 eval CALL p1($min20087571, $max20087571, 100000);
 SELECT LENGTH(@terms);
-# Double stack size for sparc/developer studio.
-# --replace_result 524288 262144 393216 196608
---replace_result 573440 286720 442368 286720 221184 286720
-SELECT @@global.thread_stack, @@global.max_allowed_packet;
+SELECT @@global.max_allowed_packet;

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.055 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.