Bug #118672 do dml sql crash
Submitted: 16 Jul 9:31 Modified: 17 Jul 0:55
Reporter: Alice Alice Email Updates:
Status: Analyzing Impact on me:
None 
Category:MySQL Server: DML Severity:S3 (Non-critical)
Version:8.0.41 OS:Any
Assigned to: MySQL Verification Team CPU Architecture:Any

[16 Jul 9:31] Alice Alice
Description:
InnoDB: Cannot reset all values for monitor counter buffer_page_written_other while it is on. Please turn it off and retry.
InnoDB: Cannot reset all values for monitor counter buffer_page_written_on_log_no_waits while it is on. Please turn it off and retry.
InnoDB: Cannot reset all values for monitor counter buffer_page_written_on_log_waits while it is on. Please turn it off and retry.
InnoDB: Cannot reset all values for monitor counter buffer_page_written_on_log_wait_loops while it is on. Please turn it off and retry.
2025-07-14T03:13:50.643892Z 56 [Note] [MY-012193] [InnoDB] Tablespace ID already maps to: './test/t12.ibd', rename ignored.
2025-07-14T03:13:50.644609Z 92 [Note] [MY-013006] [InnoDB] Stopping purge
2025-07-14T03:13:50.657176Z 68 [ERROR] [MY-010839] [Server] MYSQL_BIN_LOG::purge_logs was called with file ./K4b/b0X;6<D` not listed in the index.
2025-07-14T03:13:50.660516Z 92 [Note] [MY-013008] [InnoDB] Resuming purge
2025-07-14T03:13:50.660559Z 92 [Note] [MY-012841] [InnoDB] Sync to disk of `test`.`t20` started.
2025-07-14T03:13:50.660583Z 92 [Note] [MY-013006] [InnoDB] Stopping purge
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
2025-07-14T03:13:50Z UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
BuildID[sha1]=4ba5440e99da734cdfa70c6ab32f68c6de24ca51
Thread pointer: 0x7f55c8000f80
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7f566efdebf0 thread_stack 0x100000
/sda/percona//8.0_source/sql/bin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x2e) [0x2097a7e]
/sda/percona//8.0_source/sql/bin/mysqld(print_fatal_signal(int)+0x35f) [0xfdb1cf]
/sda/percona//8.0_source/sql/bin/mysqld(handle_fatal_signal+0xa5) [0xfdb285]
/usr/lib64/libpthread.so.0(+0x135a0) [0x7f578e4495a0]
/usr/lib64/libc.so.6(gsignal+0x10b) [0x7f578d53578b]
/usr/lib64/libc.so.6(abort+0x151) [0x7f578d536ab1]
/data/workspace/hwsql_percona_crash_recovery_80_dev_source/MySQL/percona/percona-qa/libs/gcc10.3/lib64/libstdc++.so.6(+0x9a817) [0x7f578d8ed817]
/data/workspace/hwsql_percona_crash_recovery_80_dev_source/MySQL/percona/percona-qa/libs/gcc10.3/lib64/libstdc++.so.6(+0xa5c56) [0x7f578d8f8c56]
/data/workspace/hwsql_percona_crash_recovery_80_dev_source/MySQL/percona/percona-qa/libs/gcc10.3/lib64/libstdc++.so.6(+0xa5cc1) [0x7f578d8f8cc1]
/data/workspace/hwsql_percona_crash_recovery_80_dev_source/MySQL/percona/percona-qa/libs/gcc10.3/lib64/libstdc++.so.6(+0xa5f54) [0x7f578d8f8f54]
/data/workspace/hwsql_percona_crash_recovery_80_dev_source/MySQL/percona/percona-qa/libs/gcc10.3/lib64/libstdc++.so.6(+0x9a45a) [0x7f578d8ed45a]
/data/workspace/hwsql_percona_crash_recovery_80_dev_source/MySQL/percona/percona-qa/libs/gcc10.3/lib64/libstdc++.so.6(std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&)+0x61) [0x7f578d93c371]
/sda/percona//8.0_source/sql/bin/mysqld() [0xe95f23]
/sda/percona//8.0_source/sql/bin/mysqld(plugin_lock_by_name(THD*, MYSQL_LEX_CSTRING const&, int)+0x4e) [0xe9624e]
/sda/percona//8.0_source/sql/bin/mysqld(ha_resolve_by_name(THD*, MYSQL_LEX_CSTRING const*, bool)+0x53) [0x10dc4e3]
/sda/percona//8.0_source/sql/bin/mysqld(get_secondary_engine_handlerton(LEX const*)+0x4e) [0xece0be]
/sda/percona//8.0_source/sql/bin/mysqld(Sql_cmd_dml::execute(THD*)+0x2dc) [0xecea6c]
/sda/percona//8.0_source/sql/bin/mysqld(mysql_execute_command(THD*, bool)+0xb0f) [0xe7706f]
/sda/percona//8.0_source/sql/bin/mysqld(dispatch_sql_command(THD*, Parser_state*)+0x4f4) [0xe7acd4]
/sda/percona//8.0_source/sql/bin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0xd24) [0xe7bf94]
/sda/percona//8.0_source/sql/bin/mysqld(do_command(THD*)+0x1fe) [0xe7e39e]
/sda/percona//8.0_source/sql/bin/mysqld() [0xfcbca8]
/sda/percona//8.0_source/sql/bin/mysqld() [0x2710ec5]
/usr/lib64/libpthread.so.0(+0x8f3b) [0x7f578e43ef3b]
/usr/lib64/libc.so.6(clone+0x40) [0x7f578d5f4840]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f55c80411f0): SELECT c1 FROM t14 WHERE (c1) IN (SELECT * FROM t12)
Connection ID (thread ID): 91
Status: NOT_KILLED

the stack:
(gdb) bt
#0  0x00007f578e446281 in pthread_kill () from /usr/lib64/libpthread.so.0
#1  0x0000000000fdb26d in handle_fatal_signal ()
#2  <signal handler called>
#3  0x00007f578d53578b in raise () from /usr/lib64/libc.so.6
#4  0x00007f578d536ab1 in abort () from /usr/lib64/libc.so.6
#5  0x00007f578d8ed817 in __gnu_cxx::__verbose_terminate_handler() [clone .cold] () from /data/workspace/hwsql_percona_crash_recovery_80_dev_source/MySQL/percona/percona-qa/libs/gcc10.3/lib64/libstdc++.so.6
#6  0x00007f578d8f8c56 in __cxxabiv1::__terminate(void (*)()) () from /data/workspace/hwsql_percona_crash_recovery_80_dev_source/MySQL/percona/percona-qa/libs/gcc10.3/lib64/libstdc++.so.6
#7  0x00007f578d8f8cc1 in std::terminate() () from /data/workspace/hwsql_percona_crash_recovery_80_dev_source/MySQL/percona/percona-qa/libs/gcc10.3/lib64/libstdc++.so.6
#8  0x00007f578d8f8f54 in __cxa_throw () from /data/workspace/hwsql_percona_crash_recovery_80_dev_source/MySQL/percona/percona-qa/libs/gcc10.3/lib64/libstdc++.so.6
#9  0x00007f578d8ed45a in operator new(unsigned long) [clone .cold] () from /data/workspace/hwsql_percona_crash_recovery_80_dev_source/MySQL/percona/percona-qa/libs/gcc10.3/lib64/libstdc++.so.6
#10 0x00007f578d93c371 in std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) ()
   from /data/workspace/hwsql_percona_crash_recovery_80_dev_source/MySQL/percona/percona-qa/libs/gcc10.3/lib64/libstdc++.so.6
#11 0x0000000000e95f23 in plugin_find_internal(MYSQL_LEX_CSTRING const&, int) ()
#12 0x0000000000e9624e in plugin_lock_by_name(THD*, MYSQL_LEX_CSTRING const&, int) ()
#13 0x00000000010dc4e3 in ha_resolve_by_name(THD*, MYSQL_LEX_CSTRING const*, bool) ()
#14 0x0000000000ece0be in get_secondary_engine_handlerton(LEX const*) ()
#15 0x0000000000ecea6c in Sql_cmd_dml::execute(THD*) ()
#16 0x0000000000e7706f in mysql_execute_command(THD*, bool) ()
#17 0x0000000000e7acd4 in dispatch_sql_command(THD*, Parser_state*) ()
#18 0x0000000000e7bf94 in dispatch_command(THD*, COM_DATA const*, enum_server_command) ()
#19 0x0000000000e7e39e in do_command(THD*) ()
#20 0x0000000000fcbca8 in handle_connection ()
#21 0x0000000002710ec5 in pfs_spawn_thread ()
#22 0x00007f578e43ef3b in ?? () from /usr/lib64/libpthread.so.0
#23 0x00007f578d5f4840 in clone () from /usr/lib64/libc.so.6
(gdb) 

How to repeat:
use pstress tool concurren run ddl and dml

Suggested fix:
no suggest