Bug #116378 routertest_integration_routing_splitting crashing under AddressSanitizer
Submitted: 16 Oct 14:01 Modified: 17 Oct 12:38
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Router Severity:S3 (Non-critical)
Version:8.4.3, 9.1.0 OS:MacOS (15.0.1)
Assigned to: CPU Architecture:ARM

[16 Oct 14:01] Laurynas Biveinis
Description:
runtime_output_directory/routertest_integration_routing_splitting
...
[==========] Running 100 tests from 2 test suites.
[----------] Global test environment set-up.
/Users/laurynas/vilniusdb/mysql-8.4.3/router/tests/integration/test_routing_splitting.cc:586: Failure
Expected: bootstrap_proc.wait_for_exit(10s) doesn't throw an exception.
  Actual: it throws std::runtime_error with description "signalled?".
Please enter MySQL password for root: 
# Bootstrapping MySQL Router 8.4.3 (Source distribution) instance at '/private/tmp/router-fk5JZv'...

Please enter MySQL password for router: 
AddressSanitizer:DEADLYSIGNAL

How to repeat:
XCode 16
-DFORCE_UNSUPPORTED_COMPILER=ON -DCMAKE_BUILD_TYPE=Debug -DWITH_DEBUG=ON
-DMYSQL_MAINTAINER_MODE=ON -DWITH_SYSTEM_LIBS=ON
-DWITH_NDBCLUSTER_STORAGE_ENGINE=OFF -DDOWNLOAD_BOOST=ON
-DWITH_BOOST=<path> -DFORCE_COLORED_OUTPUT=ON -DCMAKE_CXX_FLAGS=-g
-DCMAKE_CXX_FLAGS_DEBUG=-g -DCMAKE_CXX_FLAGS_RELEASE=-O2 -DNDEBUG -g
-DWITH_ASAN=ON -DWITH_ASAN_SCOPE=ON -DWITH_UBSAN=ON
[16 Oct 14:02] Laurynas Biveinis
=================================================================
==89731==ERROR: AddressSanitizer: SEGV on unknown address 0x00010a04fee0 (pc 0x000106d9dc2c bp 0x00016ceb83b0 sp 0x00016ceb7300 T0)
==89731==The signal is caused by a READ memory access.
    #0 0x106d9dc2c in __asan_register_globals+0x628 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x15c2c)
    #1 0x106ddb124 in __asan::AsanApplyToGlobals(void (*)(__asan_global*, unsigned long), void const*)+0x70 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x53124)
    #2 0x106d9d5ec in __asan_register_image_globals+0x3c (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x155ec)
    #3 0x1089b849c in asan.module_ctor+0x18 (io.so:arm64+0x1c49c)
    #4 0x18f4a7b84 in invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const+0x24c (dyld:arm64e+0xfffffffffff57b84)
    #5 0x18f4e63b8  (<unknown module>)
    #6 0x18f4d9b20  (<unknown module>)
    #7 0x18f48c2d8  (<unknown module>)
    #8 0x18f4d8ab4  (<unknown module>)
    #9 0x18f4e5ecc  (<unknown module>)
    #10 0x18f4a78a8 in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const+0xac (dyld:arm64e+0xfffffffffff578a8)
    #11 0x18f4aee84  (<unknown module>)
    #12 0x18f4a7f64 in dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const+0x134 (dyld:arm64e+0xfffffffffff57f64)
    #13 0x18f4ac254  (<unknown module>)
    #14 0x18f4a8154 in dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const+0x198 (dyld:arm64e+0xfffffffffff58154)
    #15 0x18f4c0484  (<unknown module>)
    #16 0x106dc8d28 in dlopen+0x108 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x40d28)
    #17 0x106529fc8 in mysql_harness::DynamicLoader::load(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const dynamic_loader.cc:143
    #18 0x1064d71f4 in mysql_harness::Loader::PluginInfo::PluginInfo(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) loader.cc:323
    #19 0x1064d84b0 in mysql_harness::Loader::load_from(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) loader.cc:398
[16 Oct 14:02] Laurynas Biveinis
#20 0x1064db32c in mysql_harness::Loader::load(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) loader.cc:504
    #21 0x1064d86b4 in mysql_harness::Loader::load_from(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) loader.cc:429
    #22 0x1064dca30 in mysql_harness::Loader::load(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) loader.cc:473
    #23 0x1064de5ac in mysql_harness::Loader::load_all() loader.cc:581
    #24 0x1031f6498 in mysqlrouter::ConfigGenerator::bootstrap_deployment(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_ofstream<char, std::__1::char_traits<char>>&, std::__1::basic_ofstream<char, std::__1::char_traits<char>>&, mysql_harness::Path const&, mysql_harness::Path const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>> const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>>>> const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>> const&, bool, mysqlrouter::AutoCleaner&)::$_1::operator()(bool) const config_generator.cc:1536
    #25 0x1031e3d70 in mysqlrouter::ConfigGenerator::bootstrap_deployment(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_ofstream<char, std::__1::char_traits<char>>&, std::__1::basic_ofstream<char, std::__1::char_traits<char>>&, mysql_harness::Path const&, mysql_harness::Path const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>> const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>>>> const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>> const&, bool, mysqlrouter::AutoCleaner&) config_generator.cc:1542
[16 Oct 14:02] Laurynas Biveinis
#26 0x1031e7dcc in mysqlrouter::ConfigGenerator::bootstrap_directory_deployment(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>> const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>>>> const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>> const&) config_generator.cc:768
    #27 0x102f68428 in MySQLRouter::bootstrap(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) router_app.cc:1937
    #28 0x102f64760 in MySQLRouter::init(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) router_app.cc:315
    #29 0x102f5a1c8 in MySQLRouter::MySQLRouter(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, mysqlrouter::SysUserOperationsBase*) router_app.cc:201
    #30 0x102f5ac4c in MySQLRouter::MySQLRouter(int, char**, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, std::__1::basic_ostream<char, std::__1::char_traits<char>>&, mysqlrouter::SysUserOperationsBase*) router_app.cc:215
    #31 0x102f42414 in real_main(int, char**, bool) main.cc:156
    #32 0x18f490270  (<unknown module>)

==89731==Register values:
 x[0] = 0x00000001089cc300   x[1] = 0x00000000000000a0   x[2] = 0x0000000000000000   x[3] = 0x000000702115901c  
 x[4] = 0x00000000000002aa   x[5] = 0x000000000000001e   x[6] = 0x000000016c6c8000   x[7] = 0x0000000000000001  
 x[8] = 0x000000010a04fee0   x[9] = 0x00000001089cc280  x[10] = 0x000000010a64c500  x[11] = 0x0000007000020000  
x[12] = 0x0000000000000000  x[13] = 0x7db1bce946f3c71b  x[14] = 0x0000000000000000  x[15] = 0x0000000000000012  
x[16] = 0x000000018f847ae0  x[17] = 0x0000000106e305e0  x[18] = 0x0000000000000000  x[19] = 0x00000001089d39f0  
x[20] = 0x0000000104388910  x[21] = 0x00000001089d3b00  x[22] = 0x0000000000000004  x[23] = 0x00000001078189a0  
x[24] = 0x0000000106e455d8  x[25] = 0x00000001089d3b08  x[26] = 0x0000000106e455c0  x[27] = 0x00000001089d3af8  
x[28] = 0x00000001089d3af0     fp = 0x000000016ceb83b0     lr = 0x0000000106d9dbcc     sp = 0x000000016ceb7300  
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x15c2c) in __asan_register_globals+0x628
==89731==ABORTING

Note that this is not bug 113190
[17 Oct 9:51] MySQL Verification Team
Hello Laurynas,

Thank you for the report and feedback!

regards,
Umesh
[17 Oct 12:38] Laurynas Biveinis
Same on 9.1.0