[MDEV-24686] SIGSEGV's in __memmove_avx_unaligned_erms, Event_queue::drop_matching_events, my_scan_weight_utf8_general_ci, main_arena(), Event_db_repository::load_named_event, and Event_queue::get_top_for_execution_if_time | SIGABRT in Diagnostics_area::set_ok_status Created: 2021-01-26  Updated: 2023-11-28

Status: Confirmed
Project: MariaDB Server
Component/s: Data Definition - Procedure, Events
Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0, 11.1
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0

Type: Bug Priority: Critical
Reporter: Roel Van de Paar Assignee: Rucha Deodhar
Resolution: Unresolved Votes: 0
Labels: ASAN, affects-tests, memory

Issue Links:
Duplicate
is duplicated by MDEV-30285 Failed to execute ALTER EVENT Closed
Relates
relates to MDEV-30894 [draft] Assertion `cache_mngr' faile... Open

 Description   

Testcase is lightly sporadic. 1-3 Runs at CLI should suffice regularly and even often, though at times many more may be needed. A slight delay before the last query may help with sporadicity. Testcase, when repeated and not crashing, may (to be confirmed) cause hangs and/or memory hogging. MDEV-22648 may be [remotely] connected. Issue hits quite a few different stacks, though does not look to be stack smashing (repetitive consistent results). Issue may be significant. Setting to critical, but feel free to adjust as needed.

CREATE EVENT e ON SCHEDULE EVERY 5 HOUR DO SELECT 2;
SET timestamp=100000000;
CREATE EVENT root8 ON SCHEDULE EVERY '2:5' YEAR_MONTH DO SELECT 1;
CREATE EVENT EVENT1 ON SCHEDULE EVERY 15 MINUTE STARTS NOW() ENDS DATE_ADD(NOW(), INTERVAL 5 HOUR) DO BEGIN END;
SET GLOBAL event_scheduler=TRUE;
ALTER EVENT e ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00';
DROP PROCEDURE not_there;
DROP EVENT IF EXISTS non_existing;

Leads to:

10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Optimized)

Core was generated by `/test/MD010121-mariadb-10.6.0-linux-x86_64-opt/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
    at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
[Current thread is 1 (Thread 0x14ed5c0d0700 (LWP 2361337))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
#1  0x000056215f4e766f in my_write_core (sig=sig@entry=11) at /test/10.6_opt/mysys/stacktrace.c:424
#2  0x000056215ef5cd20 in handle_fatal_signal (sig=11) at /test/10.6_opt/sql/signal_handler.cc:330
#3  <signal handler called>
#4  0x000056215f0ebdec in Event_queue::drop_matching_events (this=this@entry=0x5621624ed890, thd=thd@entry=0x14ed10000c58, pattern=pattern@entry=0x14ed5c0ce5c0, comparator=0x56215ee38930 <event_basic_db_equal(st_mysql_const_lex_string const*, Event_basic*)>) at /test/10.6_opt/sql/event_queue.cc:358
#5  0x000056215f0ec421 in Event_queue::drop_schema_events (this=0x5621624ed890, thd=thd@entry=0x14ed10000c58, schema=schema@entry=0x14ed5c0ce5c0) at /test/10.6_opt/sql/event_queue.cc:394
#6  0x000056215ee39ef1 in Events::drop_schema_events (thd=thd@entry=0x14ed10000c58, db=db@entry=0x14ed10010470 "test") at /test/10.6_opt/sql/events.cc:664
#7  0x000056215ed0789f in mysql_rm_db_internal (thd=0x14ed10000c58, db=<optimized out>, if_exists=<optimized out>, silent=<optimized out>) at /test/10.6_opt/sql/sql_db.cc:1089
#8  0x000056215ed5488c in mysql_execute_command (thd=0x14ed10000c58) at /test/10.6_opt/sql/structs.h:559
#9  0x000056215ed421df in mysql_parse (thd=0x14ed10000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/10.6_opt/sql/sql_parse.cc:7881
#10 0x000056215ed4db27 in dispatch_command (command=COM_QUERY, thd=0x14ed10000c58, packet=0x14ed10008049 "DROP DATABASE test", packet_length=<optimized out>) at /test/10.6_opt/sql/sql_class.h:1293
#11 0x000056215ed4ff42 in do_command (thd=0x14ed10000c58) at /test/10.6_opt/sql/sql_parse.cc:1348
#12 0x000056215ee54e81 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5621624cca98, put_in_cache=put_in_cache@entry=true) at /test/10.6_opt/sql/sql_connect.cc:1410
#13 0x000056215ee552fd in handle_one_connection (arg=arg@entry=0x5621624cca98) at /test/10.6_opt/sql/sql_connect.cc:1312
#14 0x000056215f1dad76 in pfs_spawn_thread (arg=0x562162470fe8) at /test/10.6_opt/storage/perfschema/pfs.cc:2201
#15 0x000014ed5d607609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#16 0x000014ed5d1f6293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug)

Core was generated by `/test/MD010121-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
    at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
[Current thread is 1 (Thread 0x152fa0382700 (LWP 1940722))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
#1  0x00005603f71670d7 in my_write_core (sig=sig@entry=11) at /test/10.6_dbg/mysys/stacktrace.c:424
#2  0x00005603f68fbab1 in handle_fatal_signal (sig=11) at /test/10.6_dbg/sql/signal_handler.cc:330
#3  <signal handler called>
#4  my_scan_weight_utf8mb3_general_ci (end=0x152f00000203 <error: Cannot access memory at address 0x152f00000203>, str=0x152f00000200 <error: Cannot access memory at address 0x152f00000200>, weight=<synthetic pointer>) at /test/10.6_dbg/strings/strcoll.ic:99
#5  my_strnncollsp_utf8mb3_general_ci (cs=<optimized out>, a=0x152f5c012768 "non_existing", a_length=<optimized out>, b=0x152f00000200 <error: Cannot access memory at address 0x152f00000200>, b_length=<optimized out>) at /test/10.6_dbg/strings/strcoll.ic:256
#6  0x00005603f6767c25 in charset_info_st::strnncollsp (blen=<optimized out>, b=<optimized out>, alen=<optimized out>, a=<optimized out>, this=<optimized out>) at /test/10.6_dbg/include/m_ctype.h:787
#7  sortcmp_lex_string (s=s@entry=0x152f5c012790, t=t@entry=0x5603fa208cd8, cs=<optimized out>) at /test/10.6_dbg/sql/events.cc:107
#8  0x00005603f67677b7 in event_basic_identifier_equal (db=db@entry=0x152f5c012780, name=name@entry=0x152f5c012790, b=b@entry=0x5603fa208c80) at /test/10.6_dbg/sql/event_data_objects.cc:1613
#9  0x00005603f6b24e86 in Event_queue::find_n_remove_event (this=this@entry=0x5603fa2578c0, db=db@entry=0x152f5c012780, name=name@entry=0x152f5c012790) at /test/10.6_dbg/sql/event_queue.cc:427
#10 0x00005603f6b25951 in Event_queue::drop_event (this=0x5603fa2578c0, thd=thd@entry=0x152f5c000db8, dbname=dbname@entry=0x152f5c012780, name=name@entry=0x152f5c012790) at /test/10.6_dbg/sql/event_queue.cc:301
#11 0x00005603f67692f1 in Events::drop_event (thd=thd@entry=0x152f5c000db8, dbname=0x152f5c012780, name=0x152f5c012790, if_exists=<optimized out>) at /test/10.6_dbg/sql/events.cc:620
#12 0x00005603f663a684 in mysql_execute_command (thd=thd@entry=0x152f5c000db8) at /test/10.6_dbg/sql/structs.h:559
#13 0x00005603f6623072 in mysql_parse (thd=thd@entry=0x152f5c000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x152fa03813d0) at /test/10.6_dbg/sql/sql_parse.cc:7881
#14 0x00005603f66311ec in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x152f5c000db8, packet=packet@entry=0x152f5c008d39 "DROP EVENT IF EXISTS non_existing", packet_length=packet_length@entry=33) at /test/10.6_dbg/sql/sql_class.h:1293
#15 0x00005603f663452d in do_command (thd=0x152f5c000db8) at /test/10.6_dbg/sql/sql_parse.cc:1348
#16 0x00005603f67907fc in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5603fa208d08, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
#17 0x00005603f6790f03 in handle_one_connection (arg=arg@entry=0x5603fa208d08) at /test/10.6_dbg/sql/sql_connect.cc:1312
#18 0x00005603f6c4688f in pfs_spawn_thread (arg=0x5603fa130898) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
#19 0x0000152faacf5609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#20 0x0000152faa8e4293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

10.4.18 3454b5cf35a61e8f6cfab376638520dee4a50609 (Debug)

Core was generated by `/test/MD010121-mariadb-10.4.18-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
    at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
[Current thread is 1 (Thread 0x150ab0137700 (LWP 1620566))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
#1  0x000055cbc4eb0ebd in my_write_core (sig=sig@entry=11) at /test/10.4_dbg/mysys/stacktrace.c:386
#2  0x000055cbc45c7abf in handle_fatal_signal (sig=11) at /test/10.4_dbg/sql/signal_handler.cc:343
#3  <signal handler called>
#4  my_scan_weight_utf8_general_ci (end=0x8f8f8f8f142352ab <error: Cannot access memory at address 0x8f8f8f8f142352ab>, str=0x15 <error: Cannot access memory at address 0x15>, weight=<synthetic pointer>) at /test/10.4_dbg/strings/strcoll.ic:98
#5  my_strnncollsp_utf8_general_ci (cs=<optimized out>, a=0x150a5c011f98 "non_existing", a_length=<optimized out>, b=0x15 <error: Cannot access memory at address 0x15>, b_length=<optimized out>) at /test/10.4_dbg/strings/strcoll.ic:255
#6  0x000055cbc4418fd9 in sortcmp_lex_string (s=s@entry=0x150a5c011fc0, t=t@entry=0x150a5c00bdb0, cs=<optimized out>) at /test/10.4_dbg/sql/events.cc:106
#7  0x000055cbc4418b69 in event_basic_identifier_equal (db=db@entry=0x150a5c011fb0, name=name@entry=0x150a5c011fc0, b=b@entry=0x150a5c00bd50) at /test/10.4_dbg/sql/event_data_objects.cc:1590
#8  0x000055cbc47de464 in Event_queue::find_n_remove_event (this=this@entry=0x55cbc7973910, db=db@entry=0x150a5c011fb0, name=name@entry=0x150a5c011fc0) at /test/10.4_dbg/sql/event_queue.cc:423
#9  0x000055cbc47def73 in Event_queue::drop_event (this=0x55cbc7973910, thd=thd@entry=0x150a5c000d90, dbname=dbname@entry=0x150a5c011fb0, name=name@entry=0x150a5c011fc0) at /test/10.4_dbg/sql/event_queue.cc:300
#10 0x000055cbc441a683 in Events::drop_event (thd=thd@entry=0x150a5c000d90, dbname=0x150a5c011fb0, name=0x150a5c011fc0, if_exists=<optimized out>) at /test/10.4_dbg/sql/events.cc:619
#11 0x000055cbc42f8b6f in mysql_execute_command (thd=thd@entry=0x150a5c000d90) at /test/10.4_dbg/sql/structs.h:558
#12 0x000055cbc42fe0d4 in mysql_parse (thd=thd@entry=0x150a5c000d90, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x150ab0136490, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7958
#13 0x000055cbc4300972 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x150a5c000d90, packet=packet@entry=0x150a5c01a271 "DROP EVENT IF EXISTS non_existing", packet_length=packet_length@entry=33, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_class.h:1170
#14 0x000055cbc430412b in do_command (thd=0x150a5c000d90) at /test/10.4_dbg/sql/sql_parse.cc:1373
#15 0x000055cbc443de4f in do_handle_one_connection (connect=connect@entry=0x55cbc799bac0) at /test/10.4_dbg/sql/sql_connect.cc:1412
#16 0x000055cbc443df6e in handle_one_connection (arg=0x55cbc799bac0) at /test/10.4_dbg/sql/sql_connect.cc:1316
#17 0x0000150ac679e609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#18 0x0000150ac62de293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

10.2.37 (Debug)

Core was generated by `/test/MD010121-mariadb-10.2.37-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
    at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
[Current thread is 1 (Thread 0x14ea68539700 (LWP 3107261))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
#1  0x000056261377fc2a in my_write_core (sig=sig@entry=11) at /test/10.2_dbg/mysys/stacktrace.c:382
#2  0x000056261307282b in handle_fatal_signal (sig=11) at /test/10.2_dbg/sql/signal_handler.cc:343
#3  <signal handler called>
#4  0x000014ea540008d0 in ?? ()
#5  0x0000562613229421 in Event_queue::get_top_for_execution_if_time (this=0x5626170bc720, thd=thd@entry=0x14ea54033990, event_name=event_name@entry=0x14ea68538dc8) at /test/10.2_dbg/sql/event_queue.cc:664
#6  0x0000562613227259 in Event_scheduler::run (this=this@entry=0x5626170af7c0, thd=0x14ea54033990) at /test/10.2_dbg/sql/event_scheduler.cc:480
#7  0x00005626132274c2 in event_scheduler_thread (arg=0x14ea54012850) at /test/10.2_dbg/sql/event_scheduler.cc:235
#8  0x000014eabf643609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9  0x000014eabf23a293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

I have also seen the issue crash in this query: "CREATE EVENT root8 ..." with this stack:

10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug)

Core was generated by `/test/MD010121-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGABRT, Aborted.
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
    at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
[Current thread is 1 (Thread 0x1503d411a700 (LWP 975789))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
#1  0x000055efa02ce0d7 in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
#2  0x000055ef9fa62ab1 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:330
#3  <signal handler called>
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#5  0x00001503d5eda859 in __GI_abort () at abort.c:79
#6  0x00001503d5eda729 in __assert_fail_base (fmt=0x1503d6070588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55efa042edf0 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=0x55efa042ecd0 "/test/10.6_dbg/sql/sql_error.cc", line=334, function=<optimized out>) at assert.c:92
#7  0x00001503d5eebf36 in __GI___assert_fail (assertion=assertion@entry=0x55efa042edf0 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=file@entry=0x55efa042ecd0 "/test/10.6_dbg/sql/sql_error.cc", line=line@entry=334, function=function@entry=0x55efa042ee28 "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at assert.c:101
#8  0x000055ef9f742c0b in Diagnostics_area::set_ok_status (this=0x150390006a68, affected_rows=affected_rows@entry=0, last_insert_id=last_insert_id@entry=0, message=message@entry=0x0) at /test/10.6_dbg/sql/sql_error.h:1017
#9  0x000055ef9f7a15b5 in my_ok (message=0x0, id=0, affected_rows_arg=0, thd=0x150390000db8) at /test/10.6_dbg/sql/sql_class.h:5294
#10 mysql_execute_command (thd=thd@entry=0x150390000db8) at /test/10.6_dbg/sql/sql_parse.cc:5141
#11 0x000055ef9f78a072 in mysql_parse (thd=thd@entry=0x150390000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1503d41193d0) at /test/10.6_dbg/sql/sql_parse.cc:7881
#12 0x000055ef9f7981ec in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x150390000db8, packet=packet@entry=0x150390008d39 "CREATE EVENT root8 ON SCHEDULE EVERY '2:5' YEAR_MONTH DO SELECT 1", packet_length=packet_length@entry=65) at /test/10.6_dbg/sql/sql_class.h:1293
#13 0x000055ef9f79b52d in do_command (thd=0x150390000db8) at /test/10.6_dbg/sql/sql_parse.cc:1348
#14 0x000055ef9f8f77fc in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55efa3acb9c8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
#15 0x000055ef9f8f7f03 in handle_one_connection (arg=arg@entry=0x55efa3acb9c8) at /test/10.6_dbg/sql/sql_connect.cc:1312
#16 0x000055ef9fdad88f in pfs_spawn_thread (arg=0x55efa39f38b8) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
#17 0x00001503d63e8609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#18 0x00001503d5fd7293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

The SIGABRT issue only may be an unrelated issue. I think I have seen it from time to time on very varied replays. If you can see the cause for it, please do fix it or let me know how to prevent it, as this particular one seems very sporadic, and does seem to have any specific testcase that triggers it, it just rather happens randomly. I can log a separate bug for this if needed. See also MDEV-24672 (same assert).

Bug confirmed present (in one way or another, i.e. different outcomes at different times) in:
MariaDB: 10.2.37 (dbg), 10.3.28 (dbg), 10.4.18 (dbg), 10.4.18 (opt), 10.5.9 (dbg), 10.5.9 (opt), 10.6.0 (dbg), 10.6.0 (opt)

Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.2.37 (opt), 10.3.28 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.50 (dbg), 5.6.50 (opt), 5.7.32 (dbg), 5.7.32 (opt), 8.0.22 (dbg), 8.0.22 (opt)

For some unknown reason 10.3.28 (opt) is not affected it seems, however 10.3.28 (dbg) is. 10.3 (opt)

Unique ID's seen so far:

SIGABRT|Diagnostics_area::set_ok_status|my_ok|mysql_rm_table|mysql_execute_command
SIGSEGV|Event_db_repository::load_named_event|Events::create_event|mysql_execute_command|mysql_parse
SIGSEGV|Event_queue::drop_matching_events|Event_queue::drop_schema_events|Events::drop_schema_events|mysql_rm_db_internal
SIGSEGV|Event_queue::empty_queue|Event_queue::deinit_queue|Event_queue::~Event_queue|Events::deinit
SIGSEGV|Event_queue::find_n_remove_event|Event_queue::update_event|Events::update_event|mysql_execute_command
SIGSEGV|Event_queue::get_top_for_execution_if_time|Event_scheduler::run|event_scheduler_thread|pfs_spawn_thread
SIGSEGV|Event_queue::get_top_for_execution_if_time|Event_scheduler::run|event_scheduler_thread|start_thread
SIGSEGV|main_arena () from|Event_queue::empty_queue|Event_queue::deinit_queue|Event_queue::~Event_queue
SIGSEGV|my_scan_weight_utf8_general_ci|my_scan_weight_utf8_general_ci|my_strnncollsp_utf8_general_ci|event_basic_db_equal
SIGSEGV|my_scan_weight_utf8_general_ci|my_scan_weight_utf8_general_ci|my_strnncollsp_utf8_general_ci|event_basic_identifier_equal
SIGSEGV|my_scan_weight_utf8_general_ci|my_strnncollsp_utf8_general_ci|sortcmp_lex_string|event_basic_identifier_equal
SIGSEGV|my_scan_weight_utf8mb3_general_ci|my_scan_weight_utf8mb3_general_ci|my_strnncollsp_utf8mb3_general_ci|event_basic_identifier_equal
SIGSEGV|my_scan_weight_utf8mb3_general_ci|my_strnncollsp_utf8mb3_general_ci|charset_info_st::strnncollsp|sortcmp_lex_string
SIGSEGV|my_scan_weight_utf8mb3_general_ci|my_scan_weight_utf8mb3_general_ci|my_strnncollsp_utf8mb3_general_ci|event_basic_db_equal
SIGSEGV|my_strndup|Event_queue_element_for_exec::init|Event_queue::get_top_for_execution_if_time|Event_scheduler::run
ASAN|heap-use-after-free|sql/event_queue.cc|event_queue_element_compare_q|insert_at|queue_insert|queue_insert_safe
ASAN|heap-use-after-free|sql/event_queue.cc|event_queue_element_compare_q|insert_at|queue_insert_safe|Event_queue::update_event



 Comments   
Comment by Roel Van de Paar [ 2021-01-26 ]

ASAN reporting issues before the crash:

10.6.0 c2ea036b7f4fc4200f168bf53ad3afd208370459 (Debug)

2021-01-26 20:17:03 0 [Note] /test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld: ready for connections.
Version: '10.6.0-MariaDB-debug'  socket: '/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-dbg/socket.sock'  port: 11155  MariaDB Server
2021-01-26 20:22:24 5 [Note] Event Scheduler: scheduler thread started with id 5
=================================================================
==3119492==ERROR: AddressSanitizer: heap-use-after-free on address 0x611000050f40 at pc 0x5574446306ad bp 0x1460109c1190 sp 0x1460109c1180
READ of size 8 at 0x611000050f40 thread T15
    #0 0x5574446306ac in event_queue_element_compare_q /test/10.6_dbg_san/sql/event_queue.cc:75
    #1 0x5574464b52f0 in insert_at /test/10.6_dbg_san/mysys/queues.c:191
    #2 0x5574464b6333 in queue_insert /test/10.6_dbg_san/mysys/queues.c:219
    #3 0x5574464b650a in queue_insert_safe /test/10.6_dbg_san/mysys/queues.c:248
    #4 0x557444634609 in Event_queue::update_event(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Event_queue_element*) /test/10.6_dbg_san/sql/event_queue.cc:271
    #5 0x55744264b857 in Events::update_event(THD*, Event_parse_data*, st_mysql_const_lex_string*, st_mysql_const_lex_string*) /test/10.6_dbg_san/sql/events.cc:550
    #6 0x557441da5499 in mysql_execute_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:5132
    #7 0x557441cf150e in mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.6_dbg_san/sql/sql_parse.cc:7883
    #8 0x557441d5ffec in dispatch_command(enum_server_command, THD*, char*, unsigned int) /test/10.6_dbg_san/sql/sql_parse.cc:1816
    #9 0x557441d753b4 in do_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:1348
    #10 0x557442754f1a in do_handle_one_connection(CONNECT*, bool) /test/10.6_dbg_san/sql/sql_connect.cc:1410
    #11 0x55744275819d in handle_one_connection /test/10.6_dbg_san/sql/sql_connect.cc:1312
    #12 0x557444c5442d in pfs_spawn_thread /test/10.6_dbg_san/storage/perfschema/pfs.cc:2201
    #13 0x146033b56608 in start_thread /build/glibc-ZN95T4/glibc-2.31/nptl/pthread_create.c:477
    #14 0x146032caa292 in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x122292)
 
0x611000050f40 is located 0 bytes inside of 208-byte region [0x611000050f40,0x611000051010)
freed by thread T15 here:
    #0 0x5574414ce31f in operator delete(void*) (/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-dbg/bin/mariadbd+0x809031f)
    #1 0x55744262ba5e in Event_queue_element::~Event_queue_element() /test/10.6_dbg_san/sql/event_data_objects.cc:331
    #2 0x557444631a11 in Event_queue::find_n_remove_event(st_mysql_const_lex_string const*, st_mysql_const_lex_string const*) /test/10.6_dbg_san/sql/event_queue.cc:430
    #3 0x55744463459e in Event_queue::update_event(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Event_queue_element*) /test/10.6_dbg_san/sql/event_queue.cc:265
    #4 0x55744264b857 in Events::update_event(THD*, Event_parse_data*, st_mysql_const_lex_string*, st_mysql_const_lex_string*) /test/10.6_dbg_san/sql/events.cc:550
    #5 0x557441da5499 in mysql_execute_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:5132
    #6 0x557441cf150e in mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.6_dbg_san/sql/sql_parse.cc:7883
    #7 0x557441d5ffec in dispatch_command(enum_server_command, THD*, char*, unsigned int) /test/10.6_dbg_san/sql/sql_parse.cc:1816
    #8 0x557441d753b4 in do_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:1348
    #9 0x557442754f1a in do_handle_one_connection(CONNECT*, bool) /test/10.6_dbg_san/sql/sql_connect.cc:1410
    #10 0x55744275819d in handle_one_connection /test/10.6_dbg_san/sql/sql_connect.cc:1312
    #11 0x557444c5442d in pfs_spawn_thread /test/10.6_dbg_san/storage/perfschema/pfs.cc:2201
    #12 0x146033b56608 in start_thread /build/glibc-ZN95T4/glibc-2.31/nptl/pthread_create.c:477
 
previously allocated by thread T15 here:
    #0 0x5574414cd387 in operator new(unsigned long) (/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-dbg/bin/mariadbd+0x808f387)
    #1 0x557442649883 in Events::create_event(THD*, Event_parse_data*) /test/10.6_dbg_san/sql/events.cc:372
    #2 0x557441da5566 in mysql_execute_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:5128
    #3 0x557441cf150e in mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.6_dbg_san/sql/sql_parse.cc:7883
    #4 0x557441d5ffec in dispatch_command(enum_server_command, THD*, char*, unsigned int) /test/10.6_dbg_san/sql/sql_parse.cc:1816
    #5 0x557441d753b4 in do_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:1348
    #6 0x557442754f1a in do_handle_one_connection(CONNECT*, bool) /test/10.6_dbg_san/sql/sql_connect.cc:1410
    #7 0x55744275819d in handle_one_connection /test/10.6_dbg_san/sql/sql_connect.cc:1312
    #8 0x557444c5442d in pfs_spawn_thread /test/10.6_dbg_san/storage/perfschema/pfs.cc:2201
    #9 0x146033b56608 in start_thread /build/glibc-ZN95T4/glibc-2.31/nptl/pthread_create.c:477
 
Thread T15 created by T0 here:
    #0 0x5574413f8275 in __interceptor_pthread_create (/test/UBASAN_MD301120-mariadb-10.6.0-linux-x86_64-dbg/bin/mariadbd+0x7fba275)
    #1 0x557444c64f45 in my_thread_create /test/10.6_dbg_san/storage/perfschema/my_thread.h:38
    #2 0x557444c64f45 in pfs_spawn_thread_v1 /test/10.6_dbg_san/storage/perfschema/pfs.cc:2252
    #3 0x55744152630d in inline_mysql_thread_create /test/10.6_dbg_san/include/mysql/psi/mysql_thread.h:1323
    #4 0x55744152630d in create_thread_to_handle_connection(CONNECT*) /test/10.6_dbg_san/sql/mysqld.cc:5804
    #5 0x557441539d9b in create_new_thread(CONNECT*) /test/10.6_dbg_san/sql/mysqld.cc:5863
    #6 0x55744153a3d0 in handle_accepted_socket(st_mysql_socket, st_mysql_socket) /test/10.6_dbg_san/sql/mysqld.cc:5928
    #7 0x55744153be54 in handle_connections_sockets() /test/10.6_dbg_san/sql/mysqld.cc:6055
    #8 0x55744153f966 in mysqld_main(int, char**) /test/10.6_dbg_san/sql/mysqld.cc:5699
    #9 0x55744150cbba in main /test/10.6_dbg_san/sql/main.cc:25
    #10 0x146032baf0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
 
SUMMARY: AddressSanitizer: heap-use-after-free /test/10.6_dbg_san/sql/event_queue.cc:75 in event_queue_element_compare_q
Shadow bytes around the buggy address:
  0x0c2280002190: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
  0x0c22800021a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c22800021b0: 04 fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c22800021c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c22800021d0: 00 00 00 00 00 00 00 00 04 fa fa fa fa fa fa fa
=>0x0c22800021e0: fa fa fa fa fa fa fa fa[fd]fd fd fd fd fd fd fd
  0x0c22800021f0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2280002200: fd fd fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c2280002210: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2280002220: fd fd fd fd fd fd fd fd fd fd fa fa fa fa fa fa
  0x0c2280002230: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
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
==3119492==ABORTING
210126 20:22:25 [ERROR] mysqld got signal 6 ;
...
Query (0x62b0000a12a8): ALTER EVENT e ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'

Comment by Roel Van de Paar [ 2021-01-26 ]

Running under TSAN at first run did not crash, then (immediate re-execution) crashes on 'SET timestamp=100000000;'. These races look related:

10.6.0 c2ea036b7f4fc4200f168bf53ad3afd208370459 (Debug)

2021-01-26 20:25:19 5 [Note] Event Scheduler: scheduler thread started with id 5
==================
WARNING: ThreadSanitizer: data race (pid=3404275)
  Write of size 8 at 0x7b4800009a40 by thread T13:
    #0 Event_queue::lock_data(char const*, unsigned int) /test/10.6_dbg_san/sql/event_queue.cc:717 (mariadbd+0x1108d2d)
    #1 Event_queue::update_event(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Event_queue_element*) /test/10.6_dbg_san/sql/event_queue.cc:264 (mariadbd+0x110967d)
    #2 Events::update_event(THD*, Event_parse_data*, st_mysql_const_lex_string*, st_mysql_const_lex_string*) /test/10.6_dbg_san/sql/events.cc:550 (mariadbd+0xa46dd6)
    #3 mysql_execute_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:5132 (mariadbd+0x82e939)
    #4 mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.6_dbg_san/sql/sql_parse.cc:7883 (mariadbd+0x805a13)
    #5 dispatch_command(enum_server_command, THD*, char*, unsigned int) /test/10.6_dbg_san/sql/sql_parse.cc:1816 (mariadbd+0x81fd4a)
    #6 do_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:1348 (mariadbd+0x825044)
    #7 do_handle_one_connection(CONNECT*, bool) /test/10.6_dbg_san/sql/sql_connect.cc:1410 (mariadbd+0xa8c31d)
    #8 handle_one_connection /test/10.6_dbg_san/sql/sql_connect.cc:1312 (mariadbd+0xa8ce1b)
    #9 pfs_spawn_thread /test/10.6_dbg_san/storage/perfschema/pfs.cc:2201 (mariadbd+0x12f25c7)
    #10 <null> <null> (libtsan.so.0+0x2d1af)
 
  Previous write of size 8 at 0x7b4800009a40 by thread T14 (mutexes: write M36149):
    #0 Event_queue::lock_data(char const*, unsigned int) /test/10.6_dbg_san/sql/event_queue.cc:721 (mariadbd+0x1108df0)
    #1 Event_queue::get_top_for_execution_if_time(THD*, Event_queue_element_for_exec**) /test/10.6_dbg_san/sql/event_queue.cc:596 (mariadbd+0x110a057)
    #2 Event_scheduler::run(THD*) /test/10.6_dbg_san/sql/event_scheduler.cc:492 (mariadbd+0x1106fe3)
    #3 event_scheduler_thread /test/10.6_dbg_san/sql/event_scheduler.cc:236 (mariadbd+0x11073d6)
    #4 pfs_spawn_thread /test/10.6_dbg_san/storage/perfschema/pfs.cc:2201 (mariadbd+0x12f25c7)
    #5 <null> <null> (libtsan.so.0+0x2d1af)
 
  Location is heap block of size 336 at 0x7b4800009900 allocated by main thread:
    #0 operator new(unsigned long) <null> (libtsan.so.0+0x8c012)
    #1 Events::init(THD*, bool) /test/10.6_dbg_san/sql/events.cc:949 (mariadbd+0xa48aeb)
    #2 mysqld_main(int, char**) /test/10.6_dbg_san/sql/mysqld.cc:5593 (mariadbd+0x645966)
    #3 main /test/10.6_dbg_san/sql/main.cc:25 (mariadbd+0x62fddb)
 
  Mutex M36149 (0x7b4800009928) created at:
    #0 pthread_mutex_init <null> (libtsan.so.0+0x4a636)
    #1 safe_mutex_init /test/10.6_dbg_san/mysys/thr_mutex.c:189 (mariadbd+0x1ab4b07)
    #2 inline_mysql_mutex_init /test/10.6_dbg_san/include/mysql/psi/mysql_thread.h:703 (mariadbd+0x11083b8)
    #3 Event_queue::Event_queue() /test/10.6_dbg_san/sql/event_queue.cc:106 (mariadbd+0x11083b8)
    #4 Events::init(THD*, bool) /test/10.6_dbg_san/sql/events.cc:949 (mariadbd+0xa48bb9)
    #5 mysqld_main(int, char**) /test/10.6_dbg_san/sql/mysqld.cc:5593 (mariadbd+0x645966)
    #6 main /test/10.6_dbg_san/sql/main.cc:25 (mariadbd+0x62fddb)
 
  Thread T13 (tid=3406149, running) created by main thread at:
    #0 pthread_create <null> (libtsan.so.0+0x5ea99)
    #1 my_thread_create /test/10.6_dbg_san/storage/perfschema/my_thread.h:38 (mariadbd+0x12f3e1f)
    #2 pfs_spawn_thread_v1 /test/10.6_dbg_san/storage/perfschema/pfs.cc:2252 (mariadbd+0x12f3e1f)
    #3 inline_mysql_thread_create /test/10.6_dbg_san/include/mysql/psi/mysql_thread.h:1323 (mariadbd+0x63919f)
    #4 create_thread_to_handle_connection(CONNECT*) /test/10.6_dbg_san/sql/mysqld.cc:5804 (mariadbd+0x63919f)
    #5 create_new_thread(CONNECT*) /test/10.6_dbg_san/sql/mysqld.cc:5863 (mariadbd+0x643190)
    #6 handle_accepted_socket(st_mysql_socket, st_mysql_socket) /test/10.6_dbg_san/sql/mysqld.cc:5928 (mariadbd+0x64336b)
    #7 handle_connections_sockets() /test/10.6_dbg_san/sql/mysqld.cc:6055 (mariadbd+0x643b86)
    #8 mysqld_main(int, char**) /test/10.6_dbg_san/sql/mysqld.cc:5699 (mariadbd+0x6462a8)
    #9 main /test/10.6_dbg_san/sql/main.cc:25 (mariadbd+0x62fddb)
 
  Thread T14 (tid=3407657, running) created by thread T13 at:
    #0 pthread_create <null> (libtsan.so.0+0x5ea99)
    #1 my_thread_create /test/10.6_dbg_san/storage/perfschema/my_thread.h:38 (mariadbd+0x12f3e1f)
    #2 pfs_spawn_thread_v1 /test/10.6_dbg_san/storage/perfschema/pfs.cc:2252 (mariadbd+0x12f3e1f)
    #3 inline_mysql_thread_create /test/10.6_dbg_san/include/mysql/psi/mysql_thread.h:1323 (mariadbd+0x1106dea)
    #4 Event_scheduler::start(int*) /test/10.6_dbg_san/sql/event_scheduler.cc:437 (mariadbd+0x1106dea)
    #5 Events::start(int*) /test/10.6_dbg_san/sql/events.cc:1128 (mariadbd+0xa47e7b)
    #6 event_scheduler_update /test/10.6_dbg_san/sql/sys_vars.cc:1138 (mariadbd+0xab7b94)
    #7 sys_var::update(THD*, set_var*) /test/10.6_dbg_san/sql/set_var.cc:208 (mariadbd+0x666061)
    #8 set_var::update(THD*) /test/10.6_dbg_san/sql/set_var.cc:859 (mariadbd+0x6669c7)
    #9 sql_set_variables(THD*, List<set_var_base>*, bool) /test/10.6_dbg_san/sql/set_var.cc:746 (mariadbd+0x668a5a)
    #10 mysql_execute_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:4910 (mariadbd+0x82dd2f)
    #11 mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.6_dbg_san/sql/sql_parse.cc:7883 (mariadbd+0x805a13)
    #12 dispatch_command(enum_server_command, THD*, char*, unsigned int) /test/10.6_dbg_san/sql/sql_parse.cc:1816 (mariadbd+0x81fd4a)
    #13 do_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:1348 (mariadbd+0x825044)
    #14 do_handle_one_connection(CONNECT*, bool) /test/10.6_dbg_san/sql/sql_connect.cc:1410 (mariadbd+0xa8c31d)
    #15 handle_one_connection /test/10.6_dbg_san/sql/sql_connect.cc:1312 (mariadbd+0xa8ce1b)
    #16 pfs_spawn_thread /test/10.6_dbg_san/storage/perfschema/pfs.cc:2201 (mariadbd+0x12f25c7)
    #17 <null> <null> (libtsan.so.0+0x2d1af)
 
SUMMARY: ThreadSanitizer: data race /test/10.6_dbg_san/sql/event_queue.cc:717 in Event_queue::lock_data(char const*, unsigned int)
==================
==================
WARNING: ThreadSanitizer: data race (pid=3404275)
  Write of size 4 at 0x7b4800009a28 by thread T13:
    #0 Event_queue::lock_data(char const*, unsigned int) /test/10.6_dbg_san/sql/event_queue.cc:718 (mariadbd+0x1108d43)
    #1 Event_queue::update_event(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Event_queue_element*) /test/10.6_dbg_san/sql/event_queue.cc:264 (mariadbd+0x110967d)
    #2 Events::update_event(THD*, Event_parse_data*, st_mysql_const_lex_string*, st_mysql_const_lex_string*) /test/10.6_dbg_san/sql/events.cc:550 (mariadbd+0xa46dd6)
    #3 mysql_execute_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:5132 (mariadbd+0x82e939)
    #4 mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.6_dbg_san/sql/sql_parse.cc:7883 (mariadbd+0x805a13)
    #5 dispatch_command(enum_server_command, THD*, char*, unsigned int) /test/10.6_dbg_san/sql/sql_parse.cc:1816 (mariadbd+0x81fd4a)
    #6 do_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:1348 (mariadbd+0x825044)
    #7 do_handle_one_connection(CONNECT*, bool) /test/10.6_dbg_san/sql/sql_connect.cc:1410 (mariadbd+0xa8c31d)
    #8 handle_one_connection /test/10.6_dbg_san/sql/sql_connect.cc:1312 (mariadbd+0xa8ce1b)
    #9 pfs_spawn_thread /test/10.6_dbg_san/storage/perfschema/pfs.cc:2201 (mariadbd+0x12f25c7)
    #10 <null> <null> (libtsan.so.0+0x2d1af)
 
  Previous write of size 4 at 0x7b4800009a28 by thread T14 (mutexes: write M36149):
    #0 Event_queue::lock_data(char const*, unsigned int) /test/10.6_dbg_san/sql/event_queue.cc:722 (mariadbd+0x1108e06)
    #1 Event_queue::get_top_for_execution_if_time(THD*, Event_queue_element_for_exec**) /test/10.6_dbg_san/sql/event_queue.cc:596 (mariadbd+0x110a057)
    #2 Event_scheduler::run(THD*) /test/10.6_dbg_san/sql/event_scheduler.cc:492 (mariadbd+0x1106fe3)
    #3 event_scheduler_thread /test/10.6_dbg_san/sql/event_scheduler.cc:236 (mariadbd+0x11073d6)
    #4 pfs_spawn_thread /test/10.6_dbg_san/storage/perfschema/pfs.cc:2201 (mariadbd+0x12f25c7)
    #5 <null> <null> (libtsan.so.0+0x2d1af)
 
  Location is heap block of size 336 at 0x7b4800009900 allocated by main thread:
    #0 operator new(unsigned long) <null> (libtsan.so.0+0x8c012)
    #1 Events::init(THD*, bool) /test/10.6_dbg_san/sql/events.cc:949 (mariadbd+0xa48aeb)
    #2 mysqld_main(int, char**) /test/10.6_dbg_san/sql/mysqld.cc:5593 (mariadbd+0x645966)
    #3 main /test/10.6_dbg_san/sql/main.cc:25 (mariadbd+0x62fddb)
 
  Mutex M36149 (0x7b4800009928) created at:
    #0 pthread_mutex_init <null> (libtsan.so.0+0x4a636)
    #1 safe_mutex_init /test/10.6_dbg_san/mysys/thr_mutex.c:189 (mariadbd+0x1ab4b07)
    #2 inline_mysql_mutex_init /test/10.6_dbg_san/include/mysql/psi/mysql_thread.h:703 (mariadbd+0x11083b8)
    #3 Event_queue::Event_queue() /test/10.6_dbg_san/sql/event_queue.cc:106 (mariadbd+0x11083b8)
    #4 Events::init(THD*, bool) /test/10.6_dbg_san/sql/events.cc:949 (mariadbd+0xa48bb9)
    #5 mysqld_main(int, char**) /test/10.6_dbg_san/sql/mysqld.cc:5593 (mariadbd+0x645966)
    #6 main /test/10.6_dbg_san/sql/main.cc:25 (mariadbd+0x62fddb)
 
  Thread T13 (tid=3406149, running) created by main thread at:
    #0 pthread_create <null> (libtsan.so.0+0x5ea99)
    #1 my_thread_create /test/10.6_dbg_san/storage/perfschema/my_thread.h:38 (mariadbd+0x12f3e1f)
    #2 pfs_spawn_thread_v1 /test/10.6_dbg_san/storage/perfschema/pfs.cc:2252 (mariadbd+0x12f3e1f)
    #3 inline_mysql_thread_create /test/10.6_dbg_san/include/mysql/psi/mysql_thread.h:1323 (mariadbd+0x63919f)
    #4 create_thread_to_handle_connection(CONNECT*) /test/10.6_dbg_san/sql/mysqld.cc:5804 (mariadbd+0x63919f)
    #5 create_new_thread(CONNECT*) /test/10.6_dbg_san/sql/mysqld.cc:5863 (mariadbd+0x643190)
    #6 handle_accepted_socket(st_mysql_socket, st_mysql_socket) /test/10.6_dbg_san/sql/mysqld.cc:5928 (mariadbd+0x64336b)
    #7 handle_connections_sockets() /test/10.6_dbg_san/sql/mysqld.cc:6055 (mariadbd+0x643b86)
    #8 mysqld_main(int, char**) /test/10.6_dbg_san/sql/mysqld.cc:5699 (mariadbd+0x6462a8)
    #9 main /test/10.6_dbg_san/sql/main.cc:25 (mariadbd+0x62fddb)
 
  Thread T14 (tid=3407657, running) created by thread T13 at:
    #0 pthread_create <null> (libtsan.so.0+0x5ea99)
    #1 my_thread_create /test/10.6_dbg_san/storage/perfschema/my_thread.h:38 (mariadbd+0x12f3e1f)
    #2 pfs_spawn_thread_v1 /test/10.6_dbg_san/storage/perfschema/pfs.cc:2252 (mariadbd+0x12f3e1f)
    #3 inline_mysql_thread_create /test/10.6_dbg_san/include/mysql/psi/mysql_thread.h:1323 (mariadbd+0x1106dea)
    #4 Event_scheduler::start(int*) /test/10.6_dbg_san/sql/event_scheduler.cc:437 (mariadbd+0x1106dea)
    #5 Events::start(int*) /test/10.6_dbg_san/sql/events.cc:1128 (mariadbd+0xa47e7b)
    #6 event_scheduler_update /test/10.6_dbg_san/sql/sys_vars.cc:1138 (mariadbd+0xab7b94)
    #7 sys_var::update(THD*, set_var*) /test/10.6_dbg_san/sql/set_var.cc:208 (mariadbd+0x666061)
    #8 set_var::update(THD*) /test/10.6_dbg_san/sql/set_var.cc:859 (mariadbd+0x6669c7)
    #9 sql_set_variables(THD*, List<set_var_base>*, bool) /test/10.6_dbg_san/sql/set_var.cc:746 (mariadbd+0x668a5a)
    #10 mysql_execute_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:4910 (mariadbd+0x82dd2f)
    #11 mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.6_dbg_san/sql/sql_parse.cc:7883 (mariadbd+0x805a13)
    #12 dispatch_command(enum_server_command, THD*, char*, unsigned int) /test/10.6_dbg_san/sql/sql_parse.cc:1816 (mariadbd+0x81fd4a)
    #13 do_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:1348 (mariadbd+0x825044)
    #14 do_handle_one_connection(CONNECT*, bool) /test/10.6_dbg_san/sql/sql_connect.cc:1410 (mariadbd+0xa8c31d)
    #15 handle_one_connection /test/10.6_dbg_san/sql/sql_connect.cc:1312 (mariadbd+0xa8ce1b)
    #16 pfs_spawn_thread /test/10.6_dbg_san/storage/perfschema/pfs.cc:2201 (mariadbd+0x12f25c7)
    #17 <null> <null> (libtsan.so.0+0x2d1af)
 
SUMMARY: ThreadSanitizer: data race /test/10.6_dbg_san/sql/event_queue.cc:718 in Event_queue::lock_data(char const*, unsigned int)
==================
==================
WARNING: ThreadSanitizer: data race (pid=3404275)
  Write of size 1 at 0x7b4800009a49 by thread T13:
    #0 Event_queue::lock_data(char const*, unsigned int) /test/10.6_dbg_san/sql/event_queue.cc:719 (mariadbd+0x1108d60)
    #1 Event_queue::update_event(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Event_queue_element*) /test/10.6_dbg_san/sql/event_queue.cc:264 (mariadbd+0x110967d)
    #2 Events::update_event(THD*, Event_parse_data*, st_mysql_const_lex_string*, st_mysql_const_lex_string*) /test/10.6_dbg_san/sql/events.cc:550 (mariadbd+0xa46dd6)
    #3 mysql_execute_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:5132 (mariadbd+0x82e939)
    #4 mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.6_dbg_san/sql/sql_parse.cc:7883 (mariadbd+0x805a13)
    #5 dispatch_command(enum_server_command, THD*, char*, unsigned int) /test/10.6_dbg_san/sql/sql_parse.cc:1816 (mariadbd+0x81fd4a)
    #6 do_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:1348 (mariadbd+0x825044)
    #7 do_handle_one_connection(CONNECT*, bool) /test/10.6_dbg_san/sql/sql_connect.cc:1410 (mariadbd+0xa8c31d)
    #8 handle_one_connection /test/10.6_dbg_san/sql/sql_connect.cc:1312 (mariadbd+0xa8ce1b)
    #9 pfs_spawn_thread /test/10.6_dbg_san/storage/perfschema/pfs.cc:2201 (mariadbd+0x12f25c7)
    #10 <null> <null> (libtsan.so.0+0x2d1af)
 
  Previous write of size 1 at 0x7b4800009a49 by thread T14 (mutexes: write M36149):
    #0 Event_queue::lock_data(char const*, unsigned int) /test/10.6_dbg_san/sql/event_queue.cc:723 (mariadbd+0x1108e1c)
    #1 Event_queue::get_top_for_execution_if_time(THD*, Event_queue_element_for_exec**) /test/10.6_dbg_san/sql/event_queue.cc:596 (mariadbd+0x110a057)
    #2 Event_scheduler::run(THD*) /test/10.6_dbg_san/sql/event_scheduler.cc:492 (mariadbd+0x1106fe3)
    #3 event_scheduler_thread /test/10.6_dbg_san/sql/event_scheduler.cc:236 (mariadbd+0x11073d6)
    #4 pfs_spawn_thread /test/10.6_dbg_san/storage/perfschema/pfs.cc:2201 (mariadbd+0x12f25c7)
    #5 <null> <null> (libtsan.so.0+0x2d1af)
 
  Location is heap block of size 336 at 0x7b4800009900 allocated by main thread:
    #0 operator new(unsigned long) <null> (libtsan.so.0+0x8c012)
    #1 Events::init(THD*, bool) /test/10.6_dbg_san/sql/events.cc:949 (mariadbd+0xa48aeb)
    #2 mysqld_main(int, char**) /test/10.6_dbg_san/sql/mysqld.cc:5593 (mariadbd+0x645966)
    #3 main /test/10.6_dbg_san/sql/main.cc:25 (mariadbd+0x62fddb)
 
  Mutex M36149 (0x7b4800009928) created at:
    #0 pthread_mutex_init <null> (libtsan.so.0+0x4a636)
    #1 safe_mutex_init /test/10.6_dbg_san/mysys/thr_mutex.c:189 (mariadbd+0x1ab4b07)
    #2 inline_mysql_mutex_init /test/10.6_dbg_san/include/mysql/psi/mysql_thread.h:703 (mariadbd+0x11083b8)
    #3 Event_queue::Event_queue() /test/10.6_dbg_san/sql/event_queue.cc:106 (mariadbd+0x11083b8)
    #4 Events::init(THD*, bool) /test/10.6_dbg_san/sql/events.cc:949 (mariadbd+0xa48bb9)
    #5 mysqld_main(int, char**) /test/10.6_dbg_san/sql/mysqld.cc:5593 (mariadbd+0x645966)
    #6 main /test/10.6_dbg_san/sql/main.cc:25 (mariadbd+0x62fddb)
 
  Thread T13 (tid=3406149, running) created by main thread at:
    #0 pthread_create <null> (libtsan.so.0+0x5ea99)
    #1 my_thread_create /test/10.6_dbg_san/storage/perfschema/my_thread.h:38 (mariadbd+0x12f3e1f)
    #2 pfs_spawn_thread_v1 /test/10.6_dbg_san/storage/perfschema/pfs.cc:2252 (mariadbd+0x12f3e1f)
    #3 inline_mysql_thread_create /test/10.6_dbg_san/include/mysql/psi/mysql_thread.h:1323 (mariadbd+0x63919f)
    #4 create_thread_to_handle_connection(CONNECT*) /test/10.6_dbg_san/sql/mysqld.cc:5804 (mariadbd+0x63919f)
    #5 create_new_thread(CONNECT*) /test/10.6_dbg_san/sql/mysqld.cc:5863 (mariadbd+0x643190)
    #6 handle_accepted_socket(st_mysql_socket, st_mysql_socket) /test/10.6_dbg_san/sql/mysqld.cc:5928 (mariadbd+0x64336b)
    #7 handle_connections_sockets() /test/10.6_dbg_san/sql/mysqld.cc:6055 (mariadbd+0x643b86)
    #8 mysqld_main(int, char**) /test/10.6_dbg_san/sql/mysqld.cc:5699 (mariadbd+0x6462a8)
    #9 main /test/10.6_dbg_san/sql/main.cc:25 (mariadbd+0x62fddb)
 
  Thread T14 (tid=3407657, running) created by thread T13 at:
    #0 pthread_create <null> (libtsan.so.0+0x5ea99)
    #1 my_thread_create /test/10.6_dbg_san/storage/perfschema/my_thread.h:38 (mariadbd+0x12f3e1f)
    #2 pfs_spawn_thread_v1 /test/10.6_dbg_san/storage/perfschema/pfs.cc:2252 (mariadbd+0x12f3e1f)
    #3 inline_mysql_thread_create /test/10.6_dbg_san/include/mysql/psi/mysql_thread.h:1323 (mariadbd+0x1106dea)
    #4 Event_scheduler::start(int*) /test/10.6_dbg_san/sql/event_scheduler.cc:437 (mariadbd+0x1106dea)
    #5 Events::start(int*) /test/10.6_dbg_san/sql/events.cc:1128 (mariadbd+0xa47e7b)
    #6 event_scheduler_update /test/10.6_dbg_san/sql/sys_vars.cc:1138 (mariadbd+0xab7b94)
    #7 sys_var::update(THD*, set_var*) /test/10.6_dbg_san/sql/set_var.cc:208 (mariadbd+0x666061)
    #8 set_var::update(THD*) /test/10.6_dbg_san/sql/set_var.cc:859 (mariadbd+0x6669c7)
    #9 sql_set_variables(THD*, List<set_var_base>*, bool) /test/10.6_dbg_san/sql/set_var.cc:746 (mariadbd+0x668a5a)
    #10 mysql_execute_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:4910 (mariadbd+0x82dd2f)
    #11 mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.6_dbg_san/sql/sql_parse.cc:7883 (mariadbd+0x805a13)
    #12 dispatch_command(enum_server_command, THD*, char*, unsigned int) /test/10.6_dbg_san/sql/sql_parse.cc:1816 (mariadbd+0x81fd4a)
    #13 do_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:1348 (mariadbd+0x825044)
    #14 do_handle_one_connection(CONNECT*, bool) /test/10.6_dbg_san/sql/sql_connect.cc:1410 (mariadbd+0xa8c31d)
    #15 handle_one_connection /test/10.6_dbg_san/sql/sql_connect.cc:1312 (mariadbd+0xa8ce1b)
    #16 pfs_spawn_thread /test/10.6_dbg_san/storage/perfschema/pfs.cc:2201 (mariadbd+0x12f25c7)
    #17 <null> <null> (libtsan.so.0+0x2d1af)
 
SUMMARY: ThreadSanitizer: data race /test/10.6_dbg_san/sql/event_queue.cc:719 in Event_queue::lock_data(char const*, unsigned int)
==================
==================
WARNING: ThreadSanitizer: heap-use-after-free (pid=3404275)
  Read of size 8 at 0x7b3400010568 by thread T13 (mutexes: write M36149):
    #0 event_queue_element_compare_q /test/10.6_dbg_san/sql/event_queue.cc:75 (mariadbd+0x1108212)
    #1 insert_at /test/10.6_dbg_san/mysys/queues.c:191 (mariadbd+0x1aab68a)
    #2 queue_insert /test/10.6_dbg_san/mysys/queues.c:219 (mariadbd+0x1aabc5e)
    #3 queue_insert_safe /test/10.6_dbg_san/mysys/queues.c:248 (mariadbd+0x1aabd3a)
    #4 Event_queue::update_event(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Event_queue_element*) /test/10.6_dbg_san/sql/event_queue.cc:271 (mariadbd+0x11096de)
    #5 Events::update_event(THD*, Event_parse_data*, st_mysql_const_lex_string*, st_mysql_const_lex_string*) /test/10.6_dbg_san/sql/events.cc:550 (mariadbd+0xa46dd6)
    #6 mysql_execute_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:5132 (mariadbd+0x82e939)
    #7 mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.6_dbg_san/sql/sql_parse.cc:7883 (mariadbd+0x805a13)
    #8 dispatch_command(enum_server_command, THD*, char*, unsigned int) /test/10.6_dbg_san/sql/sql_parse.cc:1816 (mariadbd+0x81fd4a)
    #9 do_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:1348 (mariadbd+0x825044)
    #10 do_handle_one_connection(CONNECT*, bool) /test/10.6_dbg_san/sql/sql_connect.cc:1410 (mariadbd+0xa8c31d)
    #11 handle_one_connection /test/10.6_dbg_san/sql/sql_connect.cc:1312 (mariadbd+0xa8ce1b)
    #12 pfs_spawn_thread /test/10.6_dbg_san/storage/perfschema/pfs.cc:2201 (mariadbd+0x12f25c7)
    #13 <null> <null> (libtsan.so.0+0x2d1af)
 
  Previous write of size 8 at 0x7b3400010568 by thread T13 (mutexes: write M36149):
    #0 operator delete(void*) <null> (libtsan.so.0+0x8b2a8)
    #1 Event_queue_element::~Event_queue_element() /test/10.6_dbg_san/sql/event_data_objects.cc:331 (mariadbd+0xa3f278)
    #2 Event_queue::find_n_remove_event(st_mysql_const_lex_string const*, st_mysql_const_lex_string const*) /test/10.6_dbg_san/sql/event_queue.cc:430 (mariadbd+0x110881a)
    #3 Event_queue::update_event(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Event_queue_element*) /test/10.6_dbg_san/sql/event_queue.cc:265 (mariadbd+0x11096a1)
    #4 Events::update_event(THD*, Event_parse_data*, st_mysql_const_lex_string*, st_mysql_const_lex_string*) /test/10.6_dbg_san/sql/events.cc:550 (mariadbd+0xa46dd6)
    #5 mysql_execute_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:5132 (mariadbd+0x82e939)
    #6 mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.6_dbg_san/sql/sql_parse.cc:7883 (mariadbd+0x805a13)
    #7 dispatch_command(enum_server_command, THD*, char*, unsigned int) /test/10.6_dbg_san/sql/sql_parse.cc:1816 (mariadbd+0x81fd4a)
    #8 do_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:1348 (mariadbd+0x825044)
    #9 do_handle_one_connection(CONNECT*, bool) /test/10.6_dbg_san/sql/sql_connect.cc:1410 (mariadbd+0xa8c31d)
    #10 handle_one_connection /test/10.6_dbg_san/sql/sql_connect.cc:1312 (mariadbd+0xa8ce1b)
    #11 pfs_spawn_thread /test/10.6_dbg_san/storage/perfschema/pfs.cc:2201 (mariadbd+0x12f25c7)
    #12 <null> <null> (libtsan.so.0+0x2d1af)
 
  Mutex M36149 (0x7b4800009928) created at:
    #0 pthread_mutex_init <null> (libtsan.so.0+0x4a636)
    #1 safe_mutex_init /test/10.6_dbg_san/mysys/thr_mutex.c:189 (mariadbd+0x1ab4b07)
    #2 inline_mysql_mutex_init /test/10.6_dbg_san/include/mysql/psi/mysql_thread.h:703 (mariadbd+0x11083b8)
    #3 Event_queue::Event_queue() /test/10.6_dbg_san/sql/event_queue.cc:106 (mariadbd+0x11083b8)
    #4 Events::init(THD*, bool) /test/10.6_dbg_san/sql/events.cc:949 (mariadbd+0xa48bb9)
    #5 mysqld_main(int, char**) /test/10.6_dbg_san/sql/mysqld.cc:5593 (mariadbd+0x645966)
    #6 main /test/10.6_dbg_san/sql/main.cc:25 (mariadbd+0x62fddb)
 
  Thread T13 (tid=3406149, running) created by main thread at:
    #0 pthread_create <null> (libtsan.so.0+0x5ea99)
    #1 my_thread_create /test/10.6_dbg_san/storage/perfschema/my_thread.h:38 (mariadbd+0x12f3e1f)
    #2 pfs_spawn_thread_v1 /test/10.6_dbg_san/storage/perfschema/pfs.cc:2252 (mariadbd+0x12f3e1f)
    #3 inline_mysql_thread_create /test/10.6_dbg_san/include/mysql/psi/mysql_thread.h:1323 (mariadbd+0x63919f)
    #4 create_thread_to_handle_connection(CONNECT*) /test/10.6_dbg_san/sql/mysqld.cc:5804 (mariadbd+0x63919f)
    #5 create_new_thread(CONNECT*) /test/10.6_dbg_san/sql/mysqld.cc:5863 (mariadbd+0x643190)
    #6 handle_accepted_socket(st_mysql_socket, st_mysql_socket) /test/10.6_dbg_san/sql/mysqld.cc:5928 (mariadbd+0x64336b)
    #7 handle_connections_sockets() /test/10.6_dbg_san/sql/mysqld.cc:6055 (mariadbd+0x643b86)
    #8 mysqld_main(int, char**) /test/10.6_dbg_san/sql/mysqld.cc:5699 (mariadbd+0x6462a8)
    #9 main /test/10.6_dbg_san/sql/main.cc:25 (mariadbd+0x62fddb)
 
SUMMARY: ThreadSanitizer: heap-use-after-free /test/10.6_dbg_san/sql/event_queue.cc:75 in event_queue_element_compare_q
==================
==================
WARNING: ThreadSanitizer: heap-use-after-free (pid=3404275)
  Read of size 4 at 0x7b3400010554 by thread T13 (mutexes: write M36149):
    #0 event_queue_element_compare_q /test/10.6_dbg_san/sql/event_queue.cc:80 (mariadbd+0x1108227)
    #1 insert_at /test/10.6_dbg_san/mysys/queues.c:191 (mariadbd+0x1aab68a)
    #2 queue_insert /test/10.6_dbg_san/mysys/queues.c:219 (mariadbd+0x1aabc5e)
    #3 queue_insert_safe /test/10.6_dbg_san/mysys/queues.c:248 (mariadbd+0x1aabd3a)
    #4 Event_queue::update_event(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Event_queue_element*) /test/10.6_dbg_san/sql/event_queue.cc:271 (mariadbd+0x11096de)
    #5 Events::update_event(THD*, Event_parse_data*, st_mysql_const_lex_string*, st_mysql_const_lex_string*) /test/10.6_dbg_san/sql/events.cc:550 (mariadbd+0xa46dd6)
    #6 mysql_execute_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:5132 (mariadbd+0x82e939)
    #7 mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.6_dbg_san/sql/sql_parse.cc:7883 (mariadbd+0x805a13)
    #8 dispatch_command(enum_server_command, THD*, char*, unsigned int) /test/10.6_dbg_san/sql/sql_parse.cc:1816 (mariadbd+0x81fd4a)
    #9 do_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:1348 (mariadbd+0x825044)
    #10 do_handle_one_connection(CONNECT*, bool) /test/10.6_dbg_san/sql/sql_connect.cc:1410 (mariadbd+0xa8c31d)
    #11 handle_one_connection /test/10.6_dbg_san/sql/sql_connect.cc:1312 (mariadbd+0xa8ce1b)
    #12 pfs_spawn_thread /test/10.6_dbg_san/storage/perfschema/pfs.cc:2201 (mariadbd+0x12f25c7)
    #13 <null> <null> (libtsan.so.0+0x2d1af)
 
  Previous write of size 8 at 0x7b3400010550 by thread T13 (mutexes: write M36149):
    #0 operator delete(void*) <null> (libtsan.so.0+0x8b2a8)
    #1 Event_queue_element::~Event_queue_element() /test/10.6_dbg_san/sql/event_data_objects.cc:331 (mariadbd+0xa3f278)
    #2 Event_queue::find_n_remove_event(st_mysql_const_lex_string const*, st_mysql_const_lex_string const*) /test/10.6_dbg_san/sql/event_queue.cc:430 (mariadbd+0x110881a)
    #3 Event_queue::update_event(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Event_queue_element*) /test/10.6_dbg_san/sql/event_queue.cc:265 (mariadbd+0x11096a1)
    #4 Events::update_event(THD*, Event_parse_data*, st_mysql_const_lex_string*, st_mysql_const_lex_string*) /test/10.6_dbg_san/sql/events.cc:550 (mariadbd+0xa46dd6)
    #5 mysql_execute_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:5132 (mariadbd+0x82e939)
    #6 mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.6_dbg_san/sql/sql_parse.cc:7883 (mariadbd+0x805a13)
    #7 dispatch_command(enum_server_command, THD*, char*, unsigned int) /test/10.6_dbg_san/sql/sql_parse.cc:1816 (mariadbd+0x81fd4a)
    #8 do_command(THD*) /test/10.6_dbg_san/sql/sql_parse.cc:1348 (mariadbd+0x825044)
    #9 do_handle_one_connection(CONNECT*, bool) /test/10.6_dbg_san/sql/sql_connect.cc:1410 (mariadbd+0xa8c31d)
    #10 handle_one_connection /test/10.6_dbg_san/sql/sql_connect.cc:1312 (mariadbd+0xa8ce1b)
    #11 pfs_spawn_thread /test/10.6_dbg_san/storage/perfschema/pfs.cc:2201 (mariadbd+0x12f25c7)
    #12 <null> <null> (libtsan.so.0+0x2d1af)
 
  Mutex M36149 (0x7b4800009928) created at:
    #0 pthread_mutex_init <null> (libtsan.so.0+0x4a636)
    #1 safe_mutex_init /test/10.6_dbg_san/mysys/thr_mutex.c:189 (mariadbd+0x1ab4b07)
    #2 inline_mysql_mutex_init /test/10.6_dbg_san/include/mysql/psi/mysql_thread.h:703 (mariadbd+0x11083b8)
    #3 Event_queue::Event_queue() /test/10.6_dbg_san/sql/event_queue.cc:106 (mariadbd+0x11083b8)
    #4 Events::init(THD*, bool) /test/10.6_dbg_san/sql/events.cc:949 (mariadbd+0xa48bb9)
    #5 mysqld_main(int, char**) /test/10.6_dbg_san/sql/mysqld.cc:5593 (mariadbd+0x645966)
    #6 main /test/10.6_dbg_san/sql/main.cc:25 (mariadbd+0x62fddb)
 
  Thread T13 (tid=3406149, running) created by main thread at:
    #0 pthread_create <null> (libtsan.so.0+0x5ea99)
    #1 my_thread_create /test/10.6_dbg_san/storage/perfschema/my_thread.h:38 (mariadbd+0x12f3e1f)
    #2 pfs_spawn_thread_v1 /test/10.6_dbg_san/storage/perfschema/pfs.cc:2252 (mariadbd+0x12f3e1f)
    #3 inline_mysql_thread_create /test/10.6_dbg_san/include/mysql/psi/mysql_thread.h:1323 (mariadbd+0x63919f)
    #4 create_thread_to_handle_connection(CONNECT*) /test/10.6_dbg_san/sql/mysqld.cc:5804 (mariadbd+0x63919f)
    #5 create_new_thread(CONNECT*) /test/10.6_dbg_san/sql/mysqld.cc:5863 (mariadbd+0x643190)
    #6 handle_accepted_socket(st_mysql_socket, st_mysql_socket) /test/10.6_dbg_san/sql/mysqld.cc:5928 (mariadbd+0x64336b)
    #7 handle_connections_sockets() /test/10.6_dbg_san/sql/mysqld.cc:6055 (mariadbd+0x643b86)
    #8 mysqld_main(int, char**) /test/10.6_dbg_san/sql/mysqld.cc:5699 (mariadbd+0x6462a8)
    #9 main /test/10.6_dbg_san/sql/main.cc:25 (mariadbd+0x62fddb)
 
==================
==3404275==ERROR: ThreadSanitizer: requested allocation size 0x557fb25bb6f4 exceeds maximum supported size of 0x10000000000
    #0 malloc <null> (libtsan.so.0+0x30343)
    #1 sf_malloc /test/10.6_dbg_san/mysys/safemalloc.c:118 (mariadbd+0x1abf018)
    #2 my_malloc /test/10.6_dbg_san/mysys/my_malloc.c:88 (mariadbd+0x1aa4d27)
    #3 my_strndup /test/10.6_dbg_san/mysys/my_malloc.c:242 (mariadbd+0x1aa5607)
    #4 Event_queue_element_for_exec::init(st_mysql_const_lex_string const&, st_mysql_const_lex_string const&) /test/10.6_dbg_san/sql/event_data_objects.cc:190 (mariadbd+0xa3ef05)
    #5 Event_queue::get_top_for_execution_if_time(THD*, Event_queue_element_for_exec**) /test/10.6_dbg_san/sql/event_queue.cc:644 (mariadbd+0x110a445)
    #6 Event_scheduler::run(THD*) /test/10.6_dbg_san/sql/event_scheduler.cc:492 (mariadbd+0x1106fe3)
    #7 event_scheduler_thread /test/10.6_dbg_san/sql/event_scheduler.cc:236 (mariadbd+0x11073d6)
    #8 pfs_spawn_thread /test/10.6_dbg_san/storage/perfschema/pfs.cc:2201 (mariadbd+0x12f25c7)
    #9 <null> <null> (libtsan.so.0+0x2d1af)
 
==3404275==HINT: if you don't care about these errors you may set allocator_may_return_null=1
SUMMARY: ThreadSanitizer: allocation-size-too-big (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x30343) in malloc

Comment by Roel Van de Paar [ 2021-02-23 ]

I found more stacks/bugs in this area using a different testcase and variations thereof. Repeat the following testcase until server crashes, usually 4 to 14 attempts needed. Single thread reproducible.

DROP DATABASE test;
CREATE DATABASE test;
USE test;
CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND DO SELECT 1;
SET TIMESTAMP=1;
CREATE EVENT e2 ON SCHEDULE EVERY 1 SECOND DO SELECT 1;
CREATE EVENT e3 ON SCHEDULE EVERY 1 MINUTE STARTS DATE_ADD("20100101", INTERVAL 5 MINUTE) ENDS DATE_ADD("20151010", INTERVAL 5 day) COMMENT "c" DO INSERT INTO t VALUES(UNIX_TIMESTAMP(), RAND());
SET GLOBAL event_scheduler=TRUE;
ALTER EVENT e1 RENAME TO e4;
CREATE TABLE t2 (c INT);
INSERT INTO t VALUES(0,0,0,0,0,0,0,0,0);

Leads to:

10.6.0 bfb4761ca04704d68dba51f76d7c9967f880a6ee (Debug)

Core was generated by `/test/MD110221-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
    at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
[Current thread is 1 (Thread 0x14c2a80bd700 (LWP 2608677))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
#1  0x000056247a14d55c in my_write_core (sig=sig@entry=11) at /test/10.6_dbg/mysys/stacktrace.c:424
#2  0x00005624798e54de in handle_fatal_signal (sig=11) at /test/10.6_dbg/sql/signal_handler.cc:330
#3  <signal handler called>
#4  my_scan_weight_utf8mb3_general_ci (end=0x14c200000003 <error: Cannot access memory at address 0x14c200000003>, str=0x14c200000000 <error: Cannot access memory at address 0x14c200000000>, weight=<synthetic pointer>) at /test/10.6_dbg/strings/strcoll.ic:99
#5  my_strnncollsp_utf8mb3_general_ci (cs=<optimized out>, a=0x14c2640128b8 "e1", a_length=<optimized out>, b=0x14c200000000 <error: Cannot access memory at address 0x14c200000000>, b_length=<optimized out>) at /test/10.6_dbg/strings/strcoll.ic:256
#6  0x0000562479751715 in charset_info_st::strnncollsp (blen=<optimized out>, b=<optimized out>, alen=<optimized out>, a=<optimized out>, this=<optimized out>) at /test/10.6_dbg/include/m_ctype.h:787
#7  sortcmp_lex_string (s=s@entry=0x14c2640127c8, t=t@entry=0x14c26402b168, cs=<optimized out>) at /test/10.6_dbg/sql/events.cc:107
#8  0x00005624797512a8 in event_basic_identifier_equal (db=db@entry=0x14c2640127b8, name=name@entry=0x14c2640127c8, b=b@entry=0x14c26402b110) at /test/10.6_dbg/sql/event_data_objects.cc:1613
#9  0x0000562479b0da38 in Event_queue::find_n_remove_event (this=this@entry=0x56247c647f10, db=db@entry=0x14c2640127b8, name=name@entry=0x14c2640127c8) at /test/10.6_dbg/sql/event_queue.cc:427
#10 0x0000562479b0e3bd in Event_queue::update_event (this=0x56247c647f10, thd=thd@entry=0x14c264000db8, dbname=dbname@entry=0x14c2640127b8, name=name@entry=0x14c2640127c8, new_element=new_element@entry=0x14c2640cd6c0) at /test/10.6_dbg/sql/event_queue.cc:265
#11 0x0000562479752a6e in Events::update_event (thd=thd@entry=0x14c264000db8, parse_data=0x14c2640127a0, new_dbname=<optimized out>, new_name=<optimized out>) at /test/10.6_dbg/sql/events.cc:550
#12 0x000056247962461c in mysql_execute_command (thd=thd@entry=0x14c264000db8) at /test/10.6_dbg/sql/sql_parse.cc:5146
#13 0x000056247960d21a in mysql_parse (thd=thd@entry=0x14c264000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14c2a80bc3d0) at /test/10.6_dbg/sql/sql_parse.cc:7906
#14 0x000056247961b30b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14c264000db8, packet=packet@entry=0x14c26401aac9 "ALTER EVENT e1 RENAME TO e4", packet_length=packet_length@entry=27) at /test/10.6_dbg/sql/sql_class.h:1295
#15 0x000056247961e63d in do_command (thd=0x14c264000db8) at /test/10.6_dbg/sql/sql_parse.cc:1365
#16 0x000056247977a1ab in do_handle_one_connection (connect=<optimized out>, connect@entry=0x56247c5f6de8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
#17 0x000056247977a8af in handle_one_connection (arg=arg@entry=0x56247c5f6de8) at /test/10.6_dbg/sql/sql_connect.cc:1312
#18 0x0000562479c2e27d in pfs_spawn_thread (arg=0x56247c52b1f8) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
#19 0x000014c2aad88609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#20 0x000014c2aa977293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

And many other crashes. Select (but not all; there are many) stacks which have been obtained with similar testcases:

qa-roel-2:/test/MD110221-mariadb-10.6.0-linux-x86_64-dbg$ ./stack
{noformat:title=10.6.0 bfb4761ca04704d68dba51f76d7c9967f880a6ee (Debug)}
Core was generated by `/test/MD110221-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
    at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
[Current thread is 1 (Thread 0x14722c908700 (LWP 2298524))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
#1  0x000055e7f9d5c55c in my_write_core (sig=sig@entry=11) at /test/10.6_dbg/mysys/stacktrace.c:424
#2  0x000055e7f94f44de in handle_fatal_signal (sig=11) at /test/10.6_dbg/sql/signal_handler.cc:330
#3  <signal handler called>
#4  0x000055e7f971c979 in Event_queue::drop_matching_events (this=this@entry=0x55e7fbf3ee30, thd=thd@entry=0x1471f4000db8, pattern=pattern@entry=0x14722c9064d0, comparator=0x55e7f9360259 <event_basic_db_equal(st_mysql_const_lex_string const*, Event_basic*)>) at /test/10.6_dbg/sql/event_queue.cc:358
#5  0x000055e7f971d5bb in Event_queue::drop_schema_events (this=0x55e7fbf3ee30, thd=thd@entry=0x1471f4000db8, schema=schema@entry=0x14722c9064d0) at /test/10.6_dbg/sql/event_queue.cc:394
#6  0x000055e7f936203d in Events::drop_schema_events (thd=thd@entry=0x1471f4000db8, db=<optimized out>, db@entry=0x1471f4015028 "test") at /test/10.6_dbg/sql/events.cc:664
#7  0x000055e7f91cf528 in mysql_rm_db_internal (thd=0x1471f4000db8, db=0x1471f4005c30, if_exists=<optimized out>, silent=silent@entry=false) at /test/10.6_dbg/sql/sql_db.cc:1089
#8  0x000055e7f91cfbd9 in mysql_rm_db (thd=thd@entry=0x1471f4000db8, db=db@entry=0x1471f4005c30, if_exists=<optimized out>) at /test/10.6_dbg/sql/sql_db.cc:1215
#9  0x000055e7f9233247 in mysql_execute_command (thd=thd@entry=0x1471f4000db8) at /test/10.6_dbg/sql/structs.h:559
#10 0x000055e7f921c21a in mysql_parse (thd=thd@entry=0x1471f4000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14722c9073d0) at /test/10.6_dbg/sql/sql_parse.cc:7906
#11 0x000055e7f922a30b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1471f4000db8, packet=packet@entry=0x1471f4008d39 "DROP DATABASE test", packet_length=packet_length@entry=18) at /test/10.6_dbg/sql/sql_class.h:1295
#12 0x000055e7f922d63d in do_command (thd=0x1471f4000db8) at /test/10.6_dbg/sql/sql_parse.cc:1365
#13 0x000055e7f93891ab in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55e7fbf32838, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
#14 0x000055e7f93898af in handle_one_connection (arg=arg@entry=0x55e7fbf32838) at /test/10.6_dbg/sql/sql_connect.cc:1312
#15 0x000055e7f983d27d in pfs_spawn_thread (arg=0x55e7fbe66068) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
#16 0x0000147242ce4609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#17 0x00001472428d3293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

10.6.0 bfb4761ca04704d68dba51f76d7c9967f880a6ee (Debug)

Core was generated by `/test/MD110221-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
    at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
[Current thread is 1 (Thread 0x154dd8066700 (LWP 2290119))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
#1  0x0000560fa967955c in my_write_core (sig=sig@entry=11) at /test/10.6_dbg/mysys/stacktrace.c:424
#2  0x0000560fa8e114de in handle_fatal_signal (sig=11) at /test/10.6_dbg/sql/signal_handler.cc:330
#3  <signal handler called>
#4  my_scan_weight_utf8mb3_general_ci (end=0x154d00000006 <error: Cannot access memory at address 0x154d00000006>, str=0x154d00000000 <error: Cannot access memory at address 0x154d00000000>, weight=<synthetic pointer>) at /test/10.6_dbg/strings/strcoll.ic:99
#5  my_strnncollsp_utf8mb3_general_ci (cs=<optimized out>, a=0x154d8c015038 "e1", a_length=<optimized out>, b=0x154d00000000 <error: Cannot access memory at address 0x154d00000000>, b_length=<optimized out>) at /test/10.6_dbg/strings/strcoll.ic:256
#6  0x0000560fa8c7d715 in charset_info_st::strnncollsp (blen=<optimized out>, b=<optimized out>, alen=<optimized out>, a=<optimized out>, this=<optimized out>) at /test/10.6_dbg/include/m_ctype.h:787
#7  sortcmp_lex_string (s=s@entry=0x154d8c014f48, t=t@entry=0x154d8c029408, cs=<optimized out>) at /test/10.6_dbg/sql/events.cc:107
#8  0x0000560fa8c7d2a8 in event_basic_identifier_equal (db=db@entry=0x154d8c014f38, name=name@entry=0x154d8c014f48, b=b@entry=0x154d8c0293b0) at /test/10.6_dbg/sql/event_data_objects.cc:1613
#9  0x0000560fa9039a38 in Event_queue::find_n_remove_event (this=this@entry=0x560facf01c40, db=db@entry=0x154d8c014f38, name=name@entry=0x154d8c014f48) at /test/10.6_dbg/sql/event_queue.cc:427
#10 0x0000560fa903a3bd in Event_queue::update_event (this=0x560facf01c40, thd=thd@entry=0x154d8c000db8, dbname=dbname@entry=0x154d8c014f38, name=name@entry=0x154d8c014f48, new_element=new_element@entry=0x154d8c0b9460) at /test/10.6_dbg/sql/event_queue.cc:265
#11 0x0000560fa8c7ea6e in Events::update_event (thd=thd@entry=0x154d8c000db8, parse_data=0x154d8c014f20, new_dbname=<optimized out>, new_name=<optimized out>) at /test/10.6_dbg/sql/events.cc:550
#12 0x0000560fa8b5061c in mysql_execute_command (thd=thd@entry=0x154d8c000db8) at /test/10.6_dbg/sql/sql_parse.cc:5146
#13 0x0000560fa8b3921a in mysql_parse (thd=thd@entry=0x154d8c000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x154dd80653d0) at /test/10.6_dbg/sql/sql_parse.cc:7906
#14 0x0000560fa8b4730b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x154d8c000db8, packet=packet@entry=0x154d8c008d39 "ALTER EVENT e1 RENAME TO e4", packet_length=packet_length@entry=27) at /test/10.6_dbg/sql/sql_class.h:1295
#15 0x0000560fa8b4a63d in do_command (thd=0x154d8c000db8) at /test/10.6_dbg/sql/sql_parse.cc:1365
#16 0x0000560fa8ca61ab in do_handle_one_connection (connect=<optimized out>, connect@entry=0x560face013a8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
#17 0x0000560fa8ca68af in handle_one_connection (arg=arg@entry=0x560face013a8) at /test/10.6_dbg/sql/sql_connect.cc:1312
#18 0x0000560fa915a27d in pfs_spawn_thread (arg=0x560face01488) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
#19 0x0000154dd9822609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#20 0x0000154dd9411293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

10.6.0 bfb4761ca04704d68dba51f76d7c9967f880a6ee (Debug)

Core was generated by `/test/MD110221-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11)
    at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
[Current thread is 1 (Thread 0x14742c424700 (LWP 1838159))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=11) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
#1  0x000055618da0155c in my_write_core (sig=sig@entry=11) at /test/10.6_dbg/mysys/stacktrace.c:424
#2  0x000055618d1994de in handle_fatal_signal (sig=11) at /test/10.6_dbg/sql/signal_handler.cc:330
#3  <signal handler called>
#4  0x00001473e00008d0 in ?? ()
#5  0x000055618d3c2dae in Event_queue::get_top_for_execution_if_time (this=0x5561909a2c60, thd=thd@entry=0x1473dc0e7218, event_name=event_name@entry=0x14742c423d58) at /test/10.6_dbg/sql/event_queue.cc:672
#6  0x000055618d3c0a9a in Event_scheduler::run (this=this@entry=0x5561909a2f80, thd=0x1473dc0e7218) at /test/10.6_dbg/sql/event_scheduler.cc:492
#7  0x000055618d3c0d70 in event_scheduler_thread (arg=arg@entry=0x1473dc0b0358) at /test/10.6_dbg/sql/event_scheduler.cc:236
#8  0x000055618d4e227d in pfs_spawn_thread (arg=0x1473dc0e1a48) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
#9  0x0000147430586609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#10 0x0000147430175293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Bug confirmed present in:
MariaDB: 10.2.37 (dbg), 10.2.37 (opt), 10.3.28 (dbg), 10.3.28 (opt), 10.4.18 (dbg), 10.4.18 (opt), 10.5.9 (dbg), 10.5.9 (opt), 10.6.0 (dbg), 10.6.0 (opt)

Bug (or feature/syntax) confirmed not present in:
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.33 (dbg), 5.7.33 (opt), 8.0.23 (dbg), 8.0.23 (opt)

Comment by Roel Van de Paar [ 2021-06-22 ]

Yet a different stack with this one:

SET @@TIMESTAMP=1;
CREATE EVENT a ON SCHEDULE EVERY '50:20:12:45' DAY_SECOND DO SELECT 1;
CREATE EVENT IF NOT EXISTS d ON SCHEDULE EVERY 2 DAY DO SELECT 2;
SET SESSION profiling=ON;
CREATE EVENT c ON SCHEDULE EVERY 2 SECOND STARTS NOW() ENDS DATE_ADD(NOW(), INTERVAL 5 HOUR) DO BEGIN END;
SET GLOBAL event_scheduler=ON;
ALTER EVENT d ON SCHEDULE EVERY 1 DAY STARTS '2000-01-01 00:00:00';
SELECT SLEEP (3);

Leads to:

10.6.2 6c39eaeb126328e7813b146ecf652d51e4508981 (Debug)

Core was generated by `/test/MD120621-mariadb-10.6.2-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __memmove_avx_unaligned_erms ()
    at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:262
[Current thread is 1 (Thread 0x15315c163700 (LWP 490256))]
(gdb) bt
#0  __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:262
#1  0x000055aca389204d in memcpy (__len=29483, __src=0x0, __dest=0x153124011228) at /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34
#2  my_strndup (key=<optimized out>, from=0x0, length=29483, my_flags=my_flags@entry=16) at /test/10.6_dbg/mysys/my_malloc.c:246
#3  0x000055aca2ea2a63 in Event_queue_element_for_exec::init (this=0x153124011160, db=@0x153120008518: {str = 0x0, length = 29483}, n=@0x153120008528: {str = 0x0, length = 0}) at /test/10.6_dbg/sql/event_data_objects.cc:190
#4  0x000055aca325f48b in Event_queue::get_top_for_execution_if_time (this=0x55aca6f11770, thd=thd@entry=0x15312002a4a8, event_name=event_name@entry=0x15315c162d58) at /test/10.6_dbg/sql/event_data_objects.h:38
#5  0x000055aca325d4f0 in Event_scheduler::run (this=this@entry=0x55aca6efa490, thd=0x15312002a4a8) at /test/10.6_dbg/sql/event_scheduler.cc:492
#6  0x000055aca325d7c6 in event_scheduler_thread (arg=arg@entry=0x153120038218) at /test/10.6_dbg/sql/event_scheduler.cc:236
#7  0x000055aca337c166 in pfs_spawn_thread (arg=0x55aca6defab8) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
#8  0x000015317153b609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9  0x000015317112a293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Bug confirmed present in:
MariaDB: 10.2.39 (opt), 10.3.30 (dbg), 10.4.20 (dbg), 10.4.20 (opt), 10.5.11 (dbg), 10.5.11 (opt), 10.6.2 (dbg), 10.6.2 (opt)

Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.2.39 (dbg), 10.3.30 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.34 (dbg), 5.7.34 (opt), 8.0.24 (dbg), 8.0.24 (opt)

Comment by Roel Van de Paar [ 2021-09-07 ]

rucha174 Hi! Any updates? Thanks

Comment by Roel Van de Paar [ 2022-02-15 ]

Another stack seen during MDEV-25440 (unrelated) testing.

10.5.14 cf63eecef44f189ce2d221612dee9dfc1885ba4e (Optimized)

Core was generated by `/test/MDEV-25440-2-MD040222-mariadb-10.5.14-linux-x86_64-opt//bin/mysqld --no-d'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  my_scan_weight_utf8mb3_general_ci (
    end=0x4 <error: Cannot access memory at address 0x4>, str=0x0, 
    weight=<synthetic pointer>)
    at /test/MDEV-25440-2-bb-10.5-release_opt/strings/strcoll.inl:99
99	  if (IS_MB1_CHAR(*str))
[Current thread is 1 (Thread 0x15336c531700 (LWP 3475630))]
(gdb) bt
#0  my_scan_weight_utf8mb3_general_ci (end=0x4 <error: Cannot access memory at address 0x4>, str=0x0, weight=<synthetic pointer>) at /test/MDEV-25440-2-bb-10.5-release_opt/strings/strcoll.inl:99
#1  my_scan_weight_utf8mb3_general_ci (end=0x4 <error: Cannot access memory at address 0x4>, str=0x0, weight=<synthetic pointer>) at /test/MDEV-25440-2-bb-10.5-release_opt/strings/strcoll.inl:90
#2  my_strnncollsp_utf8mb3_general_ci (cs=<optimized out>, a=0x1532d5284408 "e1", a_length=<optimized out>, b=0x0, b_length=<optimized out>) at /test/MDEV-25440-2-bb-10.5-release_opt/strings/strcoll.inl:256
#3  0x000055e822792b2e in event_basic_identifier_equal (db=db@entry=0x1532d5284418, name=name@entry=0x1532d5284428, b=b@entry=0x1532d4d52730) at /test/MDEV-25440-2-bb-10.5-release_opt/sql/event_data_objects.cc:1614
#4  0x000055e822a4fe1a in Event_queue::find_n_remove_event (this=this@entry=0x55e825e36710, db=db@entry=0x1532d5284418, name=name@entry=0x1532d5284428) at /test/MDEV-25440-2-bb-10.5-release_opt/sql/event_queue.cc:427
#5  0x000055e822a5035a in Event_queue::drop_event (this=0x55e825e36710, thd=thd@entry=0x1532d4000c58, dbname=dbname@entry=0x1532d5284418, name=name@entry=0x1532d5284428) at /test/MDEV-25440-2-bb-10.5-release_opt/sql/event_queue.cc:301
#6  0x000055e822793fe5 in Events::drop_event (thd=thd@entry=0x1532d4000c58, dbname=0x1532d5284418, name=0x1532d5284428, if_exists=<optimized out>) at /test/MDEV-25440-2-bb-10.5-release_opt/sql/events.cc:620
#7  0x000055e8226ab19d in mysql_execute_command (thd=0x1532d4000c58) at /test/MDEV-25440-2-bb-10.5-release_opt/sql/structs.h:559
#8  0x000055e822697c73 in mysql_parse (thd=0x1532d4000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/MDEV-25440-2-bb-10.5-release_opt/sql/sql_parse.cc:8100
#9  0x000055e8226a4a8d in dispatch_command (command=COM_QUERY, thd=0x1532d4000c58, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/MDEV-25440-2-bb-10.5-release_opt/sql/sql_class.h:1290
#10 0x000055e8226a7262 in do_command (thd=0x1532d4000c58) at /test/MDEV-25440-2-bb-10.5-release_opt/sql/sql_parse.cc:1370
#11 0x000055e8227aee21 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55e825e515e8, put_in_cache=put_in_cache@entry=true) at /test/MDEV-25440-2-bb-10.5-release_opt/sql/sql_connect.cc:1418
#12 0x000055e8227af29d in handle_one_connection (arg=arg@entry=0x55e825e515e8) at /test/MDEV-25440-2-bb-10.5-release_opt/sql/sql_connect.cc:1312
#13 0x000055e822b443e2 in pfs_spawn_thread (arg=0x55e825e3f6b8) at /test/MDEV-25440-2-bb-10.5-release_opt/storage/perfschema/pfs.cc:2201
#14 0x0000153375c42609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#15 0x0000153375830293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

The testcase for the same was reduced to

SET TIMESTAMP=1040323931;
CREATE EVENT ev2 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (SLEEP (0.01),CONCAT ('ev2_',connection_id()));
CREATE EVENT _user1 ON SCHEDULE EVERY 10 SECOND DO SELECT 42;
SET GLOBAL event_scheduler=ON;
CREATE EVENT event_STARTS_test ON SCHEDULE EVERY 10 SECOND COMMENT "" DO SELECT 1;
ALTER EVENT event_STARTS_test ON SCHEDULE AT '2020-02-02 20:00:02';
CREATE EVENT ev_log_general ON SCHEDULE at NOW() ON completion NOT preserve DO SELECT 'events_logs_test' AS inside_event;
CREATE EVENT e1 ON SCHEDULE EVERY 10 HOUR DO SELECT 1;
DROP EVENT ev2;
CREATE TABLE IF NOT EXISTS ������ (������ CHAR(1)) DEFAULT CHARSET=sjis ENGINE=TokuDB;

However, most of the time that testcase (when repeated 2 times; the crash seems sporadic) will produce a stack seen earlier in this ticket.

Comment by Roel Van de Paar [ 2022-03-30 ]

This testcase:

CREATE EVENT EVENT1 ON SCHEDULE EVERY 15 MINUTE STARTS NOW() ENDS DATE_ADD(NOW(), INTERVAL 5 HOUR) DO BEGIN END;
SET default_storage_engine=MyISAM;
SET TIMESTAMP=1000000012;
CREATE EVENT root10 ON SCHEDULE EVERY '20:5' DAY_HOUR DO SELECT 1;
CREATE EVENT event_STARTS_test ON SCHEDULE EVERY 20 SECOND STARTS '2020-02-02 20:00:02' ENDS '2022-02-02 20:00:02' DO SELECT 2;
SET GLOBAL event_scheduler='ON';
DROP EVENT IF EXISTS EVENT1;
CREATE DATABASE RocksDBtest;
CREATE TABLE infoschema_buffer_test (col1 INT) ENGINE=RocksDB;
DROP DATABASE RocksDBtest;

Will lead to this stack, quite sporadically:

10.5.16 73fee39ea62037780c59161507e89dd76c10b7a3 (Optimized)

Core was generated by `/test/MD160322-mariadb-10.5.16-linux-x86_64-opt/bin/mysqld --no-defaults --max_'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  my_scan_weight_utf8mb3_general_ci (
    end=0xd7f1 <error: Cannot access memory at address 0xd7f1>, str=0x0, 
    weight=<synthetic pointer>) at /test/10.5_opt/strings/strcoll.inl:99
[Current thread is 1 (Thread 0x14e98c124700 (LWP 1210073))]
(gdb) bt
#0  my_scan_weight_utf8mb3_general_ci (end=0xd7f1 <error: Cannot access memory at address 0xd7f1>, str=0x0, weight=<synthetic pointer>) at /test/10.5_opt/strings/strcoll.inl:99
#1  my_scan_weight_utf8mb3_general_ci (end=0xd7f1 <error: Cannot access memory at address 0xd7f1>, str=0x0, weight=<synthetic pointer>) at /test/10.5_opt/strings/strcoll.inl:90
#2  my_strnncollsp_utf8mb3_general_ci (cs=<optimized out>, a=0x0, a_length=<optimized out>, b=0x14e8d4010620 "RocksDBtest", b_length=<optimized out>) at /test/10.5_opt/strings/strcoll.inl:255
#3  0x000056029ec7fc01 in event_basic_db_equal (db=db@entry=0x14e98c1225f0, et=et@entry=0x14e8d4029920) at /test/10.5_opt/sql/event_data_objects.cc:1592
#4  0x000056029ef3cd14 in Event_queue::drop_matching_events (this=this@entry=0x5602a24327f0, thd=thd@entry=0x14e8d4000c58, pattern=pattern@entry=0x14e98c1225f0, comparator=0x56029ec7fbe0 <event_basic_db_equal(st_mysql_const_lex_string const*, Event_basic*)>) at /test/10.5_opt/sql/event_queue.cc:345
#5  0x000056029ef3d3a1 in Event_queue::drop_schema_events (this=0x5602a24327f0, thd=thd@entry=0x14e8d4000c58, schema=schema@entry=0x14e98c1225f0) at /test/10.5_opt/sql/event_queue.cc:394
#6  0x000056029ec811f2 in Events::drop_schema_events (thd=thd@entry=0x14e8d4000c58, db=db@entry=0x14e8d4010620 "RocksDBtest") at /test/10.5_opt/sql/events.cc:664
#7  0x000056029eb49a6b in mysql_rm_db_internal (thd=0x14e8d4000c58, db=0x14e8d4005918, if_exists=<optimized out>, silent=<optimized out>) at /test/10.5_opt/sql/sql_db.cc:977
#8  0x000056029eb9746e in mysql_execute_command (thd=0x14e8d4000c58) at /test/10.5_opt/sql/structs.h:559
#9  0x000056029eb84db3 in mysql_parse (thd=0x14e8d4000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_parse.cc:8100
#10 0x000056029eb91bcd in dispatch_command (command=COM_QUERY, thd=0x14e8d4000c58, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.5_opt/sql/sql_class.h:1290
#11 0x000056029eb943a2 in do_command (thd=0x14e8d4000c58) at /test/10.5_opt/sql/sql_parse.cc:1370
#12 0x000056029ec9bf31 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5602a2444648, put_in_cache=put_in_cache@entry=true) at /test/10.5_opt/sql/sql_connect.cc:1418
#13 0x000056029ec9c3ad in handle_one_connection (arg=arg@entry=0x5602a2444648) at /test/10.5_opt/sql/sql_connect.cc:1312
#14 0x000056029f0314f2 in pfs_spawn_thread (arg=0x5602a14bee68) at /test/10.5_opt/storage/perfschema/pfs.cc:2201
#15 0x000014e9a7164609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#16 0x000014e9a6d50163 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

However the issue is that the server needs to be restarted before each attempt to reproduce it (and this is why the testcase is not as optimal yet as it could be). Simply repeating the same testcase without restarting the server will result in another stack from this bug.

Comment by Roel Van de Paar [ 2022-04-21 ]

Fresh 10.8 ASAN debug capture with this testcase:

CREATE EVENT e ON SCHEDULE EVERY 5 HOUR DO SELECT 2;
SET timestamp=100000000;
CREATE EVENT root8 ON SCHEDULE EVERY '2:5' YEAR_MONTH DO SELECT 1;
CREATE EVENT EVENT1 ON SCHEDULE EVERY 15 MINUTE STARTS NOW() ENDS DATE_ADD(NOW(), INTERVAL 5 HOUR) DO BEGIN END;
SET GLOBAL event_scheduler=TRUE;
ALTER EVENT e ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00';

10.8.3 e2e4aa29db0561b4a62faf4f381f9382c7a76903 (Debug, UBASAN)

2022-04-21 21:13:05 0 [Note] /test/UBASAN_MD090422-mariadb-10.8.3-linux-x86_64-dbg/bin/mysqld: ready for connections.
Version: '10.8.3-MariaDB-debug'  socket: '/test/UBASAN_MD090422-mariadb-10.8.3-linux-x86_64-dbg/socket.sock'  port: 12680  MariaDB Server
2022-04-21 21:15:52 5 [Note] Event Scheduler: scheduler thread started with id 5
=================================================================
==1070693==ERROR: AddressSanitizer: heap-use-after-free on address 0x61100004a780 at pc 0x5588777a1d67 bp 0x145599ec5890 sp 0x145599ec5880
READ of size 8 at 0x61100004a780 thread T13
    #0 0x5588777a1d66 in event_queue_element_compare_q /test/10.8_dbg_san/sql/event_queue.cc:75
    #1 0x55887943c509 in insert_at /test/10.8_dbg_san/mysys/queues.c:191
    #2 0x55887943d54c in queue_insert /test/10.8_dbg_san/mysys/queues.c:219
    #3 0x55887943d723 in queue_insert_safe /test/10.8_dbg_san/mysys/queues.c:248
    #4 0x5588777a5b3d in Event_queue::update_event(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Event_queue_element*) /test/10.8_dbg_san/sql/event_queue.cc:271
    #5 0x55887567c3ad in Events::update_event(THD*, Event_parse_data*, st_mysql_const_lex_string*, st_mysql_const_lex_string*) /test/10.8_dbg_san/sql/events.cc:550
    #6 0x558874ce24ae in mysql_execute_command(THD*, bool) /test/10.8_dbg_san/sql/sql_parse.cc:5271
    #7 0x558874c2a85c in mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.8_dbg_san/sql/sql_parse.cc:8043
    #8 0x558874ca08ae in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /test/10.8_dbg_san/sql/sql_parse.cc:1910
    #9 0x558874cb7409 in do_command(THD*, bool) /test/10.8_dbg_san/sql/sql_parse.cc:1407
    #10 0x558875783d7d in do_handle_one_connection(CONNECT*, bool) /test/10.8_dbg_san/sql/sql_connect.cc:1418
    #11 0x558875786c17 in handle_one_connection /test/10.8_dbg_san/sql/sql_connect.cc:1312
    #12 0x558877cd2668 in pfs_spawn_thread /test/10.8_dbg_san/storage/perfschema/pfs.cc:2201
    #13 0x1455bced3608 in start_thread /build/glibc-sMfBJT/glibc-2.31/nptl/pthread_create.c:477
    #14 0x1455bc148162 in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x11f162)
 
0x61100004a780 is located 0 bytes inside of 208-byte region [0x61100004a780,0x61100004a850)
freed by thread T13 here:
    #0 0x55887423ef5f in operator delete(void*) (/test/UBASAN_MD090422-mariadb-10.8.3-linux-x86_64-dbg/bin/mariadbd+0x8487f5f)
    #1 0x55887565d4ca in Event_queue_element::~Event_queue_element() /test/10.8_dbg_san/sql/event_data_objects.cc:332
    #2 0x5588777a30cb in Event_queue::find_n_remove_event(st_mysql_const_lex_string const*, st_mysql_const_lex_string const*) /test/10.8_dbg_san/sql/event_queue.cc:430
    #3 0x5588777a5ad2 in Event_queue::update_event(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, Event_queue_element*) /test/10.8_dbg_san/sql/event_queue.cc:265
    #4 0x55887567c3ad in Events::update_event(THD*, Event_parse_data*, st_mysql_const_lex_string*, st_mysql_const_lex_string*) /test/10.8_dbg_san/sql/events.cc:550
    #5 0x558874ce24ae in mysql_execute_command(THD*, bool) /test/10.8_dbg_san/sql/sql_parse.cc:5271
    #6 0x558874c2a85c in mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.8_dbg_san/sql/sql_parse.cc:8043
    #7 0x558874ca08ae in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /test/10.8_dbg_san/sql/sql_parse.cc:1910
    #8 0x558874cb7409 in do_command(THD*, bool) /test/10.8_dbg_san/sql/sql_parse.cc:1407
    #9 0x558875783d7d in do_handle_one_connection(CONNECT*, bool) /test/10.8_dbg_san/sql/sql_connect.cc:1418
    #10 0x558875786c17 in handle_one_connection /test/10.8_dbg_san/sql/sql_connect.cc:1312
    #11 0x558877cd2668 in pfs_spawn_thread /test/10.8_dbg_san/storage/perfschema/pfs.cc:2201
    #12 0x1455bced3608 in start_thread /build/glibc-sMfBJT/glibc-2.31/nptl/pthread_create.c:477
 
previously allocated by thread T13 here:
    #0 0x55887423dfc7 in operator new(unsigned long) (/test/UBASAN_MD090422-mariadb-10.8.3-linux-x86_64-dbg/bin/mariadbd+0x8486fc7)
    #1 0x55887567a319 in Events::create_event(THD*, Event_parse_data*) /test/10.8_dbg_san/sql/events.cc:372
    #2 0x558874ce2583 in mysql_execute_command(THD*, bool) /test/10.8_dbg_san/sql/sql_parse.cc:5267
    #3 0x558874c2a85c in mysql_parse(THD*, char*, unsigned int, Parser_state*) /test/10.8_dbg_san/sql/sql_parse.cc:8043
    #4 0x558874ca08ae in dispatch_command(enum_server_command, THD*, char*, unsigned int, bool) /test/10.8_dbg_san/sql/sql_parse.cc:1910
    #5 0x558874cb7409 in do_command(THD*, bool) /test/10.8_dbg_san/sql/sql_parse.cc:1407
    #6 0x558875783d7d in do_handle_one_connection(CONNECT*, bool) /test/10.8_dbg_san/sql/sql_connect.cc:1418
    #7 0x558875786c17 in handle_one_connection /test/10.8_dbg_san/sql/sql_connect.cc:1312
    #8 0x558877cd2668 in pfs_spawn_thread /test/10.8_dbg_san/storage/perfschema/pfs.cc:2201
    #9 0x1455bced3608 in start_thread /build/glibc-sMfBJT/glibc-2.31/nptl/pthread_create.c:477
 
Thread T13 created by T0 here:
    #0 0x558874169285 in __interceptor_pthread_create (/test/UBASAN_MD090422-mariadb-10.8.3-linux-x86_64-dbg/bin/mariadbd+0x83b2285)
    #1 0x558877ce1b92 in my_thread_create /test/10.8_dbg_san/storage/perfschema/my_thread.h:52
    #2 0x558877ce1b92 in pfs_spawn_thread_v1 /test/10.8_dbg_san/storage/perfschema/pfs.cc:2252
    #3 0x5588742958ac in inline_mysql_thread_create /test/10.8_dbg_san/include/mysql/psi/mysql_thread.h:1139
    #4 0x5588742958ac in create_thread_to_handle_connection(CONNECT*) /test/10.8_dbg_san/sql/mysqld.cc:5980
    #5 0x5588742aad86 in create_new_thread(CONNECT*) /test/10.8_dbg_san/sql/mysqld.cc:6039
    #6 0x5588742ab561 in handle_accepted_socket(st_mysql_socket, st_mysql_socket) /test/10.8_dbg_san/sql/mysqld.cc:6101
    #7 0x5588742ad146 in handle_connections_sockets() /test/10.8_dbg_san/sql/mysqld.cc:6225
    #8 0x5588742b329c in mysqld_main(int, char**) /test/10.8_dbg_san/sql/mysqld.cc:5875
    #9 0x55887427d80a in main /test/10.8_dbg_san/sql/main.cc:34
    #10 0x1455bc04d0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b2)
 
SUMMARY: AddressSanitizer: heap-use-after-free /test/10.8_dbg_san/sql/event_queue.cc:75 in event_queue_element_compare_q
Shadow bytes around the buggy address:
  0x0c22800014a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c22800014b0: 00 00 00 00 00 00 00 00 04 fa fa fa fa fa fa fa
  0x0c22800014c0: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
  0x0c22800014d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c22800014e0: 04 fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c22800014f0:[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2280001500: fd fd fd fd fd fd fd fd fd fd fa fa fa fa fa fa
  0x0c2280001510: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
  0x0c2280001520: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c2280001530: fd fd fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c2280001540: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
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
==1070693==ABORTING

Comment by Roel Van de Paar [ 2023-03-28 ]

This bug has become a bit harder to reproduce. I created the following SQL which is basically all testcases above joined into one with drop/create test db for each. It seems to reproduce the crash at the CLI instantly. Loop if required, though it was not necessary in my case, even on 11.0 (opt+dbg).

DROP DATABASE test;
CREATE DATABASE test;
USE test;
CREATE EVENT e ON SCHEDULE EVERY 5 HOUR DO SELECT 2;
SET timestamp=100000000;
CREATE EVENT root8 ON SCHEDULE EVERY '2:5' YEAR_MONTH DO SELECT 1;
CREATE EVENT EVENT1 ON SCHEDULE EVERY 15 MINUTE STARTS NOW() ENDS DATE_ADD(NOW(), INTERVAL 5 HOUR) DO BEGIN END;
SET GLOBAL event_scheduler=TRUE;
ALTER EVENT e ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00';
DROP PROCEDURE not_there;
DROP EVENT IF EXISTS non_existing;
DROP DATABASE test;
CREATE DATABASE test;
USE test;
SET TIMESTAMP=1040323931;
CREATE EVENT ev2 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (SLEEP (0.01),CONCAT ('ev2_',connection_id()));
CREATE EVENT _user1 ON SCHEDULE EVERY 10 SECOND DO SELECT 42;
SET GLOBAL event_scheduler=ON;
CREATE EVENT event_STARTS_test ON SCHEDULE EVERY 10 SECOND COMMENT "" DO SELECT 1;
ALTER EVENT event_STARTS_test ON SCHEDULE AT '2020-02-02 20:00:02';
CREATE EVENT ev_log_general ON SCHEDULE at NOW() ON completion NOT preserve DO SELECT 'events_logs_test' AS inside_event;
CREATE EVENT e1 ON SCHEDULE EVERY 10 HOUR DO SELECT 1;
DROP EVENT ev2;
CREATE TABLE IF NOT EXISTS ������ (������ CHAR(1)) DEFAULT CHARSET=sjis ENGINE=TokuDB;
DROP DATABASE test;
CREATE DATABASE test;
USE test;
SET default_storage_engine=MyISAM;
SET TIMESTAMP=1000000012;
CREATE EVENT root10 ON SCHEDULE EVERY '20:5' DAY_HOUR DO SELECT 1;
CREATE EVENT event_STARTS_test ON SCHEDULE EVERY 20 SECOND STARTS '2020-02-02 20:00:02' ENDS '2022-02-02 20:00:02' DO SELECT 2;
SET GLOBAL event_scheduler='ON';
DROP EVENT IF EXISTS EVENT1;
CREATE DATABASE RocksDBtest;
CREATE TABLE infoschema_buffer_test (col1 INT) ENGINE=RocksDB;
DROP DATABASE RocksDBtest;
DROP DATABASE test;
CREATE DATABASE test;
USE test;
CREATE EVENT e ON SCHEDULE EVERY 5 HOUR DO SELECT 2;
SET timestamp=100000000;
CREATE EVENT root8 ON SCHEDULE EVERY '2:5' YEAR_MONTH DO SELECT 1;
CREATE EVENT EVENT1 ON SCHEDULE EVERY 15 MINUTE STARTS NOW() ENDS DATE_ADD(NOW(), INTERVAL 5 HOUR) DO BEGIN END;
SET GLOBAL event_scheduler=TRUE;
ALTER EVENT e ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00';

Leads to:

10.6.13 6aec87544c675751141100d6efe3a2d943cb528f (Optimized)

Core was generated by `/test/MD110223-mariadb-10.6.13-linux-x86_64-opt/bin/mariadbd --no-defaults --co'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  my_scan_weight_utf8mb3_general_ci (
    end=0x138 <error: Cannot access memory at address 0x138>, 
    str=0xd0 <error: Cannot access memory at address 0xd0>, 
    weight=<synthetic pointer>) at /test/10.6_opt/strings/strcoll.inl:99
[Current thread is 1 (Thread 0x152071489640 (LWP 714197))]
(gdb) bt
#0  my_scan_weight_utf8mb3_general_ci (end=0x138 <error: Cannot access memory at address 0x138>, str=0xd0 <error: Cannot access memory at address 0xd0>, weight=<synthetic pointer>) at /test/10.6_opt/strings/strcoll.inl:99
#1  my_scan_weight_utf8mb3_general_ci (end=0x138 <error: Cannot access memory at address 0x138>, str=0xd0 <error: Cannot access memory at address 0xd0>, weight=<synthetic pointer>) at /test/10.6_opt/strings/strcoll.inl:90
#2  my_strnncollsp_utf8mb3_general_ci (cs=<optimized out>, a=0xd0 <error: Cannot access memory at address 0xd0>, a_length=<optimized out>, b=0x152030010728 "test", b_length=<optimized out>) at /test/10.6_opt/strings/strcoll.inl:255
#3  0x00005560d9d5d671 in event_basic_db_equal (db=<optimized out>, et=<optimized out>) at /test/10.6_opt/sql/event_data_objects.cc:1591
#4  0x00005560da02979d in Event_queue::drop_matching_events (this=this@entry=0x5560dc2d14c0, thd=thd@entry=0x152030000c68, pattern=pattern@entry=0x152071486e10, comparator=0x5560d9d5d650 <event_basic_db_equal(st_mysql_const_lex_string const*, Event_basic*)>) at /test/10.6_opt/sql/event_queue.cc:345
#5  0x00005560da029d22 in Event_queue::drop_schema_events (this=0x5560dc2d14c0, thd=0x152030000c68, schema=0x152071486e10) at /test/10.6_opt/sql/event_queue.cc:394
#6  0x00005560d9d5ec02 in Events::drop_schema_events (thd=thd@entry=0x152030000c68, db=<optimized out>) at /test/10.6_opt/sql/events.cc:665
#7  0x00005560d9c215dc in drop_database_objects (path=<optimized out>, rm_mysql_schema=false, db=0x152071486f00, thd=0x152030000c68) at /test/10.6_opt/sql/sql_db.cc:1012
#8  drop_database_objects (thd=0x152030000c68, path=<optimized out>, db=0x152071486f00, rm_mysql_schema=<optimized out>) at /test/10.6_opt/sql/sql_db.cc:981
#9  0x00005560d9c22a0a in mysql_rm_db_internal (thd=0x152030000c68, db=0x152030005928, if_exists=<optimized out>, silent=<optimized out>) at /test/10.6_opt/sql/sql_db.cc:1132
#10 0x00005560d9c6b6dd in mysql_execute_command (thd=0x152030000c68, is_called_from_prepared_stmt=<optimized out>) at /test/10.6_opt/sql/sql_parse.cc:5186
#11 0x00005560d9c6ef34 in mysql_parse (rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, thd=0x152030000c68) at /test/10.6_opt/sql/sql_parse.cc:8021
#12 mysql_parse (thd=0x152030000c68, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/10.6_opt/sql/sql_parse.cc:7943
#13 0x00005560d9c71512 in dispatch_command (command=COM_QUERY, thd=0x152030000c68, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/10.6_opt/sql/sql_parse.cc:1993
#14 0x00005560d9c72cb0 in do_command (thd=0x152030000c68, blocking=blocking@entry=true) at /test/10.6_opt/sql/sql_parse.cc:1409
#15 0x00005560d9d76bf7 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5560dc44a0c8, put_in_cache=put_in_cache@entry=true) at /test/10.6_opt/sql/sql_connect.cc:1416
#16 0x00005560d9d76ecd in handle_one_connection (arg=0x5560dc44a0c8) at /test/10.6_opt/sql/sql_connect.cc:1318
#17 0x000015208a145b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#18 0x000015208a1d7a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

10.6.13 6aec87544c675751141100d6efe3a2d943cb528f (Debug)

Core was generated by `/test/MD110223-mariadb-10.6.13-linux-x86_64-dbg/bin/mariadbd --no-defaults --co'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000055ee286381a5 in Event_queue::get_top_for_execution_if_time (
    this=0x55ee2b1abbe0, thd=thd@entry=0x14be700441d8, 
    event_name=event_name@entry=0x14beb45f8bd8)
    at /test/10.6_dbg/sql/event_queue.cc:675
[Current thread is 1 (Thread 0x14beb45f9640 (LWP 343641))]
(gdb) bt
#0  0x000055ee286381a5 in Event_queue::get_top_for_execution_if_time (this=0x55ee2b1abbe0, thd=thd@entry=0x14be700441d8, event_name=event_name@entry=0x14beb45f8bd8) at /test/10.6_dbg/sql/event_queue.cc:675
#1  0x000055ee28636fc6 in Event_scheduler::run (this=this@entry=0x55ee2af572d0, thd=0x14be700441d8) at /test/10.6_dbg/sql/event_scheduler.cc:492
#2  0x000055ee286370e3 in event_scheduler_thread (arg=0x14be7001a1e8) at /test/10.6_dbg/sql/event_scheduler.cc:236
#3  0x000014becd70ab43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#4  0x000014becd79ca00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

11.0.1 f2dc4d4c10ac36a73b5c1eb765352d3aee808d66 (Optimized)

Core was generated by `/test/MD180223-mariadb-11.0.1-linux-x86_64-opt/bin/mariadbd --no-defaults --cor'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  my_scan_weight_utf8mb3_general_ci (
    end=0x138 <error: Cannot access memory at address 0x138>, 
    str=<optimized out>, weight=<synthetic pointer>)
    at /test/11.0_opt/strings/strcoll.inl:137
[Current thread is 1 (Thread 0x154820050640 (LWP 776300))]
(gdb) bt
#0  my_scan_weight_utf8mb3_general_ci (end=0x138 <error: Cannot access memory at address 0x138>, str=<optimized out>, weight=<synthetic pointer>) at /test/11.0_opt/strings/strcoll.inl:137
#1  my_scan_weight_utf8mb3_general_ci (end=0x138 <error: Cannot access memory at address 0x138>, str=<optimized out>, weight=<synthetic pointer>) at /test/11.0_opt/strings/strcoll.inl:128
#2  my_strnncollsp_utf8mb3_general_ci (cs=<optimized out>, a=<optimized out>, a_length=<optimized out>, b=<optimized out>, b_length=<optimized out>) at /test/11.0_opt/strings/strcoll.inl:317
#3  0x0000560ad7d73321 in event_basic_db_equal (db=<optimized out>, et=<optimized out>) at /test/11.0_opt/sql/event_data_objects.cc:1591
#4  0x0000560ad8029bfd in Event_queue::drop_matching_events (this=this@entry=0x560adad347d0, thd=thd@entry=0x1547cc000c68, pattern=pattern@entry=0x15482004ddc0, comparator=0x560ad7d73300 <event_basic_db_equal(st_mysql_const_lex_string const*, Event_basic*)>) at /test/11.0_opt/sql/event_queue.cc:345
#5  0x0000560ad802a182 in Event_queue::drop_schema_events (this=0x560adad347d0, thd=0x1547cc000c68, schema=0x15482004ddc0) at /test/11.0_opt/sql/event_queue.cc:394
#6  0x0000560ad7d74742 in Events::drop_schema_events (thd=thd@entry=0x1547cc000c68, db=<optimized out>) at /test/11.0_opt/sql/events.cc:665
#7  0x0000560ad7c1e72c in drop_database_objects (path=<optimized out>, rm_mysql_schema=false, db=0x15482004deb0, thd=0x1547cc000c68) at /test/11.0_opt/sql/sql_db.cc:1014
#8  drop_database_objects (thd=0x1547cc000c68, path=<optimized out>, db=0x15482004deb0, rm_mysql_schema=<optimized out>) at /test/11.0_opt/sql/sql_db.cc:983
#9  0x0000560ad7c1faed in mysql_rm_db_internal (thd=0x1547cc000c68, db=0x1547cc005a08, if_exists=<optimized out>, silent=<optimized out>) at /test/11.0_opt/sql/sql_db.cc:1134
#10 0x0000560ad7c6e9d8 in mysql_execute_command (thd=0x1547cc000c68, is_called_from_prepared_stmt=<optimized out>) at /test/11.0_opt/sql/sql_parse.cc:5189
#11 0x0000560ad7c71794 in mysql_parse (rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, thd=0x1547cc000c68) at /test/11.0_opt/sql/sql_parse.cc:8002
#12 mysql_parse (thd=0x1547cc000c68, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/11.0_opt/sql/sql_parse.cc:7924
#13 0x0000560ad7c73d72 in dispatch_command (command=COM_QUERY, thd=0x1547cc000c68, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/11.0_opt/sql/sql_parse.cc:1991
#14 0x0000560ad7c75510 in do_command (thd=0x1547cc000c68, blocking=blocking@entry=true) at /test/11.0_opt/sql/sql_parse.cc:1407
#15 0x0000560ad7d8d717 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x560adaef1d28, put_in_cache=put_in_cache@entry=true) at /test/11.0_opt/sql/sql_connect.cc:1416
#16 0x0000560ad7d8d9ed in handle_one_connection (arg=0x560adaef1d28) at /test/11.0_opt/sql/sql_connect.cc:1318
#17 0x0000154837957b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#18 0x00001548379e9a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

11.0.1 f2dc4d4c10ac36a73b5c1eb765352d3aee808d66 (Debug)

Core was generated by `/test/MD180223-mariadb-11.0.1-linux-x86_64-dbg/bin/mariadbd --no-defaults --cor'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000055e24230f8b7 in Event_queue::get_top_for_execution_if_time (
    this=0x55e244175390, thd=thd@entry=0x154108043a48, 
    event_name=event_name@entry=0x154132fc6bd8)
    at /test/11.0_dbg/sql/event_queue.cc:675
[Current thread is 1 (Thread 0x154132fc7640 (LWP 935752))]
(gdb) bt
#0  0x000055e24230f8b7 in Event_queue::get_top_for_execution_if_time (this=0x55e244175390, thd=thd@entry=0x154108043a48, event_name=event_name@entry=0x154132fc6bd8) at /test/11.0_dbg/sql/event_queue.cc:675
#1  0x000055e24230e6d8 in Event_scheduler::run (this=this@entry=0x55e2441bb480, thd=0x154108043a48) at /test/11.0_dbg/sql/event_scheduler.cc:492
#2  0x000055e24230e7f5 in event_scheduler_thread (arg=0x1541080193f8) at /test/11.0_dbg/sql/event_scheduler.cc:236
#3  0x0000154163b00b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#4  0x0000154163b92a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

And the ASAN issue above (by just using the short testcase) was confirmed to reproduce on latest 11.0 debug SAN build.

Comment by Roel Van de Paar [ 2023-03-28 ]

Note that the ASAN trace is slightly different between dbg and opt (this is testing 11.0):

ASAN|heap-use-after-free|sql/event_queue.cc|event_queue_element_compare_q|insert_at|queue_insert|queue_insert_safe  # dbg
ASAN|heap-use-after-free|sql/event_queue.cc|event_queue_element_compare_q|insert_at|queue_insert_safe|Event_queue::update_event  # opt

Comment by Roel Van de Paar [ 2023-03-28 ]

I was also able to reproduce the issue under MTR using the testcase in the previous last comment and adding the following at the top:

--source include/have_innodb.inc
--disable_warnings

11.0.1 f2dc4d4c10ac36a73b5c1eb765352d3aee808d66 (Debug)

/test/MD180223-mariadb-11.0.1-linux-x86_64-dbg/mysql-test$ ./mtr test
Logging: ./mtr  test
VS config: 
vardir: /test/MD180223-mariadb-11.0.1-linux-x86_64-dbg/mysql-test/var
Checking leftover processes...
Removing old var directory...
Creating var directory '/test/MD180223-mariadb-11.0.1-linux-x86_64-dbg/mysql-test/var'...
Checking supported features...
MariaDB Version 11.0.1-MariaDB-debug
 - SSL connections supported
 - binaries are debug compiled
 - binaries built with wsrep patch
Collecting tests...
Installing system database...
 
==============================================================================
 
TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------
 
worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
DROP DATABASE test;
CREATE DATABASE test;
USE test;
CREATE EVENT e ON SCHEDULE EVERY 5 HOUR DO SELECT 2;
SET timestamp=100000000;
CREATE EVENT root8 ON SCHEDULE EVERY '2:5' YEAR_MONTH DO SELECT 1;
CREATE EVENT EVENT1 ON SCHEDULE EVERY 15 MINUTE STARTS NOW() ENDS DATE_ADD(NOW(), INTERVAL 5 HOUR) DO BEGIN END;
SET GLOBAL event_scheduler=TRUE;
ALTER EVENT e ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00';
DROP PROCEDURE not_there;
main.test 'innodb'                       [ fail ]
        Test ended at 2023-03-28 12:32:11
 
CURRENT_TEST: main.test
mysqltest: At line 12: query 'DROP PROCEDURE not_there' failed: ER_SP_DOES_NOT_EXIST (1305): PROCEDURE test.not_there does not exist
 
 - found 'core.1922463' (0/5)
Core generated by '/test/MD180223-mariadb-11.0.1-linux-x86_64-dbg/bin/mariadbd'
Output from gdb follows. The first stack trace is from the failing thread.
The following stack traces are from all threads (so the failing one is
duplicated).
--------------------------
[New LWP 1922463]
[New LWP 1922507]
[New LWP 1922475]
[New LWP 1922511]
[New LWP 1922506]
[New LWP 1922479]
[New LWP 1922510]
[New LWP 1922512]
[New LWP 1922513]
[New LWP 1922514]
[New LWP 1922521]
[New LWP 1922516]
[New LWP 1922515]
[New LWP 1922518]
[New LWP 1922520]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/test/MD180223-mariadb-11.0.1-linux-x86_64-dbg/bin/mariadbd --defaults-group-su'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000000121 in ?? ()
[Current thread is 1 (Thread 0x146ab9917940 (LWP 1922463))]
 
Thread 15 (Thread 0x146ab21f0640 (LWP 1922520)):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x55b15a33848c <COND_manager+44>) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x55b15a33848c <COND_manager+44>) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x55b15a33848c <COND_manager+44>, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x0000146ab9c5aac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x55b15a3384c8 <LOCK_manager+40>, cond=0x55b15a338460 <COND_manager>) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=cond@entry=0x55b15a338460 <COND_manager>, mutex=mutex@entry=0x55b15a3384c8 <LOCK_manager+40>) at ./nptl/pthread_cond_wait.c:627
#5  0x000055b1597b1bff in safe_cond_wait (cond=0x55b15a338460 <COND_manager>, mp=0x55b15a3384a0 <LOCK_manager>, file=0x55b15993d128 "/test/11.0_dbg/include/mysql/psi/mysql_thread.h", line=1072) at /test/11.0_dbg/mysys/thr_mutex.c:494
#6  0x000055b158e4c56a in inline_mysql_cond_wait (src_line=103, src_file=0x55b159963c20 "/test/11.0_dbg/sql/sql_manager.cc", mutex=0x55b15a3384a0 <LOCK_manager>, that=0x55b15a338460 <COND_manager>) at /test/11.0_dbg/include/mysql/psi/mysql_thread.h:1072
#7  handle_manager (arg=<optimized out>) at /test/11.0_dbg/sql/sql_manager.cc:103
#8  0x0000146ab9c5bb43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x0000146ab9ceda00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
 
Thread 14 (Thread 0x146ab23f1640 (LWP 1922518)):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x146ab23f0bc0, op=393, expected=0, futex_word=0x55b15ab6be68 <COND_checkpoint+40>) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x146ab23f0bc0, clockid=2072, expected=0, futex_word=0x55b15ab6be68 <COND_checkpoint+40>) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x55b15ab6be68 <COND_checkpoint+40>, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x146ab23f0bc0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x0000146ab9c5af1b in __pthread_cond_wait_common (abstime=0x146ab23f0bc0, clockid=0, mutex=0x55b15ab6bea8 <LOCK_checkpoint+40>, cond=0x55b15ab6be40 <COND_checkpoint>) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_timedwait64 (cond=cond@entry=0x55b15ab6be40 <COND_checkpoint>, mutex=mutex@entry=0x55b15ab6bea8 <LOCK_checkpoint+40>, abstime=abstime@entry=0x146ab23f0bc0) at ./nptl/pthread_cond_wait.c:652
#5  0x000055b1597b1e9b in safe_cond_timedwait (cond=0x55b15ab6be40 <COND_checkpoint>, mp=0x55b15ab6be80 <LOCK_checkpoint>, abstime=abstime@entry=0x146ab23f0bc0, file=file@entry=0x55b15993d128 "/test/11.0_dbg/include/mysql/psi/mysql_thread.h", line=line@entry=1088) at /test/11.0_dbg/mysys/thr_mutex.c:548
#6  0x000055b159350c47 in inline_mysql_cond_timedwait (src_line=115, src_file=0x55b159b539f8 "/test/11.0_dbg/storage/maria/ma_servicethread.c", abstime=0x146ab23f0bc0, mutex=<optimized out>, that=<optimized out>) at /test/11.0_dbg/include/mysql/psi/mysql_thread.h:1088
#7  my_service_thread_sleep (control=control@entry=0x55b15a2462c0 <checkpoint_control>, sleep_time=sleep_time@entry=29000000000) at /test/11.0_dbg/storage/maria/ma_servicethread.c:115
#8  0x000055b1593491c9 in ma_checkpoint_background (arg=0x1e) at /test/11.0_dbg/storage/maria/ma_checkpoint.c:725
#9  0x0000146ab9c5bb43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#10 0x0000146ab9ceda00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
 
Thread 13 (Thread 0x146ab2a5a640 (LWP 1922515)):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x146ab2a59b50, op=137, expected=0, futex_word=0x55b15af8e19c) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x146ab2a59b50, clockid=0, expected=0, futex_word=0x55b15af8e19c) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x55b15af8e19c, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0x146ab2a59b50, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x0000146ab9c5b35d in __pthread_cond_wait_common (abstime=0x146ab2a59b50, clockid=1, mutex=0x55b15af8dbd8, cond=0x55b15af8e170) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_clockwait64 (abstime=0x146ab2a59b50, clockid=1, mutex=0x55b15af8dbd8, cond=0x55b15af8e170) at ./nptl/pthread_cond_wait.c:691
#5  ___pthread_cond_clockwait64 (cond=0x55b15af8e170, mutex=0x55b15af8dbd8, clockid=1, abstime=0x146ab2a59b50) at ./nptl/pthread_cond_wait.c:679
#6  0x000055b15974cf4c in std::__condvar::wait_until (__abs_time=..., __clock=1, __m=..., this=0x55b15af8e170) at /usr/include/c++/11/bits/std_mutex.h:169
#7  std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x55b15af8e170) at /usr/include/c++/11/condition_variable:201
#8  std::condition_variable::wait_until<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x55b15af8e170) at /usr/include/c++/11/condition_variable:111
#9  std::condition_variable::wait_for<long, std::ratio<1l, 1000l> > (__rtime=..., __lock=..., this=0x55b15af8e170) at /usr/include/c++/11/condition_variable:163
#10 tpool::thread_pool_generic::wait_for_tasks (this=this@entry=0x55b15af8dac0, lk=..., thread_data=thread_data@entry=0x55b15af8e170) at /test/11.0_dbg/tpool/tpool_generic.cc:480
#11 0x000055b15974d9af in tpool::thread_pool_generic::get_task (this=this@entry=0x55b15af8dac0, thread_var=thread_var@entry=0x55b15af8e170, t=t@entry=0x146ab2a59bf8) at /test/11.0_dbg/tpool/tpool_generic.cc:533
#12 0x000055b15974dacc in tpool::thread_pool_generic::worker_main (this=0x55b15af8dac0, thread_var=0x55b15af8e170) at /test/11.0_dbg/tpool/tpool_generic.cc:578
#13 0x000055b15974ee3a in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/11/bits/invoke.h:74
#14 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=<optimized out>) at /usr/include/c++/11/bits/invoke.h:96
#15 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:253
#16 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:260
#17 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:211
#18 0x0000146ab9fb42b3 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#19 0x0000146ab9c5bb43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#20 0x0000146ab9ceda00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
 
Thread 12 (Thread 0x146ab2859640 (LWP 1922516)):
#0  __futex_abstimed_wait_common64 (private=-672, cancel=true, abstime=0x146ab2858b50, op=137, expected=0, futex_word=0x55b15af8e218) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=-672, abstime=0x146ab2858b50, clockid=0, expected=0, futex_word=0x55b15af8e218) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x55b15af8e218, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0x146ab2858b50, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x0000146ab9c5b35d in __pthread_cond_wait_common (abstime=0x146ab2858b50, clockid=1, mutex=0x55b15af8dbd8, cond=0x55b15af8e1f0) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_clockwait64 (abstime=0x146ab2858b50, clockid=1, mutex=0x55b15af8dbd8, cond=0x55b15af8e1f0) at ./nptl/pthread_cond_wait.c:691
#5  ___pthread_cond_clockwait64 (cond=0x55b15af8e1f0, mutex=0x55b15af8dbd8, clockid=1, abstime=0x146ab2858b50) at ./nptl/pthread_cond_wait.c:679
#6  0x000055b15974cf4c in std::__condvar::wait_until (__abs_time=..., __clock=1, __m=..., this=0x55b15af8e1f0) at /usr/include/c++/11/bits/std_mutex.h:169
#7  std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x55b15af8e1f0) at /usr/include/c++/11/condition_variable:201
#8  std::condition_variable::wait_until<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x55b15af8e1f0) at /usr/include/c++/11/condition_variable:111
#9  std::condition_variable::wait_for<long, std::ratio<1l, 1000l> > (__rtime=..., __lock=..., this=0x55b15af8e1f0) at /usr/include/c++/11/condition_variable:163
#10 tpool::thread_pool_generic::wait_for_tasks (this=this@entry=0x55b15af8dac0, lk=..., thread_data=thread_data@entry=0x55b15af8e1f0) at /test/11.0_dbg/tpool/tpool_generic.cc:480
#11 0x000055b15974d9af in tpool::thread_pool_generic::get_task (this=this@entry=0x55b15af8dac0, thread_var=thread_var@entry=0x55b15af8e1f0, t=t@entry=0x146ab2858bf8) at /test/11.0_dbg/tpool/tpool_generic.cc:533
#12 0x000055b15974dacc in tpool::thread_pool_generic::worker_main (this=0x55b15af8dac0, thread_var=0x55b15af8e1f0) at /test/11.0_dbg/tpool/tpool_generic.cc:578
#13 0x000055b15974ee3a in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/11/bits/invoke.h:74
#14 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=<optimized out>) at /usr/include/c++/11/bits/invoke.h:96
#15 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:253
#16 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:260
#17 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:211
#18 0x0000146ab9fb42b3 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#19 0x0000146ab9c5bb43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#20 0x0000146ab9ceda00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
 
Thread 11 (Thread 0x146ab21a5640 (LWP 1922521)):
#0  0x0000146ab9c0a21a in __GI___sigtimedwait (set=0x146ab21a4b10, info=0x146ab21a4b90, timeout=0x0) at ../sysdeps/unix/sysv/linux/sigtimedwait.c:61
#1  0x000055b158d35be4 in my_sigwait (code=<synthetic pointer>, sig=0x146ab21a4b0c, set=0x146ab21a4b10) at /test/11.0_dbg/include/my_pthread.h:195
#2  signal_hand (arg=<optimized out>) at /test/11.0_dbg/sql/mysqld.cc:3261
#3  0x0000146ab9c5bb43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#4  0x0000146ab9ceda00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
 
Thread 10 (Thread 0x146ab2c5b640 (LWP 1922514)):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x146ab2c5ab50, op=137, expected=0, futex_word=0x55b15af8e11c) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x146ab2c5ab50, clockid=0, expected=0, futex_word=0x55b15af8e11c) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x55b15af8e11c, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0x146ab2c5ab50, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x0000146ab9c5b35d in __pthread_cond_wait_common (abstime=0x146ab2c5ab50, clockid=1, mutex=0x55b15af8dbd8, cond=0x55b15af8e0f0) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_clockwait64 (abstime=0x146ab2c5ab50, clockid=1, mutex=0x55b15af8dbd8, cond=0x55b15af8e0f0) at ./nptl/pthread_cond_wait.c:691
#5  ___pthread_cond_clockwait64 (cond=0x55b15af8e0f0, mutex=0x55b15af8dbd8, clockid=1, abstime=0x146ab2c5ab50) at ./nptl/pthread_cond_wait.c:679
#6  0x000055b15974cf4c in std::__condvar::wait_until (__abs_time=..., __clock=1, __m=..., this=0x55b15af8e0f0) at /usr/include/c++/11/bits/std_mutex.h:169
#7  std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x55b15af8e0f0) at /usr/include/c++/11/condition_variable:201
#8  std::condition_variable::wait_until<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x55b15af8e0f0) at /usr/include/c++/11/condition_variable:111
#9  std::condition_variable::wait_for<long, std::ratio<1l, 1000l> > (__rtime=..., __lock=..., this=0x55b15af8e0f0) at /usr/include/c++/11/condition_variable:163
#10 tpool::thread_pool_generic::wait_for_tasks (this=this@entry=0x55b15af8dac0, lk=..., thread_data=thread_data@entry=0x55b15af8e0f0) at /test/11.0_dbg/tpool/tpool_generic.cc:480
#11 0x000055b15974d9af in tpool::thread_pool_generic::get_task (this=this@entry=0x55b15af8dac0, thread_var=thread_var@entry=0x55b15af8e0f0, t=t@entry=0x146ab2c5abf8) at /test/11.0_dbg/tpool/tpool_generic.cc:533
#12 0x000055b15974dacc in tpool::thread_pool_generic::worker_main (this=0x55b15af8dac0, thread_var=0x55b15af8e0f0) at /test/11.0_dbg/tpool/tpool_generic.cc:578
#13 0x000055b15974ee3a in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/11/bits/invoke.h:74
#14 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=<optimized out>) at /usr/include/c++/11/bits/invoke.h:96
#15 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:253
#16 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:260
#17 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:211
#18 0x0000146ab9fb42b3 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#19 0x0000146ab9c5bb43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#20 0x0000146ab9ceda00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
 
Thread 9 (Thread 0x146ab2e5c640 (LWP 1922513)):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x146ab2e5bb50, op=137, expected=0, futex_word=0x55b15af8e098) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x146ab2e5bb50, clockid=0, expected=0, futex_word=0x55b15af8e098) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x55b15af8e098, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0x146ab2e5bb50, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x0000146ab9c5b35d in __pthread_cond_wait_common (abstime=0x146ab2e5bb50, clockid=1, mutex=0x55b15af8dbd8, cond=0x55b15af8e070) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_clockwait64 (abstime=0x146ab2e5bb50, clockid=1, mutex=0x55b15af8dbd8, cond=0x55b15af8e070) at ./nptl/pthread_cond_wait.c:691
#5  ___pthread_cond_clockwait64 (cond=0x55b15af8e070, mutex=0x55b15af8dbd8, clockid=1, abstime=0x146ab2e5bb50) at ./nptl/pthread_cond_wait.c:679
#6  0x000055b15974cf4c in std::__condvar::wait_until (__abs_time=..., __clock=1, __m=..., this=0x55b15af8e070) at /usr/include/c++/11/bits/std_mutex.h:169
#7  std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x55b15af8e070) at /usr/include/c++/11/condition_variable:201
#8  std::condition_variable::wait_until<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x55b15af8e070) at /usr/include/c++/11/condition_variable:111
#9  std::condition_variable::wait_for<long, std::ratio<1l, 1000l> > (__rtime=..., __lock=..., this=0x55b15af8e070) at /usr/include/c++/11/condition_variable:163
#10 tpool::thread_pool_generic::wait_for_tasks (this=this@entry=0x55b15af8dac0, lk=..., thread_data=thread_data@entry=0x55b15af8e070) at /test/11.0_dbg/tpool/tpool_generic.cc:480
#11 0x000055b15974d9af in tpool::thread_pool_generic::get_task (this=this@entry=0x55b15af8dac0, thread_var=thread_var@entry=0x55b15af8e070, t=t@entry=0x146ab2e5bbf8) at /test/11.0_dbg/tpool/tpool_generic.cc:533
#12 0x000055b15974dacc in tpool::thread_pool_generic::worker_main (this=0x55b15af8dac0, thread_var=0x55b15af8e070) at /test/11.0_dbg/tpool/tpool_generic.cc:578
#13 0x000055b15974ee3a in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/11/bits/invoke.h:74
#14 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=<optimized out>) at /usr/include/c++/11/bits/invoke.h:96
#15 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:253
#16 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:260
#17 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:211
#18 0x0000146ab9fb42b3 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#19 0x0000146ab9c5bb43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#20 0x0000146ab9ceda00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
 
Thread 8 (Thread 0x146ab305d640 (LWP 1922512)):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x146ab305cb50, op=137, expected=0, futex_word=0x55b15af8e01c) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x146ab305cb50, clockid=0, expected=0, futex_word=0x55b15af8e01c) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x55b15af8e01c, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0x146ab305cb50, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x0000146ab9c5b35d in __pthread_cond_wait_common (abstime=0x146ab305cb50, clockid=1, mutex=0x55b15af8dbd8, cond=0x55b15af8dff0) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_clockwait64 (abstime=0x146ab305cb50, clockid=1, mutex=0x55b15af8dbd8, cond=0x55b15af8dff0) at ./nptl/pthread_cond_wait.c:691
#5  ___pthread_cond_clockwait64 (cond=0x55b15af8dff0, mutex=0x55b15af8dbd8, clockid=1, abstime=0x146ab305cb50) at ./nptl/pthread_cond_wait.c:679
#6  0x000055b15974cf4c in std::__condvar::wait_until (__abs_time=..., __clock=1, __m=..., this=0x55b15af8dff0) at /usr/include/c++/11/bits/std_mutex.h:169
#7  std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x55b15af8dff0) at /usr/include/c++/11/condition_variable:201
#8  std::condition_variable::wait_until<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x55b15af8dff0) at /usr/include/c++/11/condition_variable:111
#9  std::condition_variable::wait_for<long, std::ratio<1l, 1000l> > (__rtime=..., __lock=..., this=0x55b15af8dff0) at /usr/include/c++/11/condition_variable:163
#10 tpool::thread_pool_generic::wait_for_tasks (this=this@entry=0x55b15af8dac0, lk=..., thread_data=thread_data@entry=0x55b15af8dff0) at /test/11.0_dbg/tpool/tpool_generic.cc:480
#11 0x000055b15974d9af in tpool::thread_pool_generic::get_task (this=this@entry=0x55b15af8dac0, thread_var=thread_var@entry=0x55b15af8dff0, t=t@entry=0x146ab305cbf8) at /test/11.0_dbg/tpool/tpool_generic.cc:533
#12 0x000055b15974dacc in tpool::thread_pool_generic::worker_main (this=0x55b15af8dac0, thread_var=0x55b15af8dff0) at /test/11.0_dbg/tpool/tpool_generic.cc:578
#13 0x000055b15974ee3a in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/11/bits/invoke.h:74
#14 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=<optimized out>) at /usr/include/c++/11/bits/invoke.h:96
#15 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:253
#16 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:260
#17 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:211
#18 0x0000146ab9fb42b3 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#19 0x0000146ab9c5bb43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#20 0x0000146ab9ceda00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
 
Thread 7 (Thread 0x146ab3bfd640 (LWP 1922510)):
#0  __futex_abstimed_wait_common64 (private=-672, cancel=true, abstime=0x146ab3bfcb50, op=137, expected=0, futex_word=0x55b15af8df18) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=-672, abstime=0x146ab3bfcb50, clockid=0, expected=0, futex_word=0x55b15af8df18) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x55b15af8df18, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0x146ab3bfcb50, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x0000146ab9c5b35d in __pthread_cond_wait_common (abstime=0x146ab3bfcb50, clockid=1, mutex=0x55b15af8dbd8, cond=0x55b15af8def0) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_clockwait64 (abstime=0x146ab3bfcb50, clockid=1, mutex=0x55b15af8dbd8, cond=0x55b15af8def0) at ./nptl/pthread_cond_wait.c:691
#5  ___pthread_cond_clockwait64 (cond=0x55b15af8def0, mutex=0x55b15af8dbd8, clockid=1, abstime=0x146ab3bfcb50) at ./nptl/pthread_cond_wait.c:679
#6  0x000055b15974cf4c in std::__condvar::wait_until (__abs_time=..., __clock=1, __m=..., this=0x55b15af8def0) at /usr/include/c++/11/bits/std_mutex.h:169
#7  std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x55b15af8def0) at /usr/include/c++/11/condition_variable:201
#8  std::condition_variable::wait_until<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x55b15af8def0) at /usr/include/c++/11/condition_variable:111
#9  std::condition_variable::wait_for<long, std::ratio<1l, 1000l> > (__rtime=..., __lock=..., this=0x55b15af8def0) at /usr/include/c++/11/condition_variable:163
#10 tpool::thread_pool_generic::wait_for_tasks (this=this@entry=0x55b15af8dac0, lk=..., thread_data=thread_data@entry=0x55b15af8def0) at /test/11.0_dbg/tpool/tpool_generic.cc:480
#11 0x000055b15974d9af in tpool::thread_pool_generic::get_task (this=this@entry=0x55b15af8dac0, thread_var=thread_var@entry=0x55b15af8def0, t=t@entry=0x146ab3bfcbf8) at /test/11.0_dbg/tpool/tpool_generic.cc:533
#12 0x000055b15974dacc in tpool::thread_pool_generic::worker_main (this=0x55b15af8dac0, thread_var=0x55b15af8def0) at /test/11.0_dbg/tpool/tpool_generic.cc:578
#13 0x000055b15974ee3a in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/11/bits/invoke.h:74
#14 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=<optimized out>) at /usr/include/c++/11/bits/invoke.h:96
#15 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:253
#16 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:260
#17 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:211
#18 0x0000146ab9fb42b3 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#19 0x0000146ab9c5bb43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#20 0x0000146ab9ceda00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
 
Thread 6 (Thread 0x146ab86a1640 (LWP 1922479)):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x146ab86a0be0, op=393, expected=0, futex_word=0x55b15a25bcb0 <buf_pool+17584>) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x146ab86a0be0, clockid=2072, expected=0, futex_word=0x55b15a25bcb0 <buf_pool+17584>) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x55b15a25bcb0 <buf_pool+17584>, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x146ab86a0be0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x0000146ab9c5af1b in __pthread_cond_wait_common (abstime=0x146ab86a0be0, clockid=0, mutex=0x55b15a25bba8 <buf_pool+17320>, cond=0x55b15a25bc88 <buf_pool+17544>) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_timedwait64 (cond=cond@entry=0x55b15a25bc88 <buf_pool+17544>, mutex=mutex@entry=0x55b15a25bba8 <buf_pool+17320>, abstime=abstime@entry=0x146ab86a0be0) at ./nptl/pthread_cond_wait.c:652
#5  0x000055b1597b1e9b in safe_cond_timedwait (cond=0x55b15a25bc88 <buf_pool+17544>, mp=0x55b15a25bb80 <buf_pool+17280>, abstime=0x146ab86a0be0, file=0x55b159bcf110 "/test/11.0_dbg/storage/innobase/buf/buf0flu.cc", line=2328) at /test/11.0_dbg/mysys/thr_mutex.c:548
#6  0x000055b15966fa88 in buf_flush_page_cleaner () at /test/11.0_dbg/storage/innobase/buf/buf0flu.cc:2328
#7  0x000055b1596710a7 in std::__invoke_impl<void, void (*)()> (__f=<optimized out>) at /usr/include/c++/11/bits/invoke.h:60
#8  std::__invoke<void (*)()> (__fn=<optimized out>) at /usr/include/c++/11/bits/invoke.h:96
#9  std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul> (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:253
#10 std::thread::_Invoker<std::tuple<void (*)()> >::operator() (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:260
#11 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:211
#12 0x0000146ab9fb42b3 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#13 0x0000146ab9c5bb43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#14 0x0000146ab9ceda00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
 
Thread 5 (Thread 0x146ab3fff640 (LWP 1922506)):
#0  __futex_abstimed_wait_common64 (private=1679967130, cancel=true, abstime=0x146ab3ffeb50, op=137, expected=0, futex_word=0x55b15af8de1c) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=1679967130, abstime=0x146ab3ffeb50, clockid=0, expected=0, futex_word=0x55b15af8de1c) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x55b15af8de1c, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0x146ab3ffeb50, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x0000146ab9c5b35d in __pthread_cond_wait_common (abstime=0x146ab3ffeb50, clockid=1, mutex=0x55b15af8dbd8, cond=0x55b15af8ddf0) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_clockwait64 (abstime=0x146ab3ffeb50, clockid=1, mutex=0x55b15af8dbd8, cond=0x55b15af8ddf0) at ./nptl/pthread_cond_wait.c:691
#5  ___pthread_cond_clockwait64 (cond=0x55b15af8ddf0, mutex=0x55b15af8dbd8, clockid=1, abstime=0x146ab3ffeb50) at ./nptl/pthread_cond_wait.c:679
#6  0x000055b15974cf4c in std::__condvar::wait_until (__abs_time=..., __clock=1, __m=..., this=0x55b15af8ddf0) at /usr/include/c++/11/bits/std_mutex.h:169
#7  std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x55b15af8ddf0) at /usr/include/c++/11/condition_variable:201
#8  std::condition_variable::wait_until<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x55b15af8ddf0) at /usr/include/c++/11/condition_variable:111
#9  std::condition_variable::wait_for<long, std::ratio<1l, 1000l> > (__rtime=..., __lock=..., this=0x55b15af8ddf0) at /usr/include/c++/11/condition_variable:163
#10 tpool::thread_pool_generic::wait_for_tasks (this=this@entry=0x55b15af8dac0, lk=..., thread_data=thread_data@entry=0x55b15af8ddf0) at /test/11.0_dbg/tpool/tpool_generic.cc:480
#11 0x000055b15974d9af in tpool::thread_pool_generic::get_task (this=this@entry=0x55b15af8dac0, thread_var=thread_var@entry=0x55b15af8ddf0, t=t@entry=0x146ab3ffebf8) at /test/11.0_dbg/tpool/tpool_generic.cc:533
#12 0x000055b15974dacc in tpool::thread_pool_generic::worker_main (this=0x55b15af8dac0, thread_var=0x55b15af8ddf0) at /test/11.0_dbg/tpool/tpool_generic.cc:578
#13 0x000055b15974ee3a in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/11/bits/invoke.h:74
#14 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=<optimized out>) at /usr/include/c++/11/bits/invoke.h:96
#15 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:253
#16 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:260
#17 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:211
#18 0x0000146ab9fb42b3 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#19 0x0000146ab9c5bb43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#20 0x0000146ab9ceda00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
 
Thread 4 (Thread 0x146ab325e640 (LWP 1922511)):
#0  __futex_abstimed_wait_common64 (private=-672, cancel=true, abstime=0x146ab325db50, op=137, expected=0, futex_word=0x55b15af8df9c) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=-672, abstime=0x146ab325db50, clockid=0, expected=0, futex_word=0x55b15af8df9c) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x55b15af8df9c, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0x146ab325db50, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x0000146ab9c5b35d in __pthread_cond_wait_common (abstime=0x146ab325db50, clockid=1, mutex=0x55b15af8dbd8, cond=0x55b15af8df70) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_clockwait64 (abstime=0x146ab325db50, clockid=1, mutex=0x55b15af8dbd8, cond=0x55b15af8df70) at ./nptl/pthread_cond_wait.c:691
#5  ___pthread_cond_clockwait64 (cond=0x55b15af8df70, mutex=0x55b15af8dbd8, clockid=1, abstime=0x146ab325db50) at ./nptl/pthread_cond_wait.c:679
#6  0x000055b15974cf4c in std::__condvar::wait_until (__abs_time=..., __clock=1, __m=..., this=0x55b15af8df70) at /usr/include/c++/11/bits/std_mutex.h:169
#7  std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x55b15af8df70) at /usr/include/c++/11/condition_variable:201
#8  std::condition_variable::wait_until<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x55b15af8df70) at /usr/include/c++/11/condition_variable:111
#9  std::condition_variable::wait_for<long, std::ratio<1l, 1000l> > (__rtime=..., __lock=..., this=0x55b15af8df70) at /usr/include/c++/11/condition_variable:163
#10 tpool::thread_pool_generic::wait_for_tasks (this=this@entry=0x55b15af8dac0, lk=..., thread_data=thread_data@entry=0x55b15af8df70) at /test/11.0_dbg/tpool/tpool_generic.cc:480
#11 0x000055b15974d9af in tpool::thread_pool_generic::get_task (this=this@entry=0x55b15af8dac0, thread_var=thread_var@entry=0x55b15af8df70, t=t@entry=0x146ab325dbf8) at /test/11.0_dbg/tpool/tpool_generic.cc:533
#12 0x000055b15974dacc in tpool::thread_pool_generic::worker_main (this=0x55b15af8dac0, thread_var=0x55b15af8df70) at /test/11.0_dbg/tpool/tpool_generic.cc:578
#13 0x000055b15974ee3a in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/11/bits/invoke.h:74
#14 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=<optimized out>) at /usr/include/c++/11/bits/invoke.h:96
#15 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:253
#16 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:260
#17 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:211
#18 0x0000146ab9fb42b3 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#19 0x0000146ab9c5bb43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#20 0x0000146ab9ceda00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
 
Thread 3 (Thread 0x146ab9818640 (LWP 1922475)):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x146ab9817c10, op=393, expected=0, futex_word=0x55b15abb248c <COND_timer+44>) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x146ab9817c10, clockid=0, expected=0, futex_word=0x55b15abb248c <COND_timer+44>) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x55b15abb248c <COND_timer+44>, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x146ab9817c10, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x0000146ab9c5af1b in __pthread_cond_wait_common (abstime=0x146ab9817c10, clockid=0, mutex=0x55b15abb24c8 <LOCK_timer+40>, cond=0x55b15abb2460 <COND_timer>) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_timedwait64 (cond=cond@entry=0x55b15abb2460 <COND_timer>, mutex=mutex@entry=0x55b15abb24c8 <LOCK_timer+40>, abstime=abstime@entry=0x146ab9817c10) at ./nptl/pthread_cond_wait.c:652
#5  0x000055b1597b1e9b in safe_cond_timedwait (cond=cond@entry=0x55b15abb2460 <COND_timer>, mp=mp@entry=0x55b15abb24a0 <LOCK_timer>, abstime=abstime@entry=0x146ab9817c10, file=file@entry=0x55b15993d128 "/test/11.0_dbg/include/mysql/psi/mysql_thread.h", line=line@entry=1088) at /test/11.0_dbg/mysys/thr_mutex.c:548
#6  0x000055b1597b244d in inline_mysql_cond_timedwait (src_line=321, src_file=0x55b159bf9030 "/test/11.0_dbg/mysys/thr_timer.c", abstime=0x146ab9817c10, mutex=0x55b15abb24a0 <LOCK_timer>, that=0x55b15abb2460 <COND_timer>) at /test/11.0_dbg/include/mysql/psi/mysql_thread.h:1088
#7  timer_handler (arg=<optimized out>) at /test/11.0_dbg/mysys/thr_timer.c:321
#8  0x0000146ab9c5bb43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x0000146ab9ceda00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
 
Thread 2 (Thread 0x146ab3dfe640 (LWP 1922507)):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x146ab3dfdb50, op=137, expected=0, futex_word=0x55b15af8de98) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x146ab3dfdb50, clockid=0, expected=0, futex_word=0x55b15af8de98) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x55b15af8de98, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0x146ab3dfdb50, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x0000146ab9c5b35d in __pthread_cond_wait_common (abstime=0x146ab3dfdb50, clockid=1, mutex=0x55b15af8dbd8, cond=0x55b15af8de70) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_clockwait64 (abstime=0x146ab3dfdb50, clockid=1, mutex=0x55b15af8dbd8, cond=0x55b15af8de70) at ./nptl/pthread_cond_wait.c:691
#5  ___pthread_cond_clockwait64 (cond=0x55b15af8de70, mutex=0x55b15af8dbd8, clockid=1, abstime=0x146ab3dfdb50) at ./nptl/pthread_cond_wait.c:679
#6  0x000055b15974cf4c in std::__condvar::wait_until (__abs_time=..., __clock=1, __m=..., this=0x55b15af8de70) at /usr/include/c++/11/bits/std_mutex.h:169
#7  std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x55b15af8de70) at /usr/include/c++/11/condition_variable:201
#8  std::condition_variable::wait_until<std::chrono::duration<long, std::ratio<1l, 1000000000l> > > (__atime=..., __lock=..., this=0x55b15af8de70) at /usr/include/c++/11/condition_variable:111
#9  std::condition_variable::wait_for<long, std::ratio<1l, 1000l> > (__rtime=..., __lock=..., this=0x55b15af8de70) at /usr/include/c++/11/condition_variable:163
#10 tpool::thread_pool_generic::wait_for_tasks (this=this@entry=0x55b15af8dac0, lk=..., thread_data=thread_data@entry=0x55b15af8de70) at /test/11.0_dbg/tpool/tpool_generic.cc:480
#11 0x000055b15974d9af in tpool::thread_pool_generic::get_task (this=this@entry=0x55b15af8dac0, thread_var=thread_var@entry=0x55b15af8de70, t=t@entry=0x146ab3dfdbf8) at /test/11.0_dbg/tpool/tpool_generic.cc:533
#12 0x000055b15974dacc in tpool::thread_pool_generic::worker_main (this=0x55b15af8dac0, thread_var=0x55b15af8de70) at /test/11.0_dbg/tpool/tpool_generic.cc:578
#13 0x000055b15974ee3a in std::__invoke_impl<void, void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__t=<optimized out>, __f=<optimized out>) at /usr/include/c++/11/bits/invoke.h:74
#14 std::__invoke<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> (__fn=<optimized out>) at /usr/include/c++/11/bits/invoke.h:96
#15 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::_M_invoke<0ul, 1ul, 2ul> (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:253
#16 std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> >::operator() (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:260
#17 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (tpool::thread_pool_generic::*)(tpool::worker_data*), tpool::thread_pool_generic*, tpool::worker_data*> > >::_M_run (this=<optimized out>) at /usr/include/c++/11/bits/std_thread.h:211
#18 0x0000146ab9fb42b3 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#19 0x0000146ab9c5bb43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#20 0x0000146ab9ceda00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
 
Thread 1 (Thread 0x146ab9917940 (LWP 1922463)):
#0  0x0000000000000121 in ?? ()
#1  0x000055b1592dff70 in Event_queue::empty_queue (this=this@entry=0x55b15b28f1f0) at /test/11.0_dbg/sql/event_queue.cc:529
#2  0x000055b1592e0116 in Event_queue::deinit_queue (this=this@entry=0x55b15b28f1f0) at /test/11.0_dbg/sql/event_queue.cc:174
#3  0x000055b1592e014d in Event_queue::~Event_queue (this=this@entry=0x55b15b28f1f0, __in_chrg=<optimized out>) at /test/11.0_dbg/sql/event_queue.cc:113
#4  0x000055b158f953bb in Events::deinit () at /test/11.0_dbg/sql/events.cc:1004
#5  0x000055b158d3861d in close_connections () at /test/11.0_dbg/sql/mysqld.cc:1786
#6  0x000055b158d40d9d in mysqld_main (argc=<optimized out>, argv=<optimized out>) at /test/11.0_dbg/sql/mysqld.cc:6045
#7  0x000055b158d34c66 in main (argc=<optimized out>, argv=<optimized out>) at /test/11.0_dbg/sql/main.cc:34
 
 - saving '/test/MD180223-mariadb-11.0.1-linux-x86_64-dbg/mysql-test/var/log/main.test-innodb/' to '/test/MD180223-mariadb-11.0.1-linux-x86_64-dbg/mysql-test/var/log/main.test-innodb/'
--------------------------------------------------------------------------
The servers were restarted 0 times
Spent 0.000 of 9 seconds executing testcases
 
Failure: Failed 1/1 tests, 0.00% were successful.
 
Failing test(s): main.test
 
The log files in var/log may give you some hint of what went wrong.
 
If you want to report this error, please read first the documentation
at http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html
 
mysql-test-run: *** ERROR: there were failing test cases

Comment by Roel Van de Paar [ 2023-04-07 ]

The outcomes of this bug are very varied. Firstly, it may be sporadic, depending on the instance/setup. Secondly, using Ubuntu 22 vs Ubuntu 20 seems to make a difference. Thirdly, using MTR vs CLI makes a difference. Fourthly, the outcome can vary depending on whether --error clauses are inserted into the testcase or not.

At times the binary will just terminate without any message in the error log and without any coredump (including in MTR).

The issue is confirmed still present in 11.1 at revision 2b61ff8f2221745f0a96855a0feb0825c426f993 build today. The issue can also be partially (no core, binary exits) reproduced on Ubuntu 20 but it is harder than on Ubuntu 22.

Generated at Thu Feb 08 09:31:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.