==2377487==ERROR: AddressSanitizer: heap-use-after-free on address 0x6190000b0a48 at pc 0x558328be7418 bp 0x7f24ec2166e0 sp 0x7f24ec2166d8
|
READ of size 8 at 0x6190000b0a48 thread T6
|
#0 0x558328be7417 in free_statistics_for_table(THD*, TABLE*) /data/src/10.8/sql/sql_statistics.cc:2255
|
#1 0x558328e3616d in mysql_admin_table /data/src/10.8/sql/sql_admin.cc:996
|
#2 0x558328e3a3eb in Sql_cmd_analyze_table::execute(THD*) /data/src/10.8/sql/sql_admin.cc:1483
|
#3 0x55832896bf7c in mysql_execute_command(THD*, bool) /data/src/10.8/sql/sql_parse.cc:6006
|
#4 0x5583289793c1 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /data/src/10.8/sql/sql_parse.cc:8034
|
#5 0x55832894f24e in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /data/src/10.8/sql/sql_parse.cc:1894
|
#6 0x55832894bf98 in do_command(THD*, bool) /data/src/10.8/sql/sql_parse.cc:1407
|
#7 0x558328df9ec5 in do_handle_one_connection(CONNECT*, bool) /data/src/10.8/sql/sql_connect.cc:1416
|
#8 0x558328df9886 in handle_one_connection /data/src/10.8/sql/sql_connect.cc:1318
|
#9 0x5583299f812f in pfs_spawn_thread /data/src/10.8/storage/perfschema/pfs.cc:2201
|
#10 0x7f24f40a7fd3 in start_thread nptl/pthread_create.c:442
|
#11 0x7f24f41285bb in clone3 ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
|
0x6190000b0a48 is located 200 bytes inside of 976-byte region [0x6190000b0980,0x6190000b0d50)
|
freed by thread T6 here:
|
#0 0x7f24f48b76a8 in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:52
|
#1 0x55832a5f7a0f in my_free /data/src/10.8/mysys/my_malloc.c:213
|
#2 0x55832905f82d in intern_close_table /data/src/10.8/sql/table_cache.cc:227
|
#3 0x55832905fa43 in tc_remove_table /data/src/10.8/sql/table_cache.cc:263
|
#4 0x558329060f1d in tc_release_table(TABLE*) /data/src/10.8/sql/table_cache.cc:454
|
#5 0x5583287a6280 in close_thread_table(THD*, TABLE**) /data/src/10.8/sql/sql_base.cc:1010
|
#6 0x5583287a5864 in close_thread_tables(THD*) /data/src/10.8/sql/sql_base.cc:950
|
#7 0x5583287bceb9 in open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) /data/src/10.8/sql/sql_base.cc:5332
|
#8 0x55832871535f in open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) /data/src/10.8/sql/sql_base.h:509
|
#9 0x558328e3182c in open_only_one_table /data/src/10.8/sql/sql_admin.cc:421
|
#10 0x558328e352fb in mysql_admin_table /data/src/10.8/sql/sql_admin.cc:912
|
#11 0x558328e3a3eb in Sql_cmd_analyze_table::execute(THD*) /data/src/10.8/sql/sql_admin.cc:1483
|
#12 0x55832896bf7c in mysql_execute_command(THD*, bool) /data/src/10.8/sql/sql_parse.cc:6006
|
#13 0x5583289793c1 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /data/src/10.8/sql/sql_parse.cc:8034
|
#14 0x55832894f24e in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /data/src/10.8/sql/sql_parse.cc:1894
|
#15 0x55832894bf98 in do_command(THD*, bool) /data/src/10.8/sql/sql_parse.cc:1407
|
#16 0x558328df9ec5 in do_handle_one_connection(CONNECT*, bool) /data/src/10.8/sql/sql_connect.cc:1416
|
#17 0x558328df9886 in handle_one_connection /data/src/10.8/sql/sql_connect.cc:1318
|
#18 0x5583299f812f in pfs_spawn_thread /data/src/10.8/storage/perfschema/pfs.cc:2201
|
#19 0x7f24f40a7fd3 in start_thread nptl/pthread_create.c:442
|
|
previously allocated by thread T7 here:
|
#0 0x7f24f48b89cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
|
#1 0x55832a5f6bdf in my_malloc /data/src/10.8/mysys/my_malloc.c:91
|
#2 0x5583287ab3b2 in open_table(THD*, TABLE_LIST*, Open_table_context*) /data/src/10.8/sql/sql_base.cc:2032
|
#3 0x5583287b4f28 in open_and_process_table /data/src/10.8/sql/sql_base.cc:3847
|
#4 0x5583287b7a67 in open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) /data/src/10.8/sql/sql_base.cc:4330
|
#5 0x5583287bcbba in open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) /data/src/10.8/sql/sql_base.cc:5303
|
#6 0x55832871535f in open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) /data/src/10.8/sql/sql_base.h:509
|
#7 0x558328e3182c in open_only_one_table /data/src/10.8/sql/sql_admin.cc:421
|
#8 0x558328e32b28 in mysql_admin_table /data/src/10.8/sql/sql_admin.cc:597
|
#9 0x558328e3a3eb in Sql_cmd_analyze_table::execute(THD*) /data/src/10.8/sql/sql_admin.cc:1483
|
#10 0x55832896bf7c in mysql_execute_command(THD*, bool) /data/src/10.8/sql/sql_parse.cc:6006
|
#11 0x5583289793c1 in mysql_parse(THD*, char*, unsigned int, Parser_state*) /data/src/10.8/sql/sql_parse.cc:8034
|
#12 0x55832894f24e in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /data/src/10.8/sql/sql_parse.cc:1894
|
#13 0x55832894bf98 in do_command(THD*, bool) /data/src/10.8/sql/sql_parse.cc:1407
|
#14 0x558328df9ec5 in do_handle_one_connection(CONNECT*, bool) /data/src/10.8/sql/sql_connect.cc:1416
|
#15 0x558328df9886 in handle_one_connection /data/src/10.8/sql/sql_connect.cc:1318
|
#16 0x5583299f812f in pfs_spawn_thread /data/src/10.8/storage/perfschema/pfs.cc:2201
|
#17 0x7f24f40a7fd3 in start_thread nptl/pthread_create.c:442
|
|
Thread T6 created by T0 here:
|
#0 0x7f24f4849726 in __interceptor_pthread_create ../../../../src/libsanitizer/asan/asan_interceptors.cpp:207
|
#1 0x5583299f3e6a in my_thread_create /data/src/10.8/storage/perfschema/my_thread.h:52
|
#2 0x5583299f851e in pfs_spawn_thread_v1 /data/src/10.8/storage/perfschema/pfs.cc:2252
|
#3 0x55832859777a in inline_mysql_thread_create /data/src/10.8/include/mysql/psi/mysql_thread.h:1139
|
#4 0x5583285aeeeb in create_thread_to_handle_connection(CONNECT*) /data/src/10.8/sql/mysqld.cc:6030
|
#5 0x5583285af4fc in create_new_thread(CONNECT*) /data/src/10.8/sql/mysqld.cc:6089
|
#6 0x5583285af7e7 in handle_accepted_socket(st_mysql_socket, st_mysql_socket) /data/src/10.8/sql/mysqld.cc:6151
|
#7 0x5583285b016b in handle_connections_sockets() /data/src/10.8/sql/mysqld.cc:6275
|
#8 0x5583285ae768 in mysqld_main(int, char**) /data/src/10.8/sql/mysqld.cc:5925
|
#9 0x5583285968e8 in main /data/src/10.8/sql/main.cc:34
|
#10 0x7f24f4046189 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
|
|
Thread T7 created by T0 here:
|
#0 0x7f24f4849726 in __interceptor_pthread_create ../../../../src/libsanitizer/asan/asan_interceptors.cpp:207
|
#1 0x5583299f3e6a in my_thread_create /data/src/10.8/storage/perfschema/my_thread.h:52
|
#2 0x5583299f851e in pfs_spawn_thread_v1 /data/src/10.8/storage/perfschema/pfs.cc:2252
|
#3 0x55832859777a in inline_mysql_thread_create /data/src/10.8/include/mysql/psi/mysql_thread.h:1139
|
#4 0x5583285aeeeb in create_thread_to_handle_connection(CONNECT*) /data/src/10.8/sql/mysqld.cc:6030
|
#5 0x5583285af4fc in create_new_thread(CONNECT*) /data/src/10.8/sql/mysqld.cc:6089
|
#6 0x5583285af7e7 in handle_accepted_socket(st_mysql_socket, st_mysql_socket) /data/src/10.8/sql/mysqld.cc:6151
|
#7 0x5583285b016b in handle_connections_sockets() /data/src/10.8/sql/mysqld.cc:6275
|
#8 0x5583285ae768 in mysqld_main(int, char**) /data/src/10.8/sql/mysqld.cc:5925
|
#9 0x5583285968e8 in main /data/src/10.8/sql/main.cc:34
|
#10 0x7f24f4046189 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
|
|
SUMMARY: AddressSanitizer: heap-use-after-free /data/src/10.8/sql/sql_statistics.cc:2255 in free_statistics_for_table(THD*, TABLE*)
|
Shadow bytes around the buggy address:
|
0x0c328000e0f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
0x0c328000e100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
0x0c328000e110: 00 00 00 fa fa fa fa fa fa fa fa fa fa fa fa fa
|
0x0c328000e120: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
|
0x0c328000e130: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
=>0x0c328000e140: fd fd fd fd fd fd fd fd fd[fd]fd fd fd fd fd fd
|
0x0c328000e150: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
0x0c328000e160: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
0x0c328000e170: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
0x0c328000e180: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
0x0c328000e190: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
|
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
|
==2377487==ABORTING
|
230629 1:42:50 [ERROR] mysqld got signal 6 ;
|
This could be because you hit a bug. It is also possible that this binary
|
or one of the libraries it was linked against is corrupt, improperly built,
|
or misconfigured. This error can also be caused by malfunctioning hardware.
|
|
To report this bug, see https://mariadb.com/kb/en/reporting-bugs
|
|
We will try our best to scrape up some info that will hopefully help
|
diagnose the problem, but since we have already crashed,
|
something is definitely wrong and this may fail.
|
|
Server version: 10.8.8-MariaDB-debug-log source revision: 1f1eaef0afddb1d7aeb44ad118cfc40a69d059d3
|
key_buffer_size=1048576
|
read_buffer_size=131072
|
max_used_connections=3
|
max_threads=153
|
thread_count=3
|
It is possible that mysqld could use up to
|
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 63908 K bytes of memory
|
Hope that's ok; if not, decrease some variables in the equation.
|
|
Thread pointer: 0x62b0000bd218
|
Attempting backtrace. You can use the following information to find out
|
where mysqld died. If you see no messages after this, something went
|
terribly wrong...
|
stack_bottom = 0x7f24ec219c10 thread_stack 0x100000
|
sanitizer_common/sanitizer_common_interceptors.inc:4277(__interceptor_backtrace.part.0)[0x7f24f4851f31]
|
mysys/stacktrace.c:215(my_print_stacktrace)[0x55832a607cfc]
|
sql/signal_handler.cc:241(handle_fatal_signal)[0x55832921d197]
|
libc_sigaction.c:0(__restore_rt)[0x7f24f405af90]
|
nptl/pthread_kill.c:44(__pthread_kill_implementation)[0x7f24f40a9ccc]
|
posix/raise.c:27(__GI_raise)[0x7f24f405aef2]
|
stdlib/abort.c:81(__GI_abort)[0x7f24f4045472]
|
sanitizer_common/sanitizer_posix_libcdep.cpp:137(__sanitizer::Abort())[0x7f24f48d650f]
|
sanitizer_common/sanitizer_termination.cpp:59(__sanitizer::Die())[0x7f24f48e2ba1]
|
asan/asan_report.cpp:190(__asan::ScopedInErrorReport::~ScopedInErrorReport())[0x7f24f48c1f5e]
|
asan/asan_report.cpp:479(__asan::ReportGenericError(unsigned long, unsigned long, unsigned long, unsigned long, bool, unsigned long, unsigned int, bool))[0x7f24f48c14c6]
|
asan/asan_rtl.cpp:123(__asan_report_load8)[0x7f24f48c25ac]
|
sql/sql_statistics.cc:2255(free_statistics_for_table(THD*, TABLE*))[0x558328be7418]
|
sql/sql_admin.cc:997(mysql_admin_table(THD*, TABLE_LIST*, st_ha_check_opt*, st_mysql_const_lex_string const*, thr_lock_type, bool, bool, unsigned int, int (*)(THD*, TABLE_LIST*, st_ha_check_opt*), int (handler::*)(THD*, st_ha_check_opt*), int (*)(THD*, TABLE_LIST*, st_ha_check_opt*), bool))[0x558328e3616e]
|
sql/sql_admin.cc:1483(Sql_cmd_analyze_table::execute(THD*))[0x558328e3a3ec]
|
sql/sql_parse.cc:6006(mysql_execute_command(THD*, bool))[0x55832896bf7d]
|
sql/sql_parse.cc:8034(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x5583289793c2]
|
sql/sql_parse.cc:1896(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x55832894f24f]
|
sql/sql_parse.cc:1407(do_command(THD*, bool))[0x55832894bf99]
|
sql/sql_connect.cc:1416(do_handle_one_connection(CONNECT*, bool))[0x558328df9ec6]
|
sql/sql_connect.cc:1320(handle_one_connection)[0x558328df9887]
|
perfschema/pfs.cc:2203(pfs_spawn_thread)[0x5583299f8130]
|
nptl/pthread_create.c:442(start_thread)[0x7f24f40a7fd4]
|
x86_64/clone3.S:83(clone3)[0x7f24f41285bc]
|
|
Trying to get some variables.
|
Some pointers may be invalid and cause the dump to abort.
|
Query (0x629000276238): ANALYZE TABLE t1 PERSISTENT FOR ALL
|
|
Connection ID (thread ID): 5
|
Status: KILL_TIMEOUT
|
|
Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off,hash_join_cardinality=off
|
|
The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
|
information that should help you find out what is causing the crash.
|
Writing a core file...
|
Working directory at /dev/shm/var_auto_crq1/mysqld.1/data
|
Resource Limits:
|
Limit Soft Limit Hard Limit Units
|
Max cpu time unlimited unlimited seconds
|
Max file size unlimited unlimited bytes
|
Max data size unlimited unlimited bytes
|
Max stack size 8388608 unlimited bytes
|
Max core file size unlimited unlimited bytes
|
Max resident set unlimited unlimited bytes
|
Max processes 385718 385718 processes
|
Max open files 65536 65536 files
|
Max locked memory 12648972288 12648972288 bytes
|
Max address space unlimited unlimited bytes
|
Max file locks unlimited unlimited locks
|
Max pending signals 385718 385718 signals
|
Max msgqueue size 819200 819200 bytes
|
Max nice priority 0 0
|
Max realtime priority 0 0
|
Max realtime timeout unlimited unlimited us
|
Core pattern: core
|
|
Kernel version: Linux version 6.1.0-9-amd64 (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian 6.1.27-1 (2023-05-08)
|