0

After we upgraded our database to MySQL 8, one query stopped working and is causing the database to crash. MySQL version 8.0.19, before: 5.7

Error.log output:

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f85d0240968): is an invalid pointer
Connection ID (thread ID): 11
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.
2020-04-05T09:59:12.862055Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19) starting as process 13111
2020-04-05T09:59:13.462707Z 0 [System] [MY-010229] [Server] Starting XA crash recovery...
2020-04-05T09:59:13.475726Z 0 [System] [MY-010232] [Server] XA crash recovery finished.
2020-04-05T09:59:13.530885Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2020-04-05T09:59:13.564557Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.19'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
2020-04-05T09:59:13.704704Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060
10:19:05 UTC - mysqld got signal 11 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x564c309c2060
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 = 7fdb00628d50 thread_stack 0x46000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x3d) [0x564c2e75e78d]
/usr/sbin/mysqld(handle_fatal_signal+0x303) [0x564c2d7f8553]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890) [0x7fdb348cc890]
/usr/sbin/mysqld(count_field_types(SELECT_LEX*, Temp_table_param*, List<Item>&, bool, bool)+0x5e) [0x564c2d716b6e]
/usr/sbin/mysqld(JOIN::optimize()+0x10f) [0x564c2d6c063f]
/usr/sbin/mysqld(SELECT_LEX::optimize(THD*)+0xeb) [0x564c2d71501b]
/usr/sbin/mysqld(SELECT_LEX_UNIT::optimize(THD*, TABLE*)+0x6b) [0x564c2d78278b]
/usr/sbin/mysqld(SELECT_LEX::optimize(THD*)+0x143) [0x564c2d715073]
/usr/sbin/mysqld(SELECT_LEX_UNIT::optimize(THD*, TABLE*)+0x6b) [0x564c2d78278b]
/usr/sbin/mysqld(Sql_cmd_dml::execute_inner(THD*)+0x38) [0x564c2d713b38]
/usr/sbin/mysqld(Sql_cmd_dml::execute(THD*)+0x458) [0x564c2d71d438]
/usr/sbin/mysqld(mysql_execute_command(THD*, bool)+0x2811) [0x564c2d6cd741]
/usr/sbin/mysqld(Prepared_statement::execute(String*, bool)+0x7d4) [0x564c2d6f9324]
/usr/sbin/mysqld(Prepared_statement::execute_loop(String*, bool)+0xb2) [0x564c2d6fbd32]
/usr/sbin/mysqld(mysqld_stmt_execute(THD*, Prepared_statement*, bool, unsigned long, PS_PARAM*)+0x189) [0x564c2d6fd449]
/usr/sbin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0xdef) [0x564c2d6d0c1f]
/usr/sbin/mysqld(do_command(THD*)+0x1c4) [0x564c2d6d2964]
/usr/sbin/mysqld(+0xfbd800) [0x564c2d7e9800]
/usr/sbin/mysqld(+0x244b909) [0x564c2ec77909]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7fdb348c16db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fdb32ae788f]

This is a constant crash and only happens after one certain action in our application, however, we're not very experienced in MySQL and/or databases. Hope you can help!

Luke Hol
  • 1
  • 1

1 Answers1

0

Did you run mysql_upgrade after upgrading? Run "check table" on all tables to see if there is any corruption. Does your server have ECC memory in it? Are there any hardware warnings/errors (EDAC, MCE) evident in dmesg or syslog?

It is plausible that you are hitting a bug. MySQL after 5.6 is, in my rather extensive experience best avoided for production use. MariaDB is much less buggy.

Gordan Bobić
  • 936
  • 4
  • 10