Bug #104850 [ERROR] InnoDB: ibuf cursor restoration fails!. ibuf record inserted to page 282
Submitted: 7 Sep 3:34 Modified: 7 Sep 6:25
Reporter: DF Rong Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:5.7.21 OS:SUSE (12)
Assigned to: CPU Architecture:x86

[7 Sep 3:34] DF Rong
Description:
Mysqld will get crashed unexpectedly.

The info in mysql.err as follows:
2021-09-07T00:00:37.568192+08:00 0 [ERROR] InnoDB: ibuf cursor restoration fails!. ibuf record inserted to page 2824:27499
2021-09-07T00:00:37.568452+08:00 0 [ERROR] InnoDB: Submit a detailed bug report to http://bugs.mysql.com
PHYSICAL RECORD: n_fields 9; 1-byte offsets; info bits 0
 0: len 4; hex 00000ae7; asc ;;
 1: len 1; hex 00; asc ;;
 2: len 4; hex 00008600; asc ;;
 3: len 30; hex 000000010c0f00c080530c0f006080530c0f00c080538307000480088601; asc S ` S S ; (total 34 bytes);
 4: len 8; hex 4449534b5f53554d; asc DISK_SUM;;
 5: len 6; hex 462d50414153; asc F-PAAS;;
 6: len 12; hex 38342e3134372e35342e3136; asc 84.147.54.16;;
 7: len 4; hex 61363b0d; asc a6; ;;
 8: len 1; hex 87; asc ;;
PHYSICAL RECORD: n_fields 9; 1-byte offsets; info bits 0
 0: len 4; hex 00000ae7; asc ;;
 1: len 1; hex 00; asc ;;
 2: len 4; hex 00008600; asc ;;
 3: len 30; hex 000000010c0f00c080530c0f006080530c0f00c080538307000480088601; asc S ` S S ; (total 34 bytes);
 4: len 8; hex 4449534b5f53554d; asc DISK_SUM;;
 5: len 6; hex 462d50414153; asc F-PAAS;;
 6: len 12; hex 38342e3134372e35342e3136; asc 84.147.54.16;;
 7: len 4; hex 61363b0d; asc a6; ;;
 8: len 1; hex 87; asc ;;
DATA TUPLE: 3 fields;
 0: len 4; hex 00000b08; asc ;;
 1: len 1; hex 00; asc ;;
 2: len 4; hex 00006b6b; asc kk;;
PHYSICAL RECORD: n_fields 8; 1-byte offsets; info bits 0
 0: len 4; hex 00000b29; asc );;
 1: len 1; hex 00; asc ;;
 2: len 4; hex 00000100; asc ;;
 3: len 28; hex 000000010c0f00c080530c0f00608053830700048008860100018000; asc S ` S ;;
 4: len 14; hex 37362e3135362e3138332e323239; asc 76.156.183.229;;
 5: len 13; hex 42462d4f454d53284443435329; asc BF-OEMS(DCCS);;
 6: len 4; hex 61363b07; asc a6; ;;
 7: len 1; hex 87; asc ;;
2021-09-07T00:00:37.569243+08:00 0 [ERROR] [FATAL] InnoDB: Failed to restore ibuf position.
2021-09-07 00:00:37 0x7f510eacf700 InnoDB: Assertion failure in thread 139986115294976 in file ut0ut.cc line 942
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/5.7/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
16:00:37 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.

key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=167
max_threads=512
thread_count=53
connection_count=53
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 146104 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

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 0x40000
/data/app/mysql/bin/mysqld(my_print_stacktrace+0x35)[0xf4a495]
/data/app/mysql/bin/mysqld(handle_fatal_signal+0x4a4)[0x7ce2f4]
/lib64/libpthread.so.0(+0x10b10)[0x7f5346a5eb10]
/lib64/libc.so.6(gsignal+0x37)[0x7f53453ed8d7]
/lib64/libc.so.6(abort+0x13a)[0x7f53453eecaa]
/data/app/mysql/bin/mysqld(_Z18ut_print_timestampP8_IO_FILE+0x0)[0x7bd70e]
/data/app/mysql/bin/mysqld(_ZN2ib5fatalD1Ev+0xb3)[0x115c3a3]
/data/app/mysql/bin/mysqld[0x1031031]
/data/app/mysql/bin/mysqld[0x10356a9]
/data/app/mysql/bin/mysqld(_Z29ibuf_merge_or_delete_for_pageP11buf_block_tRK9page_id_tPK11page_size_tm+0xb0b)[0x10397eb]
/data/app/mysql/bin/mysqld(_Z20buf_page_io_completeP10buf_page_tb+0x4c9)[0x1197329]
/data/app/mysql/bin/mysqld(_Z12fil_aio_waitm+0xfe)[0x1201a2e]
/data/app/mysql/bin/mysqld(io_handler_thread+0xd0)[0x110e980]
/lib64/libpthread.so.0(+0x8744)[0x7f5346a56744]
/lib64/libc.so.6(clone+0x6d)[0x7f53454a2aad]

How to repeat:
I can not repeat this problem.

I find info from Mysql 5.7.31 Release Notes:
bugs fixed:
InnoDB: The server failed intermittently with an “ibuf cursor restoration fails” error. (Bug #30770380, Bug #91033)

but I am not sure that is same as me.
[7 Sep 6:19] MySQL Verification Team
Quite older version reported 5.7.21, current released version 5.7.35.
[7 Sep 6:25] MySQL Verification Team
Hello DF Rong,

Thank you for the report and feedback.
Discussed with my senior colleague and confirmed that it is duplicate of Bug #91033 which is fixed in 5.7.31, 8.0.21 release. I see you are using a very old and affected version(5.7.21 was released on 2018-01-15), please note that we don't fix bugs in old versions, don't back-port bug fixes, so you need to check with latest MySQL Server version(8.0.26/5.7.35). So, please upgrade and inform us if problem still exists along with a test case to reproduce. Thank you.

regards,
Umesh