Regardless of how large we set the thread_stack variable ASAN seems to complain about running out of memory at the same point for numerous tests in the main suite. This was found on 10.5 using clang16 with -DWITH_ASAN=YES. The error messages suggest that this seem to be related to the test runner itself as opposed to the actual engine. This does not occur when compiling in debug mode.
Example output for stack_thread=50M and stack_thread=30M
CURRENT_TEST: main.type_timestamp_hires12910Could not execute 'check-testcase' before testcase 'main.type_timestamp_hires' (res: 1):12911mysqltest: Logging to '/usr/share/mysql-test/var/2/tmp/check-mysqld_1.log'.12912mysqltest: Results saved in '/usr/share/mysql-test/var/2/tmp/check-mysqld_1.result'.12913mysqltest: Connecting to server localhost:16000 (socket /usr/share/mysql-test/var/tmp/2/mysqld.1.sock) as 'root', connection 'default', attempt 0 ...12914mysqltest: ... Connected.12915mysqltest: Start processing test commands from './include/check-testcase.test' ...12916mysqltest: At line 19: query 'let $tmp= `SELECT '$tmp' = 'No such row'`' failed: 1436: Thread stack overrun: 63936096 bytes used of a 52428800byte stack, and 32000 bytes needed. Consider increasing the thread_stack system variable
CURRENT_TEST: main.type_timestamp_hires12878Could not execute 'check-testcase' before testcase 'main.type_timestamp_hires' (res: 1):12879mysqltest: Logging to '/usr/share/mysql-test/var/6/tmp/check-mysqld_1.log'.12880mysqltest: Results saved in '/usr/share/mysql-test/var/6/tmp/check-mysqld_1.result'.12881mysqltest: Connecting to server localhost:16060 (socket /usr/share/mysql-test/var/tmp/6/mysqld.1.sock) as 'root', connection 'default', attempt 0 ...12882mysqltest: ... Connected.12883mysqltest: Start processing test commands from './include/check-testcase.test' ...12884mysqltest: At line 19: query 'let $tmp= `SELECT '$tmp' = 'No such row'`' failed: 1436: Thread stack overrun: 42964576 bytes used of a 31457280byte stack, and 32000 bytes needed. Consider increasing the thread_stack system variable.
Attachments
Issue Links
blocks
MDBF-740bump clang-14 asan builder to use clang 20 (and do ubsan too)
Open
relates to
MDEV-31605cmake/stack_direction.c does not work correctly on clang 16
Closed
MDEV-16660Inadequate DEFAULT_THREAD_STACK size for AddressSanitizer
Closed
MDEV-33210Several performance_schema tests fail due to explicit (too small for ASAN) thread_stack
It was apparently your idea to just return 0 here.
I tested with this on clang-18 WITH_ASAN on both 10.5 and 10.11 branch which passed the perfschema tests (including --big-test), where previously there was failures.
Daniel Black
added a comment - sanja , can I get a review on https://github.com/MariaDB/server/pull/3387 please.
It was apparently your idea to just return 0 here.
I tested with this on clang-18 WITH_ASAN on both 10.5 and 10.11 branch which passed the perfschema tests (including --big-test), where previously there was failures.
I belive there are tests which check stack overflow, so switching off this for debug build should have influence on the tests, I do not see. Was all tests really run ?
Oleksandr Byelkin
added a comment - I belive there are tests which check stack overflow, so switching off this for debug build should have influence on the tests, I do not see. Was all tests really run ?
MDEV-31605highlights lack of assumptions that can be made.