Bug #116076 Mysql service crashed
Submitted: 12 Sep 7:00 Modified: 26 Sep 2:50
Reporter: Zhang Clark Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:8.0.25 OS:CentOS (centos7.9)
Assigned to: MySQL Verification Team CPU Architecture:x86 (x86_64 Intel Xeon Processor (Skylake, IBRS))

[12 Sep 7:00] Zhang Clark
Description:
We deployed mysql service with docker container.Start command is "docker-compose up -d"
The content of docker-compose.yml is:
```
version: "3"
services:
  ops-mysql:
    image: mysql:8.0.25
    container_name: ops-mysql
    ports:
      - 3306:3306
    volumes:
      - /home/opst/ops-mysql-data/:/var/lib/mysql/
      - /home/opst/ops-mysql/conf.d/docker.cnf:/etc/mysql/conf.d/docker.cnf
    environment:
      - MYSQL_ROOT_PASSWORD=xxxxxx
    privileged: true
    restart: unless-stopped
    user: "root:root"
    healthcheck:
      test: ["CMD", "mysqladmin", "status", "-uroot", "-pxxxxxx"]
      interval: 30s
      timeout: 3s
      retries: 10
```
The mysql service crashed 2 times in one month,and it restart/recover automatically, logs is below:
```
2024-09-11T10:20:44.491820Z 2165912 [ERROR] [MY-013183] [InnoDB] Assertion failure: buf0buf.cc:2967:buf_page_in_file(bpage) thread 140368123094784
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.
10:20:44 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x7fab44124190
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 = 7faa001d5da0 thread_stack 0x46000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x2e) [0x55ec06bc094e]
/usr/sbin/mysqld(handle_fatal_signal+0x31b) [0x55ec05f7ce3b]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730) [0x7fac298f1730]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x10b) [0x7fac28fce7bb]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x121) [0x7fac28fb9535]
/usr/sbin/mysqld(+0x359db83) [0x55ec07082b83]
/usr/sbin/mysqld(buf_page_make_young(buf_page_t*)+0x8c) [0x55ec06d2422c]
/usr/sbin/mysqld(Buf_fetch<Buf_fetch_normal>::single_page()+0x215) [0x55ec06d275b5]
/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)+0x19a) [0x55ec06d27b9a]
/usr/sbin/mysqld(btr_pcur_t::move_to_next_page(mtr_t*)+0x92) [0x55ec06df08c2]
/usr/sbin/mysqld(btr_pcur_t::move_to_next(mtr_t*)+0x48) [0x55ec06fe5688]
/usr/sbin/mysqld(row_search_mvcc(unsigned char*, page_cur_mode_t, row_prebuilt_t*, unsigned long, unsigned long)+0xf7a) [0x55ec06fef35a]
/usr/sbin/mysqld(ha_innobase::general_fetch(unsigned char*, unsigned int, unsigned int)+0x280) [0x55ec06ca3960]
/usr/sbin/mysqld(handler::ha_rnd_next(unsigned char*)+0x55) [0x55ec05a664c5]
/usr/sbin/mysqld(TableScanIterator::Read()+0x1d) [0x55ec05cadcbd]
/usr/sbin/mysqld(FilterIterator::Read()+0x14) [0x55ec05ba1524]
/usr/sbin/mysqld(AggregateIterator::Read()+0x10a) [0x55ec05ba3aba]
/usr/sbin/mysqld(Query_expression::ExecuteIteratorQuery(THD*)+0x3c3) [0x55ec05eee5d3]
/usr/sbin/mysqld(Query_expression::execute(THD*)+0x2c) [0x55ec05eee7cc]
/usr/sbin/mysqld(Sql_cmd_dml::execute_inner(THD*)+0x3ab) [0x55ec05e7294b]
/usr/sbin/mysqld(Sql_cmd_dml::execute(THD*)+0x6c8) [0x55ec05e7d008]
/usr/sbin/mysqld(mysql_execute_command(THD*, bool)+0xaa8) [0x55ec05e12088]
/usr/sbin/mysqld(dispatch_sql_command(THD*, Parser_state*)+0x418) [0x55ec05e167a8]
/usr/sbin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x16c1) [0x55ec05e183c1]
/usr/sbin/mysqld(do_command(THD*)+0x174) [0x55ec05e199f4]
/usr/sbin/mysqld(+0x2480898) [0x55ec05f65898]
/usr/sbin/mysqld(+0x36153b4) [0x55ec070fa3b4]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7fa3) [0x7fac298e6fa3]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fac290904cf]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7fab44159fd8): SELECT COUNT(*) AS `__count` FROM `ems_snmptraprawevent` WHERE NOT `ems_snmptraprawevent`.`is_parsed`
Connection ID (thread ID): 2165912
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.
```

How to repeat:
Cannot repeat manually
[23 Sep 15:40] MySQL Verification Team
Hi,

I am unable to reproduce this issue with latest 8.0.39
[26 Sep 2:50] Zhang Clark
Hi team,
Can you provide some suggestions?Do we need to upgrade to 8.0.39?
[27 Sep 9:12] MySQL Verification Team
There are many fixes between .25 and .39 so yes, you should upgrade. This issue might not be fixed in .39 but so far I was not able to reproduce it.