Bug #95534 MySQL InnoDB crashes at shutdown
Submitted: 27 May 2019 6:51 Modified: 27 May 2019 12:51
Reporter: Christian Roser Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.7.26 OS:Debian (9.9)
Assigned to: CPU Architecture:x86

[27 May 2019 6:51] Christian Roser
Description:
I see MySQL servers crashing when issuing mysqladmin shutdown. This happens frequently on our MySQL 5.7 servers. MySQL 5.5 does not seem to be affected.

Error log outout looks like this:
2019-05-27T06:41:03.203320Z 0 [Note] Giving 14 client threads a chance to die gracefully
2019-05-27T06:41:03.203348Z 0 [Note] Shutting down slave threads
2019-05-27T06:41:13.205170Z 0 [Note] Forcefully disconnecting 1 remaining clients
2019-05-27T06:41:13.205202Z 0 [Warning] /opt/mysql/bin/mysqld: Forcing close of thread 22323  user: 'root'

2019-05-27T06:41:13.205227Z 0 [Note] Event Scheduler: Purging the queue. 0 events
2019-05-27T06:41:13.227689Z 0 [Note] Binlog end
2019-05-27T06:41:13.276256Z 0 [Note] Shutting down plugin 'SERVER_AUDIT'
190527  8:41:13 server_audit: STOPPED
2019-05-27T06:41:13.277577Z 0 [Note] Shutting down plugin 'ngram'
2019-05-27T06:41:13.277588Z 0 [Note] Shutting down plugin 'partition'
2019-05-27T06:41:13.277597Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2019-05-27T06:41:13.277605Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2019-05-27T06:41:13.277612Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2019-05-27T06:41:13.277619Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2019-05-27T06:41:13.277625Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2019-05-27T06:41:13.277632Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2019-05-27T06:41:13.277639Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2019-05-27T06:41:13.277664Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2019-05-27T06:41:13.277671Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2019-05-27T06:41:13.277678Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2019-05-27T06:41:13.277685Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2019-05-27T06:41:13.277692Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2019-05-27T06:41:13.277699Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2019-05-27T06:41:13.277706Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2019-05-27T06:41:13.277712Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2019-05-27T06:41:13.277719Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2019-05-27T06:41:13.277726Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2019-05-27T06:41:13.277733Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2019-05-27T06:41:13.277740Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2019-05-27T06:41:13.277746Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2019-05-27T06:41:13.277753Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2019-05-27T06:41:13.277760Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2019-05-27T06:41:13.277766Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2019-05-27T06:41:13.277773Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2019-05-27T06:41:13.277779Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2019-05-27T06:41:13.277786Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2019-05-27T06:41:13.277793Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2019-05-27T06:41:13.277800Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2019-05-27T06:41:13.277807Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2019-05-27T06:41:13.277814Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2019-05-27T06:41:13.277820Z 0 [Note] Shutting down plugin 'InnoDB'
2019-05-27T06:41:30.806764Z 0 [Note] InnoDB: FTS optimize thread exiting.
2019-05-27T06:41:30.806997Z 0 [Note] InnoDB: Starting shutdown...
2019-05-27T06:41:30.907455Z 0 [Note] InnoDB: Dumping buffer pool(s) to /DBDATA/rdbng/data/ib_buffer_pool
2019-05-27T06:41:30.930202Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 190527  8:41:30
2019-05-27T06:41:33.518630Z 0 [ERROR] [FATAL] InnoDB: Page [page id: space=292328, page number=35] still fixed or dirty
2019-05-27 08:41:33 0x7f16dd1045c0  InnoDB: Assertion failure in thread 139736174839232 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.
06:41:33 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=67108864
read_buffer_size=131072
max_used_connections=44
max_threads=240
thread_count=0
connection_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 160907 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
/opt/mysql/bin/mysqld(my_print_stacktrace+0x35)[0xf4fbe5]
/opt/mysql/bin/mysqld(handle_fatal_signal+0x4a4)[0x7d1f54]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0)[0x7f16dcce50e0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcf)[0x7f16db679fff]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f16db67b42a]
/opt/mysql/bin/mysqld(_Z18ut_print_timestampP8_IO_FILE+0x0)[0x7c131e]
/opt/mysql/bin/mysqld(_ZN2ib5fatalD1Ev+0xb3)[0x11ae4c3]
/opt/mysql/bin/mysqld[0x11e9474]
/opt/mysql/bin/mysqld(_Z13buf_all_freedv+0x4c)[0x11e953c]
/opt/mysql/bin/mysqld(_Z37logs_empty_and_mark_files_at_shutdownv+0x108b)[0x10a118b]
/opt/mysql/bin/mysqld(_Z27innobase_shutdown_for_mysqlv+0x59f)[0x116261f]
/opt/mysql/bin/mysqld[0x10421c0]
/opt/mysql/bin/mysqld(_Z22ha_finalize_handlertonP13st_plugin_int+0x2c)[0x8198dc]
/opt/mysql/bin/mysqld[0xd35afb]
/opt/mysql/bin/mysqld[0xd3a559]
/opt/mysql/bin/mysqld(_Z15plugin_shutdownv+0x238)[0xd3e848]
/opt/mysql/bin/mysqld[0x7c75c8]
/opt/mysql/bin/mysqld(_Z11mysqld_mainiPPc+0x14f9)[0x7cc5f9]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f16db6672e1]
/opt/mysql/bin/mysqld[0x7c2089]
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.
2019-05-27T06:41:34.032343Z mysqld_safe Number of processes running now: 0
2019-05-27T06:41:34.035763Z mysqld_safe mysqld restarted

If I run mysqladmin shutdown after crash recovery is finished it works as expected

How to repeat:
not yet sure how. I'm still investigating on it
[27 May 2019 12:51] MySQL Verification Team
Hi,

Thank you for your bug report.

We have discovered that this bug is a duplicate of the bug:

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

Bug # 95285 is a high severity, regression bug.