Bug #113704 Tests main.log_backtrace & main.log_backtrace_debug fail under Sanitizer build
Submitted: 22 Jan 11:28 Modified: 4 Jul 9:38
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Tests Severity:S7 (Test Cases)
Version:8.0.37, 8.3.0 OS:MacOS (12.4.1)
Assigned to: CPU Architecture:ARM

[22 Jan 11:28] Laurynas Biveinis
Description:
If the server is compiled with sanitizer options, then the test main.log_backtrace fails:
...
[ 50%] main.log_backtrace                        [ fail ]
        Test ended at 2024-01-22 13:26:20

CURRENT_TEST: main.log_backtrace
WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.
safe_process[52976]: Child process: 52977, killed by signal: 9

Server [mysqld.1 - pid: 52997, winpid: 52997, exit: 256] failed during test run
Server log from this test:
----------SERVER LOG START-----------
...

How to repeat:
The CMake options I used for build were
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -DWITH_DEBUG=ON -DMYSQL_MAINTAINER_MODE=ON -DDOWNLOAD_BOOST=ON -DWITH_BOOST=~/vilniusdb/mysql-boost/ -DWITH_SYSTEM_LIBS=ON -DFORCE_COLORED_OUTPUT=ON -DCMAKE_C_FLAGS_DEBUG=-g -DCMAKE_CXX_FLAGS_DEBUG=-g -DCMAKE_CXX_FLAGS_RELEASE=-O2 -g -DNDEBUG -Wno-unused-variable -DWITH_ASAN=ON -DWITH_ASAN_SCOPE=ON -DWITH_UBSAN=ON
[22 Jan 11:32] Laurynas Biveinis
So does a test main.log_backtrace_debug. Piggybacking on this bug:

[ 50%] main.log_backtrace_debug                  [ fail ]
        Test ended at 2024-01-22 13:30:52

CURRENT_TEST: main.log_backtrace_debug
2024-01-22 14:30:46.444 defaults[53626:57223002] 
The domain/default pair of (com.apple.CrashReporter, DialogType) does not exist
WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.
WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.
WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.
safe_process[53621]: Child process: 53622, killed by signal: 9

Server [mysqld.1 - pid: 53666, winpid: 53666, exit: 256] failed during test run
Server log from this test:
----------SERVER LOG START-----------
...
[22 Jan 11:43] MySQL Verification Team
Hi Mr. Laurynas,

Thank you for your bug report.

However, we need more feedback from you in order to attempt to repeat this bug.

Please, provide us with all details of the environment in which your test were run, the exact CPUs that you use and the full description of the CMAKE and CC and CXX options that you used in order to get the tests fail. Also, did you use options for the Debug or Release versions and which ones exactly ????

There is another problem with your report.  The error that you get has NOTHING to do with sanitizer itself.

This is not the message from the sanitizer, but from the test suite itself.

Hence, can you repeat this error with DEBUG build, with no Sanitizer built in ????

You could also try to repeat the error with our own mysqld debug binary which comes with our macOS packages . Do you get the failed test there too ????

We are waiting for your full and detailed feedback.

Thanks in advance.
[23 Jan 10:13] Laurynas Biveinis
Dear MySQL Verification Team,

1) macOS 12.4.1 on an M1 Max CPU. The CMake flags have been provided in the original report. No other CC/CXX options have been set. The "Debug or Release" question is answered there too (it's Debug).
2) I never claimed that the the test fail with a sanitizer error. What I did claim was, that the server build with sanitizer options fails the testcase. The server built with the same options but excluding the sanitizer flags does not fail the testcase.
3) Since the debug server does not fail the testcase and only adding the sanitizer flags makes it do so, I will not try any other binaries because there is nothing to try unless you have sanitizer-enabled binaries, which I doubt.
[23 Jan 11:30] MySQL Verification Team
Hi Mr. Biveinis,

Of course that we have sanitizer-enabled binaries and we have informed you previously of the results of those.

Also, let us know whether are you aware that these tests pass or fail with 8.0.35.

Last, but not least,  looking at your entries for "CPU Architecture", we understand that those fail on both CPU's supported by macOS in question

Looking forward to your feedback.
[23 Jan 12:39] Laurynas Biveinis
Sorry, I meant sanitizer binaries for download.
Setting the architecture to ARM to reflect what I was testing on.
The test fails on 8.0.35 in the same way.
[23 Jan 12:55] MySQL Verification Team
Hi Mr. Biveinis,

We have finally managed to build 8.0.36 debug binaries with all sanitizer options  on Sonoma running on M2.

We did not manage to repeat the test failure on x86, but this test failed, as you reported, on Sonoma running on M2.

This bug is now verified for the specified platform only.

Thank you for your contribution.
[24 Jan 10:20] Laurynas Biveinis
Same on 8.3.0.
[24 Jan 12:10] MySQL Verification Team
Hi Mr. Biveinis,

We have verified your bug report for the versions 8.0 and all higher versions.
[6 May 4:09] Laurynas Biveinis
Same on 8.0.37.
[6 May 5:02] Laurynas Biveinis
8.0.37 also added main.log_backtrace_debug, which fails the same under sanitizer. Adding it here.
[9 May 9:29] MySQL Verification Team
Hi Mr. Biveinis,

We confirm your results.

We will update our internal bugs database with these info.
[4 Jul 8:39] Laurynas Biveinis
Could not reproduce on 8.0.38 / 8.4.1 / 9.0.0
[4 Jul 9:38] MySQL Verification Team
Hi Mr. Biveinis,

Thank you for your feedback.

Since 8.0.38 is the pending release of the version 8.0 and 8.3 is no longer maintained, that means that this bug report is therefore closed.

This is a very important information.