Percona mysql server crashes abruptly and keeps restarting and doing recovery

Hello everyone. we have a master slave setup in production which is running Percona Server version(5.7.23-25) on a GCP VM instances(running Centos 7). From past two weeks it has crashed twice.with same log in mysql log.

i am attaching mysql logs from the time of the crash:

2022-09-11 06:50:17 0x7e17d07f8700  InnoDB: Assertion failure in thread 138640747366144 in file buf0lru.cc line 2188
InnoDB: Failing assertion: !buf_page_hash_get_low(buf_pool, b->id)
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.
06:50:17 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.
Please help us make Percona Server better by reporting any
bugs at http://bugs.percona.com/

key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=653
max_threads=100001
thread_count=238
connection_count=238
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 38429452 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
/usr/sbin/mysqld(my_print_stacktrace+0x3b)[0xf1481b]
/usr/sbin/mysqld(handle_fatal_signal+0x471)[0xd4dd61]
/lib64/libpthread.so.0(+0xf6d0)[0x7faf158166d0]
/lib64/libc.so.6(gsignal+0x37)[0x7faf13917277]
/lib64/libc.so.6(abort+0x148)[0x7faf13918968]
/usr/sbin/mysqld[0x77b7bc]
/usr/sbin/mysqld(_Z17buf_LRU_free_pageP10buf_page_tb+0x1598)[0x11c8508]
/usr/sbin/mysqld(_Z18buf_flush_do_batchP10buf_pool_t11buf_flush_tmmPm+0x1065)[0x11bca85]
/usr/sbin/mysqld(buf_lru_manager+0x362)[0x11be212]
/lib64/libpthread.so.0(+0x7e25)[0x7faf1580ee25]
/lib64/libc.so.6(clone+0x6d)[0x7faf139dfbad]
You may download the Percona Server operations manual by visiting
http://www.percona.com/software/percona-server/. You may find information
in the manual which will help you identify the cause of the crash.
2022-09-11T06:51:33.679168Z 0 [Warning] Could not increase number of max_open_files to more than 5000 (request: 7505)
2022-09-11T06:51:33.679484Z 0 [Warning] Changed limits: table_open_cache: 1745 (requested 2000)
2022-09-11T06:51:33.872549Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2022-09-11T06:51:33.875253Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.23-25-log) starting as process 17442 ...
2022-09-11T06:51:33.881222Z 0 [Warning] InnoDB: Using innodb_support_xa is deprecated and the parameter may be removed in future releases. Only innodb_support_xa=ON is allowed.
2022-09-11T06:51:33.881259Z 0 [Warning] InnoDB: Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
2022-09-11T06:51:33.881374Z 0 [Note] InnoDB: PUNCH HOLE support available
2022-09-11T06:51:33.881408Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2022-09-11T06:51:33.881413Z 0 [Note] InnoDB: Uses event mutexes
2022-09-11T06:51:33.881419Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2022-09-11T06:51:33.881424Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.7
2022-09-11T06:51:33.881428Z 0 [Note] InnoDB: Using Linux native AIO
2022-09-11T06:51:33.882740Z 0 [Note] InnoDB: Number of pools: 1
2022-09-11T06:51:33.882917Z 0 [Note] InnoDB: Using CPU crc32 instructions
2022-09-11T06:51:33.883570Z 0 [ERROR] InnoDB: Failed to create check sector file, errno:13 Please confirm O_DIRECT is supported and remove the file /var/lib/check_sector_size if it exists.
2022-09-11T06:51:33.885390Z 0 [Note] InnoDB: Initializing buffer pool, total size = 1505G, instances = 10, chunk size = 128M
2022-09-11T06:52:27.446753Z 0 [Note] InnoDB: Completed initialization of buffer pool
2022-09-11T06:52:40.706318Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2022-09-11T06:52:40.737341Z 0 [Note] InnoDB: Recovering partial pages from the parallel doublewrite buffer at /data/mysql/xb_doublewrite
2022-09-11T06:52:40.774389Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2022-09-11T06:52:49.679200Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 159346868110421
2022-09-11T06:52:49.847949Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 159346873353216
2022-09-11T06:52:50.081760Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 159346878596096
2022-09-11T06:52:53.298303Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 159346883838976
2022-09-11T06:52:53.504933Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 159346889081856
2022-09-11T06:52:53.649112Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 159346894324736
2022-09-11T06:52:53.847079Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 159346899567616
2022-09-11T06:52:54.089722Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 159346904810496
2022-09-11T06:52:54.290678Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 159346910053376

after that it keeps doing recovery.but mysql does not start. Every time we had to promote the slave to be new master.
is there a way to fix it.

1 Like

Hello, I think you might be hitting the known bug [PS-3581] LP #1633993: Failing assertion: !buf_page_hash_get_low(buf_pool, b->id) - Percona JIRA
Can you try upgrading to the latest minor release in 5.7 branch?

1 Like

What’s strange is we have been running the same version for more than three years.but the problem started occuring from few weeks ago.

1 Like