Bug #115847 Mysql Server memory trap
Submitted: 16 Aug 2:35 Modified: 16 Aug 9:46
Reporter: guo liu Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:8.0.27 OS:CentOS
Assigned to: CPU Architecture:x86
Tags: assertion failure, docker started, memory trap

[16 Aug 2:35] guo liu
Description:
2024-08-14T23:15:16.611788Z 3269771 [ERROR] [MY-013183] [InnoDB] Assertion failure: buf0buf.h:1203:m_space != nullptr thread 139824242398976
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
23:15:17 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x7f2ba223d810
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 = 7f2b5e4c8d90 thread_stack 0x100000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x3d) [0x5573b29c6a5d]
/usr/sbin/mysqld(handle_fatal_signal+0x32b) [0x5573b1a5769b]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730) [0x7f2c86914730]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x10b) [0x7f2c8602a7bb]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x121) [0x7f2c86015535]
/usr/sbin/mysqld(+0xee192b) [0x5573b17a892b]
/usr/sbin/mysqld(buf_page_t::was_stale() const+0x88) [0x5573b2cdfbd8]
/usr/sbin/mysqld(Buf_fetch_normal::get(buf_block_t*&)+0x3f) [0x5573b2ceed7f]
/usr/sbin/mysqld(Buf_fetch<Buf_fetch_normal>::single_page()+0x52) [0x5573b2cef392]
/usr/sbin/mysqld(buf_page_get_gen(page_id_t const&, page_size_t const&, unsigned long, buf_block_t*, Page_fetch, char const*, unsigned long, mtr_t*, bool)+0x1cd) [0x5573b2cefbed]
/usr/sbin/mysqld(btr_cur_search_to_nth_level(dict_index_t*, unsigned long, dtuple_t const*, page_cur_mode_t, unsigned long, btr_cur_t*, unsigned long, char const*, unsigned long, mtr_t*)+0x605) [0x5573b2cce1a5]
/usr/sbin/mysqld(Row_sel_get_clust_rec_for_mysql::operator()(row_prebuilt_t*, dict_index_t*, unsigned char const*, que_thr_t*, unsigned char const**, unsigned long**, mem_block_info_t**, dtuple_t const**, mtr_t*, lob::undo_vers_t*)+0x114) [0x5573b2bf3404]
/usr/sbin/mysqld(row_search_mvcc(unsigned char*, page_cur_mode_t, row_prebuilt_t*, unsigned long, unsigned long)+0x2803) [0x5573b2bfd5f3]
/usr/sbin/mysqld(ha_innobase::index_read(unsigned char*, unsigned char const*, unsigned int, ha_rkey_function)+0x331) [0x5573b2aae201]
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
23:15:17 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x7f2ba223d810
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 = 7f2b5e4c8d90 thread_stack 0x100000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x3d) [0x5573b29c6a5d]
/usr/sbin/mysqld(handle_fatal_signal+0x32b) [0x5573b1a5769b]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730) [0x7f2c86914730]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x10b) [0x7f2c8602a7bb]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x121) [0x7f2c86015535]
/usr/sbin/mysqld(+0xee192b) [0x5573b17a892b]
/usr/sbin/mysqld(buf_page_t::was_stale() const+0x88) [0x5573b2cdfbd8]
/usr/sbin/mysqld(Buf_fetch_normal::get(buf_block_t*&)+0x3f) [0x5573b2ceed7f]
/usr/sbin/mysqld(Buf_fetch<Buf_fetch_normal>::single_page()+0x52) [0x5573b2cef392]
/usr/sbin/mysqld(buf_page_get_gen(page_id_t const&, page_size_t const&, unsigned long, buf_block_t*, Page_fetch, char const*, unsigned long, mtr_t*, bool)+0x1cd) [0x5573b2cefbed]
/usr/sbin/mysqld(btr_cur_search_to_nth_level(dict_index_t*, unsigned long, dtuple_t const*, page_cur_mode_t, unsigned long, btr_cur_t*, unsigned long, char const*, unsigned long, mtr_t*)+0x605) [0x5573b2cce1a5]
/usr/sbin/mysqld(Row_sel_get_clust_rec_for_mysql::operator()(row_prebuilt_t*, dict_index_t*, unsigned char const*, que_thr_t*, unsigned char const**, unsigned long**, mem_block_info_t**, dtuple_t const**, mtr_t*, lob::undo_vers_t*)+0x114) [0x5573b2bf3404]
/usr/sbin/mysqld(row_search_mvcc(unsigned char*, page_cur_mode_t, row_prebuilt_t*, unsigned long, unsigned long)+0x2803) [0x5573b2bfd5f3]
/usr/sbin/mysqld(ha_innobase::index_read(unsigned char*, unsigned char const*, unsigned int, ha_rkey_function)+0x331) [0x5573b2aae201]
/usr/sbin/mysqld(handler::ha_index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function)+0x379) [0x5573b1b631c9]
/usr/sbin/mysqld(RefIterator<false>::Read()+0xc1) [0x5573b18d1dc1]
/usr/sbin/mysqld(FilterIterator::Read()+0x14) [0x5573b1de74d4]
/usr/sbin/mysqld(NestedLoopIterator::Read()+0xee) [0x5573b1de76ce]
/usr/sbin/mysqld(AggregateIterator::Read()+0x28a) [0x5573b1de92ca]
/usr/sbin/mysqld(Query_expression::ExecuteIteratorQuery(THD*)+0x3e3) [0x5573b19dcbb3]
/usr/sbin/mysqld(Query_expression::execute(THD*)+0x2c) [0x5573b19dcd9c]
/usr/sbin/mysqld(Sql_cmd_dml::execute(THD*)+0x2e5) [0x5573b196eef5]
/usr/sbin/mysqld(mysql_execute_command(THD*, bool)+0xaaf) [0x5573b19105df]
/usr/sbin/mysqld(dispatch_sql_command(THD*, Parser_state*)+0x42f) [0x5573b191512f]
/usr/sbin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x1ff9) [0x5573b1917609]
/usr/sbin/mysqld(do_command(THD*)+0x19c) [0x5573b191857c]
/usr/sbin/mysqld(+0x1181960) [0x5573b1a48960]
/usr/sbin/mysqld(+0x2645ae4) [0x5573b2f0cae4]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7fa3) [0x7f2c86909fa3]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f2c860ec4cf]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f2ba005c088): SELECT COUNT(*) FROM ip_block_distribution d LEFT JOIN ip_block_info i ON d.ip_block_id = i.id WHERE (d.distribution_object = '582bdd1a7c964d9a914566c3213f1fd0') AND i.`block_type` = 1 AND i.closed_loop_status IN (0, 1)
Connection ID (thread ID): 3269771
Status: NOT_KILLED

How to repeat:
2024-08-14T23:15:16.611788Z 3269771 [ERROR] [MY-013183] [InnoDB] Assertion failure: buf0buf.h:1203:m_space != nullptr thread 139824242398976
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
23:15:17 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x7f2ba223d810
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 = 7f2b5e4c8d90 thread_stack 0x100000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x3d) [0x5573b29c6a5d]
/usr/sbin/mysqld(handle_fatal_signal+0x32b) [0x5573b1a5769b]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730) [0x7f2c86914730]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x10b) [0x7f2c8602a7bb]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x121) [0x7f2c86015535]
/usr/sbin/mysqld(+0xee192b) [0x5573b17a892b]
/usr/sbin/mysqld(buf_page_t::was_stale() const+0x88) [0x5573b2cdfbd8]
/usr/sbin/mysqld(Buf_fetch_normal::get(buf_block_t*&)+0x3f) [0x5573b2ceed7f]
/usr/sbin/mysqld(Buf_fetch<Buf_fetch_normal>::single_page()+0x52) [0x5573b2cef392]
/usr/sbin/mysqld(buf_page_get_gen(page_id_t const&, page_size_t const&, unsigned long, buf_block_t*, Page_fetch, char const*, unsigned long, mtr_t*, bool)+0x1cd) [0x5573b2cefbed]
/usr/sbin/mysqld(btr_cur_search_to_nth_level(dict_index_t*, unsigned long, dtuple_t const*, page_cur_mode_t, unsigned long, btr_cur_t*, unsigned long, char const*, unsigned long, mtr_t*)+0x605) [0x5573b2cce1a5]
/usr/sbin/mysqld(Row_sel_get_clust_rec_for_mysql::operator()(row_prebuilt_t*, dict_index_t*, unsigned char const*, que_thr_t*, unsigned char const**, unsigned long**, mem_block_info_t**, dtuple_t const**, mtr_t*, lob::undo_vers_t*)+0x114) [0x5573b2bf3404]
/usr/sbin/mysqld(row_search_mvcc(unsigned char*, page_cur_mode_t, row_prebuilt_t*, unsigned long, unsigned long)+0x2803) [0x5573b2bfd5f3]
/usr/sbin/mysqld(ha_innobase::index_read(unsigned char*, unsigned char const*, unsigned int, ha_rkey_function)+0x331) [0x5573b2aae201]
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
23:15:17 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x7f2ba223d810
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 = 7f2b5e4c8d90 thread_stack 0x100000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x3d) [0x5573b29c6a5d]
/usr/sbin/mysqld(handle_fatal_signal+0x32b) [0x5573b1a5769b]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730) [0x7f2c86914730]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x10b) [0x7f2c8602a7bb]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x121) [0x7f2c86015535]
/usr/sbin/mysqld(+0xee192b) [0x5573b17a892b]
/usr/sbin/mysqld(buf_page_t::was_stale() const+0x88) [0x5573b2cdfbd8]
/usr/sbin/mysqld(Buf_fetch_normal::get(buf_block_t*&)+0x3f) [0x5573b2ceed7f]
/usr/sbin/mysqld(Buf_fetch<Buf_fetch_normal>::single_page()+0x52) [0x5573b2cef392]
/usr/sbin/mysqld(buf_page_get_gen(page_id_t const&, page_size_t const&, unsigned long, buf_block_t*, Page_fetch, char const*, unsigned long, mtr_t*, bool)+0x1cd) [0x5573b2cefbed]
/usr/sbin/mysqld(btr_cur_search_to_nth_level(dict_index_t*, unsigned long, dtuple_t const*, page_cur_mode_t, unsigned long, btr_cur_t*, unsigned long, char const*, unsigned long, mtr_t*)+0x605) [0x5573b2cce1a5]
/usr/sbin/mysqld(Row_sel_get_clust_rec_for_mysql::operator()(row_prebuilt_t*, dict_index_t*, unsigned char const*, que_thr_t*, unsigned char const**, unsigned long**, mem_block_info_t**, dtuple_t const**, mtr_t*, lob::undo_vers_t*)+0x114) [0x5573b2bf3404]
/usr/sbin/mysqld(row_search_mvcc(unsigned char*, page_cur_mode_t, row_prebuilt_t*, unsigned long, unsigned long)+0x2803) [0x5573b2bfd5f3]
/usr/sbin/mysqld(ha_innobase::index_read(unsigned char*, unsigned char const*, unsigned int, ha_rkey_function)+0x331) [0x5573b2aae201]
/usr/sbin/mysqld(handler::ha_index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function)+0x379) [0x5573b1b631c9]
/usr/sbin/mysqld(RefIterator<false>::Read()+0xc1) [0x5573b18d1dc1]
/usr/sbin/mysqld(FilterIterator::Read()+0x14) [0x5573b1de74d4]
/usr/sbin/mysqld(NestedLoopIterator::Read()+0xee) [0x5573b1de76ce]
/usr/sbin/mysqld(AggregateIterator::Read()+0x28a) [0x5573b1de92ca]
/usr/sbin/mysqld(Query_expression::ExecuteIteratorQuery(THD*)+0x3e3) [0x5573b19dcbb3]
/usr/sbin/mysqld(Query_expression::execute(THD*)+0x2c) [0x5573b19dcd9c]
/usr/sbin/mysqld(Sql_cmd_dml::execute(THD*)+0x2e5) [0x5573b196eef5]
/usr/sbin/mysqld(mysql_execute_command(THD*, bool)+0xaaf) [0x5573b19105df]
/usr/sbin/mysqld(dispatch_sql_command(THD*, Parser_state*)+0x42f) [0x5573b191512f]
/usr/sbin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x1ff9) [0x5573b1917609]
/usr/sbin/mysqld(do_command(THD*)+0x19c) [0x5573b191857c]
/usr/sbin/mysqld(+0x1181960) [0x5573b1a48960]
/usr/sbin/mysqld(+0x2645ae4) [0x5573b2f0cae4]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7fa3) [0x7f2c86909fa3]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f2c860ec4cf]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f2ba005c088): SELECT COUNT(*) FROM ip_block_distribution d LEFT JOIN ip_block_info i ON d.ip_block_id = i.id WHERE (d.distribution_object = '582bdd1a7c964d9a914566c3213f1fd0') AND i.`block_type` = 1 AND i.closed_loop_status IN (0, 1)
Connection ID (thread ID): 3269771
Status: NOT_KILLED
[16 Aug 9:46] MySQL Verification Team
Hi Mr. Liu,

Thank you for your bug report.

We inspected your stacktrace and could not find a single bug report with a similar test case.

Hence, in order to try to repeat this assertion failure, we require a fully repeatable test case that will crash our 8.0.39 production binary. You are using an old and unsupported release of 8.0.

A test case should consist of a set of SQL statements that finishes in the assertion failure that you reported.

Also, if you upgrade to our own official 8.0.39 binary, you will probably not experience these crashes.

Can not repeat.
[30 Sep 8:56] Able Tu
I have the same error with mysql 8.0.38 version in rocky 8 ,error info like this,this will cause mysql restart 
024-09-10T06:41:28.308788Z 12048 [Warning] [MY-010055] [Server] IP address '10.2.105.248' could not be resolved: Name or service not known
2024-09-26T04:04:54.715848Z 21581 [ERROR] [MY-013183] [InnoDB] Assertion failure: buf0buf.h:1209:m_space != nullptr thread 139945461098240
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
2024-09-26T04:04:54Z UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
BuildID[sha1]=529962fea29f9d77d8d4e7994dddd8c3944cac6f
Thread pointer: 0x7f47481a1e50
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 = 7f47977f1bd0 thread_stack 0x100000
/usr/local/mysql/bin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x41) [0x213f351]
/usr/local/mysql/bin/mysqld(print_fatal_signal(int)+0x2a2) [0xffa5b2]
/usr/local/mysql/bin/mysqld(my_server_abort()+0x75) [0xffa7f5]
/usr/local/mysql/bin/mysqld(my_abort()+0xe) [0x21391ee]
/usr/local/mysql/bin/mysqld(ut_dbg_assertion_failed(char const*, char const*, unsigned long)+0x309) [0x238a839]
/usr/local/mysql/bin/mysqld(Buf_fetch_normal::get(buf_block_t*&)+0x148) [0x23f0c68]
/usr/local/mysql/bin/mysqld(Buf_fetch<Buf_fetch_normal>::single_page()+0x55) [0x23f0d05]
/usr/local/mysql/bin/mysqld(buf_page_get_gen(page_id_t const&, page_size_t const&, unsigned long, buf_block_t*, Page_fetch, ut::Location, mtr_t*, bool)+0x1fa) [0x23f1b9a]
/usr/local/mysql/bin/mysqld(btr_cur_search_to_nth_level(dict_index_t*, unsigned long, dtuple_t const*, page_cur_mode_t, unsigned long, btr_cur_t*, unsigned long, char const*, unsigned long, mtr_t*)+0x5b1) [0x23d0811]
/usr/local/mysql/bin/mysqld(Row_sel_get_clust_rec_for_mysql::operator()(row_prebuilt_t*, dict_index_t*, unsigned char const*, que_thr_t*, unsigned char const**, unsigned long**, mem_block_info_t**, dtuple_t const**, mtr_t*, lob::undo_vers_t*)+0x112) [0x2301a32]
/usr/local/mysql/bin/mysqld(row_search_mvcc(unsigned char*, page_cur_mode_t, row_prebuilt_t*, unsigned long, unsigned long)+0x20dc) [0x2309c5c]
/usr/local/mysql/bin/mysqld(ha_innobase::general_fetch(unsigned char*, unsigned int, unsigned int)+0x110) [0x21a0af0]
/usr/local/mysql/bin/mysqld(handler::ha_index_next(unsigned char*)+0x245) [0x110d715]
/usr/local/mysql/bin/mysqld(IndexScanIterator<false>::Read()+0x4d) [0x1254cbd]
/usr/local/mysql/bin/mysqld(AggregateIterator::Read()+0x16a) [0x13c96fa]
/usr/local/mysql/bin/mysqld(MaterializeIterator<DummyIteratorProfiler>::MaterializeQueryBlock(materialize_iterator::QueryBlock const&, unsigned long long*)+0x112) [0x13cc202]
/usr/local/mysql/bin/mysqld(MaterializeIterator<DummyIteratorProfiler>::Init()+0x463) [0x13cd323]
/usr/local/mysql/bin/mysqld(NestedLoopIterator::Read()+0xe5) [0x13c7915]
/usr/local/mysql/bin/mysqld(NestedLoopIterator::Read()+0xb7) [0x13c78e7]
/usr/local/mysql/bin/mysqld(Query_expression::ExecuteIteratorQuery(THD*)+0x2f0) [0xf64960]
/usr/local/mysql/bin/mysqld(Query_expression::execute(THD*)+0x30) [0xf64cd0]
/usr/local/mysql/bin/mysqld(Sql_cmd_dml::execute(THD*)+0x1e4) [0xeeeee4]
/usr/local/mysql/bin/mysqld(mysql_execute_command(THD*, bool)+0xb06) [0xe8abe6]
/usr/local/mysql/bin/mysqld(dispatch_sql_command(THD*, Parser_state*)+0x51b) [0xe8e3eb]
/usr/local/mysql/bin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x2396) [0xe90d76]
/usr/local/mysql/bin/mysqld(do_command(THD*)+0x21e) [0xe919be]
/usr/local/mysql/bin/mysqld() [0xfea7c8]
/usr/local/mysql/bin/mysqld() [0x285d104]
/lib64/libpthread.so.0(+0x817a) [0x7f4817eaf17a]
/lib64/libc.so.6(clone+0x43) [0x7f48161b2dc3]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f47481f51a0): is an invalid pointer
Connection ID (thread ID): 21581
Status: NOT_KILLED

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
[30 Sep 9:02] MySQL Verification Team
Hi Mr. Liu,

Thank you for your bug report.

We inspected your stacktrace and could not find a single bug report with a similar test case.

Hence, in order to try to repeat this assertion failure, we require a fully repeatable test case that will crash our 8.0.39 production binary. You are using an old and unsupported release of 8.0.

A test case should consist of a set of SQL statements that finishes in the assertion failure that you reported.

You have not provided us with a test case, as described above, so we can not proceed with processing of your bug report.

Can't repeat.