Bug #107054 Restart of mysql unexpectedly
Submitted: 19 Apr 2022 13:05 Modified: 19 Apr 2022 13:10
Reporter: Murali Bharatam Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.7.34 OS:Ubuntu (16.04.1 LTS (Xenial Xerus))
Assigned to: CPU Architecture:x86 (x86_64)

[19 Apr 2022 13:05] Murali Bharatam
Description:
The mysql database is restarting automatically. This is a production instance and this is affecting business.

We are seeing the following in the error log.

2022-04-18 09:40:02 0x7efedff3c700  InnoDB: Assertion failure in thread 139633144088320 in file trx0trx.cc line 2317
InnoDB: Failing assertion: trx->lock.n_active_thrs == 1
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.
09:40:02 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=1048576
read_buffer_size=131072
max_used_connections=135
max_threads=500
thread_count=101
connection_count=101
It is possible that mysqld could use up to

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=1048576
read_buffer_size=131072
max_used_connections=135
max_threads=500
thread_count=101
connection_count=101
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 199719 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7efc9801dff0
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 = 7efedff3be70 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x3b)[0xeb606b]
/usr/sbin/mysqld(handle_fatal_signal+0x36f)[0x7b687f]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f0ee6b6b390]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7f0ee5f24438]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f0ee5f2603a]
/usr/sbin/mysqld[0x78bd7a]
/usr/sbin/mysqld(_Z30trx_commit_or_rollback_prepareP5trx_t+0xa0)[0x11ea520]
/usr/sbin/mysqld(_Z17trx_rollback_stepP9que_thr_t+0x149)[0x11d10b9]
/usr/sbin/mysqld(_Z15que_run_threadsP9que_thr_t+0xa91)[0x110eba1]
/usr/sbin/mysqld[0x11d2e6a]
/usr/sbin/mysqld(_Z25trx_rollback_to_savepointP5trx_tP12trx_savept_t+0x22)[0x11d3122]
/usr/sbin/mysqld(_Z23row_mysql_handle_errorsP7dberr_tP5trx_tP9que_thr_tP12trx_savept_t+0x88)[0x1148f28]
/usr/sbin/mysqld[0x114972b]
/usr/sbin/mysqld(_ZN11ha_innobase9write_rowEPh+0x13d)[0x105c80d]
/usr/sbin/mysqld(_ZN7handler12ha_write_rowEPh+0x198)[0x8151e8]

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

How to repeat:
not able to find a pattern for this.

Suggested fix:
no known fix.
[19 Apr 2022 13:10] MySQL Verification Team
Hello Murali Bharatam,

Thank you for the report and feedback.
An existing bug report Bug#107053 already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

regards,
Umesh