Bug #108002 MySQL fails to start with an assertion
Submitted: 27 Jul 2022 10:06 Modified: 27 Jul 2022 13:09
Reporter: Kent Hamilton Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version: OS:Ubuntu (20.04)
Assigned to: CPU Architecture:x86

[27 Jul 2022 10:06] Kent Hamilton
Description:
After a system reboot we are unable to start mysqld. I've tried setting innodb_force_recovery and receive this in the error.log every time. 

stack_bottom = 0 thread_stack 0x100000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x41) [0x564efe395ad1]
/usr/sbin/mysqld(print_fatal_signal(int)+0x2fb) [0x564efd2367db]
/usr/sbin/mysqld(my_server_abort()+0x76) [0x564efd236926]
/usr/sbin/mysqld(my_abort()+0xe) [0x564efe38face]
/usr/sbin/mysqld(ut_dbg_assertion_failed(char const*, char const*, unsigned long)+0x349) [0x564efe60b7b9]
/usr/sbin/mysqld(rec_get_offsets_func(unsigned char const*, dict_index_t const*, unsigned long*, unsigned long, mem_block_info_t**)+0xb7) [0x564efe6197a7]
/usr/sbin/mysqld(btr_cur_parse_update_in_place(unsigned char*, unsigned char*, unsigned char*, page_zip_des_t*, dict_index_t*)+0x12a) [0x564efe652f8a]
/usr/sbin/mysqld(+0x23b0959) [0x564efe4b5959]
/usr/sbin/mysqld(recv_recover_page_func(bool, buf_block_t*)+0x89b) [0x564efe4b72bb]
/usr/sbin/mysqld(buf_page_io_complete(buf_page_t*, bool)+0x3d2) [0x564efe6753e2]
/usr/sbin/mysqld(fil_aio_wait(unsigned long)+0x173) [0x564efe79a8a3]
/usr/sbin/mysqld(+0x24966f8) [0x564efe59b6f8]
/usr/sbin/mysqld(std::thread::_State_impl<std::thread::_Invoker<std::tuple<Detached_thread, void (*)(unsigned long), unsigned long> > >::_M_run()+0xc0) [0x564efe59b800]
/lib/x86_64-linux-gnu/libstdc++.so.6(+0xd6de4) [0x7f23c2c4dde4]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8609) [0x7f23c36ea609]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x43) [0x7f23c293a133]
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.
2022-07-27T09:58:46.583633Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29-0ubuntu0.20.04.3) starting as process 19163
2022-07-27T09:58:46.597844Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-07-27T09:58:46.966383Z 0 [ERROR] [MY-013183] [InnoDB] Assertion failure: rec.cc:392 thread 140500443059968
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.
09:58:46 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x0
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 = 0 thread_stack 0x100000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x41) [0x55de4b91aad1]
/usr/sbin/mysqld(print_fatal_signal(int)+0x2fb) [0x55de4a7bb7db]
/usr/sbin/mysqld(my_server_abort()+0x76) [0x55de4a7bb926]
/usr/sbin/mysqld(my_abort()+0xe) [0x55de4b914ace]
/usr/sbin/mysqld(ut_dbg_assertion_failed(char const*, char const*, unsigned long)+0x349) [0x55de4bb907b9]
/usr/sbin/mysqld(rec_get_offsets_func(unsigned char const*, dict_index_t const*, unsigned long*, unsigned long, mem_block_info_t**)+0xb7) [0x55de4bb9e7a7]
/usr/sbin/mysqld(btr_cur_parse_update_in_place(unsigned char*, unsigned char*, unsigned char*, page_zip_des_t*, dict_index_t*)+0x12a) [0x55de4bbd7f8a]
/usr/sbin/mysqld(+0x23b0959) [0x55de4ba3a959]
/usr/sbin/mysqld(recv_recover_page_func(bool, buf_block_t*)+0x89b) [0x55de4ba3c2bb]
/usr/sbin/mysqld(buf_page_io_complete(buf_page_t*, bool)+0x3d2) [0x55de4bbfa3e2]
/usr/sbin/mysqld(fil_aio_wait(unsigned long)+0x173) [0x55de4bd1f8a3]
/usr/sbin/mysqld(+0x24966f8) [0x55de4bb206f8]
/usr/sbin/mysqld(std::thread::_State_impl<std::thread::_Invoker<std::tuple<Detached_thread, void (*)(unsigned long), unsigned long> > >::_M_run()+0xc0) [0x55de4bb20800]
/lib/x86_64-linux-gnu/libstdc++.so.6(+0xd6de4) [0x7fc8e51b6de4]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8609) [0x7fc8e5c53609]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x43) [0x7fc8e4ea3133]
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.

How to repeat:
I've tried rebooting again, setting innodb_force_recovery, and a few other things with no luck getting nysqld to run.
[27 Jul 2022 13:09] MySQL Verification Team
Hi Mr. Hamilton,

Thank you for your bug report.

We discovered that your report is a duplicate of the following bug:

https://bugs.mysql.com/bug.php?id=107611

The above bug is already verified and has full test case.

You can not read that bug, since it is a security bug. However, we shall leave a notice that your bug is a duplicate, so that you can get informed when it is fixed.

Duplicate.
[13 Mar 2023 19:08] yvonne kire
there is no such bug #107611 - what happened to this case?
[14 Mar 2023 12:53] MySQL Verification Team
Hi,

Nothing happened ......

Simply, it is Security Vulnerability bug, which is visible only to its reporter and to us from the Development team.

However, we have left a message there that you are informed when that bug is fixed .......
[23 Jan 11:03] Юрий Акимов
Same problem here.
Started after query insert into call_point ( ... ) values ( ... );

I renamed table call_point info call_point_old to allow the application to work
After than i executed check table and found that all indexes after segfault is corrupted (idk were indexes corrupted before segfault)

My stacktrace:

2024-01-23T06:38:07.196667Z 86 [ERROR] [MY-013183] [InnoDB] Assertion failure: rec.cc:391 thread 139894471993088
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.
06:38:07 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x7f3b1c000d20
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 = 7f3bb84f1bf0 thread_stack 0x100000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x3d) [0x200098d]
/usr/sbin/mysqld(print_fatal_signal(int)+0x2df) [0xf16ebf]
/usr/sbin/mysqld(my_server_abort()+0x7e) [0xf1700e]
/usr/sbin/mysqld(my_abort()+0xa) [0x1ffacba]
/usr/sbin/mysqld(ut_dbg_assertion_failed(char const*, char const*, unsigned long)+0x31f) [0x22b509f]
/usr/sbin/mysqld(rec_get_offsets(unsigned char const*, dict_index_t const*, unsigned long*, unsigned long, ut::Location, mem_block_info_t**)+0xb7) [0x22c17b7]
/usr/sbin/mysqld(page_cur_search_with_match(buf_block_t const*, dict_index_t const*, dtuple_t const*, page_cur_mode_t, unsigned long*, unsigned long*, page_cur_t*, rtr_info*)+0x203) [0x21dc913]
/usr/sbin/mysqld(btr_root_raise_and_insert(unsigned int, btr_cur_t*, unsigned long**, mem_block_info_t**, dtuple_t const*, mtr_t*)+0x6a8) [0x22e9c98]
/usr/sbin/mysqld(btr_cur_pessimistic_insert(unsigned int, btr_cur_t*, unsigned long**, mem_block_info_t**, dtuple_t*, unsigned char**, big_rec_t**, que_thr_t*, mtr_t*)+0x46d) [0x22ef60d]
/usr/sbin/mysqld(btr_insert_on_non_leaf_level(unsigned int, dict_index_t*, unsigned long, dtuple_t*, ut::Location, mtr_t*)+0x2d7) [0x22df437]
/usr/sbin/mysqld(btr_page_split_and_insert(unsigned int, btr_cur_t*, unsigned long**, mem_block_info_t**, dtuple_t const*, mtr_t*)+0xb4a) [0x22e7eca]
/usr/sbin/mysqld(btr_cur_pessimistic_insert(unsigned int, btr_cur_t*, unsigned long**, mem_block_info_t**, dtuple_t*, unsigned char**, big_rec_t**, que_thr_t*, mtr_t*)+0x1d2) [0x22ef372]
/usr/sbin/mysqld(btr_insert_on_non_leaf_level(unsigned int, dict_index_t*, unsigned long, dtuple_t*, ut::Location, mtr_t*)+0x2d7) [0x22df437]
/usr/sbin/mysqld(btr_page_split_and_insert(unsigned int, btr_cur_t*, unsigned long**, mem_block_info_t**, dtuple_t const*, mtr_t*)+0xb4a) [0x22e7eca]
/usr/sbin/mysqld(btr_cur_pessimistic_insert(unsigned int, btr_cur_t*, unsigned long**, mem_block_info_t**, dtuple_t*, unsigned char**, big_rec_t**, que_thr_t*, mtr_t*)+0x1d2) [0x22ef372]
/usr/sbin/mysqld(row_ins_clust_index_entry_low(unsigned int, unsigned long, dict_index_t*, unsigned long, dtuple_t*, que_thr_t*, bool)+0xd53) [0x2209313]
/usr/sbin/mysqld(row_ins_clust_index_entry(dict_index_t*, dtuple_t*, que_thr_t*, bool)+0xf6) [0x220ee56]
/usr/sbin/mysqld(row_ins_step(que_thr_t*)+0x480) [0x220f8a0]
/usr/sbin/mysqld() [0x221cd14]
/usr/sbin/mysqld(ha_innobase::write_row(unsigned char*)+0x339) [0x2104eb9]
/usr/sbin/mysqld(handler::ha_write_row(unsigned char*)+0x1f8) [0x102bb88]
/usr/sbin/mysqld(write_record(THD*, TABLE*, COPY_INFO*, COPY_INFO*)+0x624) [0x12972e4]
/usr/sbin/mysqld(Sql_cmd_insert_values::execute_inner(THD*)+0x841) [0x1298ca1]
/usr/sbin/mysqld(Sql_cmd_dml::execute(THD*)+0x189) [0xe05319]
/usr/sbin/mysqld(mysql_execute_command(THD*, bool)+0x9f0) [0xdac9c0]
/usr/sbin/mysqld(Prepared_statement::execute(String*, bool)+0x890) [0xdda700]
/usr/sbin/mysqld(Prepared_statement::execute_loop(String*, bool)+0x130) [0xddfa40]
/usr/sbin/mysqld(mysqld_stmt_execute(THD*, Prepared_statement*, bool, unsigned long, PS_PARAM*)+0x1c1) [0xde00f1]
/usr/sbin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x1323) [0xdb1f33]
/usr/sbin/mysqld(do_command(THD*)+0x207) [0xdb3b47]
/usr/sbin/mysqld() [0xf07620]
/usr/sbin/mysqld() [0x2511165]
/lib64/libpthread.so.0(+0x7e65) [0x7f3e328d3e65]
/lib64/libc.so.6(clone+0x6d) [0x7f3e30eef88d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.

Query (7f825829c830): insert into `call_point` ( ... ) values ( ... )
Connection ID (thread ID): 86
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.
[23 Jan 11:17] MySQL Verification Team
Hi Mr. Akimov,

This bug report is a duplicate of the original bug, as mentioned in the comment.

Since the original bug is not fixed yet, so the problems can be still experienced.

Schedule for fixing bugs are changed on weekly basis, by each development team, so nobody knows when that bug will be fixed.