Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.5, 10.6
Description
Setting ASAN options as below, and starting 10.6, leads to:
10.6.0 c2ea036b7f4fc4200f168bf53ad3afd208370459 (Optimized) |
=================================================================
|
==974261==ERROR: AddressSanitizer: initialization-order-fiasco on address 0x565153595660 at pc 0x56514586a3e9 bp 0x7ffe020252e0 sp 0x7ffe020252d0
|
WRITE of size 4 at 0x565153595660 thread T0
|
#0 0x56514586a3e8 in Sys_var_integer<unsigned int, 4ul, (enum_mysql_show_type)2>::Sys_var_integer(char const*, char const*, int, long, unsigned long, CMD_LINE, unsigned int, unsigned int, unsigned int, unsigned int, PolyLock*, sys_var::binlog_status_enum, bool (*)(sys_var*, THD*, set_var*), bool (*)(sys_var*, THD*, enum_var_type), char const*) /test/10.6_opt_san/sql/sys_vars.ic:193
|
#1 0x5651446a7781 in __static_initialization_and_destruction_0 /test/10.6_opt_san/sql/sys_vars.cc:6055
|
#2 0x5651497a69bc in __libc_csu_init (/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/bin/mariadbd+0xc7d79bc)
|
#3 0x1471fa4f303f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2703f)
|
#4 0x56514477225d in _start (/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/bin/mariadbd+0x77a325d)
|
|
0x565153595660 is located 0 bytes inside of global variable 'wsrep_gtid_server' defined in '/test/10.6_opt_san/sql/wsrep_mysqld.cc:112:19' (0x565153595660) of size 96
|
registered at:
|
#0 0x5651447870bf in __asan_register_globals.part.0 (/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/bin/mariadbd+0x77b80bf)
|
#1 0x5651497a69bc in __libc_csu_init (/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/bin/mariadbd+0xc7d79bc)
|
|
SUMMARY: AddressSanitizer: initialization-order-fiasco /test/10.6_opt_san/sql/sys_vars.ic:193 in Sys_var_integer<unsigned int, 4ul, (enum_mysql_show_type)2>::Sys_var_integer(char const*, char const*, int, long, unsigned long, CMD_LINE, unsigned int, unsigned int, unsigned int, unsigned int, PolyLock*, sys_var::binlog_status_enum, bool (*)(sys_var*, THD*, set_var*), bool (*)(sys_var*, THD*, enum_var_type), char const*)
|
Shadow bytes around the buggy address:
|
0x0acaaa6aaa70: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
|
0x0acaaa6aaa80: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
|
0x0acaaa6aaa90: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
|
0x0acaaa6aaaa0: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
|
0x0acaaa6aaab0: f9 f9 f9 f9 01 f9 f9 f9 f9 f9 f9 f9 01 f9 f9 f9
|
=>0x0acaaa6aaac0: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9[f6]f6 f6 f6
|
0x0acaaa6aaad0: f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 00 f9 f9 f9
|
0x0acaaa6aaae0: f9 f9 f9 f9 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6
|
0x0acaaa6aaaf0: f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6
|
0x0acaaa6aab00: f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6
|
0x0acaaa6aab10: f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6
|
Shadow byte legend (one shadow byte represents 8 application bytes):
|
Addressable: 00
|
Partially addressable: 01 02 03 04 05 06 07
|
Heap left redzone: fa
|
Freed heap region: fd
|
Stack left redzone: f1
|
Stack mid redzone: f2
|
Stack right redzone: f3
|
Stack after return: f5
|
Stack use after scope: f8
|
Global redzone: f9
|
Global init order: f6
|
Poisoned by user: f7
|
Container overflow: fc
|
Array cookie: ac
|
Intra object redzone: bb
|
ASan internal: fe
|
Left alloca redzone: ca
|
Right alloca redzone: cb
|
Shadow gap: cc
|
==974261==ABORTING
|
./start: line 13: 974261 Aborted (core dumped) /test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/bin/mysqld ${MYEXTRA} --core-file --basedir=/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt --tmpdir=/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/data --datadir=/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/data --socket=/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/socket.sock --port=19164 --log-error=/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/log/master.err --server-id=100 ${MYEXTRA_OPT} 2>&1
|
Server socket: /test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/socket.sock with datadir: /test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/data
|
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/socket.soc' (2)
|
/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/bin/mysqladmin: connect to server at 'localhost' failed
|
error: 'Can't connect to local MySQL server through socket '/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/socket.soc' (2)'
|
Check that mysqld is running and that the socket: '/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/socket.sock' exists!
|
Server on socket /test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/socket.sock with datadir /test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/data halted
|
=================================================================
|
==977366==ERROR: AddressSanitizer: initialization-order-fiasco on address 0x555f9849b660 at pc 0x555f8a7703e9 bp 0x7ffd4369f970 sp 0x7ffd4369f960
|
WRITE of size 4 at 0x555f9849b660 thread T0
|
#0 0x555f8a7703e8 in Sys_var_integer<unsigned int, 4ul, (enum_mysql_show_type)2>::Sys_var_integer(char const*, char const*, int, long, unsigned long, CMD_LINE, unsigned int, unsigned int, unsigned int, unsigned int, PolyLock*, sys_var::binlog_status_enum, bool (*)(sys_var*, THD*, set_var*), bool (*)(sys_var*, THD*, enum_var_type), char const*) /test/10.6_opt_san/sql/sys_vars.ic:193
|
#1 0x555f895ad781 in __static_initialization_and_destruction_0 /test/10.6_opt_san/sql/sys_vars.cc:6055
|
#2 0x555f8e6ac9bc in __libc_csu_init (/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/bin/mariadbd+0xc7d79bc)
|
#3 0x14bea515603f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2703f)
|
#4 0x555f8967825d in _start (/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/bin/mariadbd+0x77a325d)
|
|
0x555f9849b660 is located 0 bytes inside of global variable 'wsrep_gtid_server' defined in '/test/10.6_opt_san/sql/wsrep_mysqld.cc:112:19' (0x555f9849b660) of size 96
|
registered at:
|
#0 0x555f8968d0bf in __asan_register_globals.part.0 (/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/bin/mariadbd+0x77b80bf)
|
#1 0x555f8e6ac9bc in __libc_csu_init (/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/bin/mariadbd+0xc7d79bc)
|
|
SUMMARY: AddressSanitizer: initialization-order-fiasco /test/10.6_opt_san/sql/sys_vars.ic:193 in Sys_var_integer<unsigned int, 4ul, (enum_mysql_show_type)2>::Sys_var_integer(char const*, char const*, int, long, unsigned long, CMD_LINE, unsigned int, unsigned int, unsigned int, unsigned int, PolyLock*, sys_var::binlog_status_enum, bool (*)(sys_var*, THD*, set_var*), bool (*)(sys_var*, THD*, enum_var_type), char const*)
|
Shadow bytes around the buggy address:
|
0x0aac7308b670: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
|
0x0aac7308b680: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
|
0x0aac7308b690: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
|
0x0aac7308b6a0: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
|
0x0aac7308b6b0: f9 f9 f9 f9 01 f9 f9 f9 f9 f9 f9 f9 01 f9 f9 f9
|
=>0x0aac7308b6c0: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9[f6]f6 f6 f6
|
0x0aac7308b6d0: f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 00 f9 f9 f9
|
0x0aac7308b6e0: f9 f9 f9 f9 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6
|
0x0aac7308b6f0: f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6
|
0x0aac7308b700: f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6
|
0x0aac7308b710: f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6
|
Shadow byte legend (one shadow byte represents 8 application bytes):
|
Addressable: 00
|
Partially addressable: 01 02 03 04 05 06 07
|
Heap left redzone: fa
|
Freed heap region: fd
|
Stack left redzone: f1
|
Stack mid redzone: f2
|
Stack right redzone: f3
|
Stack after return: f5
|
Stack use after scope: f8
|
Global redzone: f9
|
Global init order: f6
|
Poisoned by user: f7
|
Container overflow: fc
|
Array cookie: ac
|
Intra object redzone: bb
|
ASan internal: fe
|
Left alloca redzone: ca
|
Right alloca redzone: cb
|
Shadow gap: cc
|
==977366==ABORTING
|
./start: line 13: 977366 Aborted (core dumped) /test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/bin/mysqld ${MYEXTRA} --core-file --basedir=/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt --tmpdir=/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/data --datadir=/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/data --socket=/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/socket.sock --port=19164 --log-error=/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/log/master.err --server-id=100 ${MYEXTRA_OPT} 2>&1
|
Server socket: /test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/socket.sock with datadir: /test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/data
|
=================================================================
|
==980420==ERROR: AddressSanitizer: initialization-order-fiasco on address 0x55709f4d4660 at pc 0x5570917a93e9 bp 0x7ffe93d369b0 sp 0x7ffe93d369a0
|
WRITE of size 4 at 0x55709f4d4660 thread T0
|
#0 0x5570917a93e8 in Sys_var_integer<unsigned int, 4ul, (enum_mysql_show_type)2>::Sys_var_integer(char const*, char const*, int, long, unsigned long, CMD_LINE, unsigned int, unsigned int, unsigned int, unsigned int, PolyLock*, sys_var::binlog_status_enum, bool (*)(sys_var*, THD*, set_var*), bool (*)(sys_var*, THD*, enum_var_type), char const*) /test/10.6_opt_san/sql/sys_vars.ic:193
|
#1 0x5570905e6781 in __static_initialization_and_destruction_0 /test/10.6_opt_san/sql/sys_vars.cc:6055
|
#2 0x5570956e59bc in __libc_csu_init (/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/bin/mariadbd+0xc7d79bc)
|
#3 0x14c301c8f03f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2703f)
|
#4 0x5570906b125d in _start (/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/bin/mariadbd+0x77a325d)
|
|
0x55709f4d4660 is located 0 bytes inside of global variable 'wsrep_gtid_server' defined in '/test/10.6_opt_san/sql/wsrep_mysqld.cc:112:19' (0x55709f4d4660) of size 96
|
registered at:
|
#0 0x5570906c60bf in __asan_register_globals.part.0 (/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/bin/mariadbd+0x77b80bf)
|
#1 0x5570956e59bc in __libc_csu_init (/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/bin/mariadbd+0xc7d79bc)
|
|
SUMMARY: AddressSanitizer: initialization-order-fiasco /test/10.6_opt_san/sql/sys_vars.ic:193 in Sys_var_integer<unsigned int, 4ul, (enum_mysql_show_type)2>::Sys_var_integer(char const*, char const*, int, long, unsigned long, CMD_LINE, unsigned int, unsigned int, unsigned int, unsigned int, PolyLock*, sys_var::binlog_status_enum, bool (*)(sys_var*, THD*, set_var*), bool (*)(sys_var*, THD*, enum_var_type), char const*)
|
Shadow bytes around the buggy address:
|
0x0aae93e92870: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
|
0x0aae93e92880: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
|
0x0aae93e92890: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
|
0x0aae93e928a0: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
|
0x0aae93e928b0: f9 f9 f9 f9 01 f9 f9 f9 f9 f9 f9 f9 01 f9 f9 f9
|
=>0x0aae93e928c0: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9[f6]f6 f6 f6
|
0x0aae93e928d0: f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 00 f9 f9 f9
|
0x0aae93e928e0: f9 f9 f9 f9 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6
|
0x0aae93e928f0: f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6
|
0x0aae93e92900: f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6
|
0x0aae93e92910: f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6 f6
|
Shadow byte legend (one shadow byte represents 8 application bytes):
|
Addressable: 00
|
Partially addressable: 01 02 03 04 05 06 07
|
Heap left redzone: fa
|
Freed heap region: fd
|
Stack left redzone: f1
|
Stack mid redzone: f2
|
Stack right redzone: f3
|
Stack after return: f5
|
Stack use after scope: f8
|
Global redzone: f9
|
Global init order: f6
|
Poisoned by user: f7
|
Container overflow: fc
|
Array cookie: ac
|
Intra object redzone: bb
|
ASan internal: fe
|
Left alloca redzone: ca
|
Right alloca redzone: cb
|
Shadow gap: cc
|
==980420==ABORTING
|
Startup as follows:
export ASAN_OPTIONS=quarantine_size_mb=512:atexit=1:detect_invalid_pointer_pairs=3:dump_instruction_bytes=1:check_initialization_order=1:abort_on_error=1
|
export UBSAN_OPTIONS=print_stacktrace=1
|
export TSAN_OPTIONS=suppress_equal_stacks=1:suppress_equal_addresses=1:history_size=7:verbosity=1
|
/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/bin/mysqld --no-defaults --core-file --basedir=/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt --tmpdir=/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/data --datadir=/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/data --socket=/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/socket.sock --port=19164 --log-error=/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-opt/log/master.err --server-id=100 2>&1 &
|