ALTER TABLE: ERROR 2013 (HY000): Lost connection to MySQL server during query - mysql

I am trying to add an auto increment column to a mysql table as:
mysql> ALTER TABLE scraped_comments ADD row_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY;
There are about 15 million records in the table. The query runs for about one and a half hour and then ends with the error:
ERROR 2013 (HY000): Lost connection to MySQL server during query
I tried setting higher timeout values by editing /etc/mysql/mysql.conf.d/mysqld.cnf
wait_timeout = 31536000
interactive_timeout = 31536000
and then running the query again. However the error persisted. While the query was running, I thought the issue may be caused by less memory so I had htop open in another terminal but less than half of memory was being used.
I checked /var/log/mysql/error.log file and found following in that file:
...
InnoDB: ###### Diagnostic info printed to the standard error stream
2019-06-14T06:21:49.965496Z 0 [ERROR] [MY-012872] [InnoDB] Semaphore wait has lasted > 38632704 seconds. We intentionally crash the server because it appears to be hung.[FATAL] Semaphore wait has lasted > 600 seconds. We intentionally crash the server because it appears to be hung.
2019-06-14T06:21:49.965563Z 0 [ERROR] [MY-013183] [InnoDB] Assertion failure: ut0ut.cc:629 thread 140385843095296
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.
06:21:49 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
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 0x46000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char*, unsigned long)+0x3d) [0x1dc2f5d]
/usr/sbin/mysqld(handle_fatal_signal+0x351) [0xeee441]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7fae50d4f390]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38) [0x7fae4f241428]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7fae4f24302a]
/usr/sbin/mysqld(ut_dbg_assertion_failed(char const*, char const*, unsigned long)+0x2db) [0x20736cb]
/usr/sbin/mysqld(ib::fatal::~fatal()+0x18e) [0x2075afe]
/usr/sbin/mysqld(srv_error_monitor_thread()+0xc07) [0x200ccf7]
/usr/sbin/mysqld(std::thread::_Impl<std::_Bind_simple<Runnable (void (*)())> >::_M_run()+0x63) [0x1e6e543]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb8c80) [0x7fae4fbadc80]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba) [0x7fae50d456ba]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7fae4f31341d]
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-06-14T06:21:53.867586Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.16) starting as process 6199
2019-06-14T06:21:58.097227Z 0 [System] [MY-010229] [Server] Starting crash recovery...
2019-06-14T06:21:58.114311Z 0 [System] [MY-010232] [Server] Crash recovery finished.
2019-06-14T06:21:59.096291Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2019-06-14T06:21:59.225066Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.16' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
2019-06-14T06:21:59.436191Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060
...
Thanks for the help

Came across
MySQL: InnoDb: Semaphore wait has lasted > 600 seconds. We intentionally crash the server
and increased thread_cache_size,innodb_buffer_pool_size and table_open_cache. I guess the issue was due to innodb_buffer_size as I first tried with innodb_buffer_size of 2 GB which didn't work. I then increased it to 3 GB and the query completed successfully

Related

Clean way to force shutdown of MySQL instance that has stopped responding?

I restarted a mysql database instance that had crashed through the service manager on a windows 10 2016 server but it produced an error regarding windows aio. At that point I tried to stop the service but it appears to be hung with a stopPending status and is no longer listening for incoming connections. Below is the error log:
InnoDB: ###### Diagnostic info printed to the standard error stream
2023-02-02T14:48:41.755096Z 0 [ERROR] [MY-012872] [InnoDB] [FATAL] Semaphore wait has lasted > 600 seconds. We intentionally crash the server because it appears to be hung.
2023-02-02T14:48:41.775212Z 0 [ERROR] [MY-013183] [InnoDB] Assertion failure: ut0ut.cc:536 thread 4360
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.
14:48:41 UTC - mysqld got exception 0x80000003 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
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...
7ff7baad60d2 mysqld.exe!my_sigabrt_handler()[my_thr_init.cc:372]
7ffb145fcfa7 ucrtbase.dll!raise()
7ffb145fde31 ucrtbase.dll!abort()
7ff7bacba8c0 mysqld.exe!ut_dbg_assertion_failed()[ut0dbg.cc:98]
7ff7bac93391 mysqld.exe!ib::fatal::~fatal()[ut0ut.cc:536]
7ff7baba61b3 mysqld.exe!srv_error_monitor_thread()[srv0srv.cc:1822]
7ff7babf0ea5 mysqld.exe!Runnable::operator()<void (__cdecl*)(void)>()[os0thread-create.h:103]
7ff7babf1225 mysqld.exe!std::thread::_Invoke<std::tuple<Runnable,void (__cdecl*)(void)>,0,1>()[thread:40]
7ffb145afb80 ucrtbase.dll!_o__realloc_base()
7ffb16c184d4 KERNEL32.DLL!BaseThreadInitThunk()
7ffb17aee871 ntdll.dll!RtlUserThreadStart()
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.
2023-02-02T16:36:06.118930Z 0 [System] [MY-010116] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld (mysqld 8.0.19) starting as process 9616
2023-02-02T16:36:06.529268Z 0 [Warning] [MY-012363] [InnoDB] innodb-page-size has been changed from the default value 16384 to 65536.
2023-02-02T16:36:37.661274Z 0 [System] [MY-010931] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld: ready for connections. Version: '8.0.19' socket: '' port: 3306 MySQL Community Server - GPL.
2023-02-02T16:36:37.713658Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060
2023-02-02T16:37:09.441481Z 0 [ERROR] [MY-012611] [InnoDB] Operating system error number 1 in a file operation.
2023-02-02T16:37:09.442489Z 0 [ERROR] [MY-012646] [InnoDB] File .\local\data.ibd: 'Windows aio' returned OS error 101. Cannot continue operation
2023-02-02T16:37:09.443660Z 0 [ERROR] [MY-012981] [InnoDB] Cannot continue operation.
2023-02-02T17:11:43.686693Z 0 [System] [MY-013105] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld: Normal shutdown.
2023-02-02T17:11:45.698697Z 0 [Warning] [MY-010909] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld: Forcing close of thread 8 user: 'service_account'.
2023-02-02T17:11:45.700138Z 0 [Warning] [MY-010909] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld: Forcing close of thread 9 user: 'service_account'.
2023-02-02T17:11:45.701433Z 0 [Warning] [MY-010909] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld: Forcing close of thread 10 user: 'service_account'.
I tried using mysqladmin.exe to force a shutdown but the service is no longer listening for connections. I tried restarting the service but I get a timeout error. I am reluctant to kill the process for obvious reasons.

MySQL crashed for unknown reason and doesn't start even with innodb_force_recovery=6 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 4 months ago.
Improve this question
The service starts and stops after a few seconds. The setting innodb_force_recovery=6 doesn't help. Previously it had been crashing due to an electricity outage 2 months ago, but I was able to restore everything, and then it worked well for 2 following months. But now it seems to be a more serious and low-level issue. Could you please help?
The full error dump is here:
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.
2022-10-24T07:14:00.931490Z 0 [Warning] [MY-011068] [Server] The syntax '--ssl=off' is deprecated and will be removed in a future release. Please use --tls-version=invalid instead.
2022-10-24T07:14:00.931754Z 0 [Warning] [MY-010097] [Server] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2022-10-24T07:14:00.931858Z 0 [System] [MY-010116] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.30) starting as process 11348
2022-10-24T07:14:00.957031Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-10-24T07:14:05.020472Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-10-24T07:14:06.443189Z 0 [Warning] [MY-011302] [Server] Plugin mysqlx reported: 'Failed at SSL configuration: "SSL context is not usable without certificate and private key"'
2022-10-24T07:14:06.445335Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060
2022-10-24T07:14:06.445535Z 0 [System] [MY-010931] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: ready for connections. Version: '8.0.30' socket: '' port: 3306 MySQL Community Server - GPL.
2022-10-24T07:14:46.604890Z 0 [ERROR] [MY-013183] [InnoDB] Assertion failure: fsp0fsp.cc:2152:inode thread 3196
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.
07:14:46 UTC - mysqld got exception 0x16 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x2cf63dc87d0
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...
7ff755370858 mysqld.exe!?my_print_stacktrace##YAXPEBEK#Z()
7ff75450e92b mysqld.exe!?print_fatal_signal##YAXH#Z()
7ff75450e6f3 mysqld.exe!?my_server_abort##YAXXZ()
7ff7553547fa mysqld.exe!?my_abort##YAXXZ()
7ff75559ca99 mysqld.exe!?deallocate#?$allocator#V?$sub_match#V?$_String_const_iterator#V?$_String_val#U?$_Simple_types#D#std###std###std###std###std##QEAAXQEAV?$sub_match#V?$_String_const_iterator#V?$_String_val#U?$_Simple_types#D#std###std###std###2#_K#Z()
7ff75555c866 mysqld.exe!?deallocate#?$allocator#V?$sub_match#V?$_String_const_iterator#V?$_String_val#U?$_Simple_types#D#std###std###std###std###std##QEAAXQEAV?$sub_match#V?$_String_const_iterator#V?$_String_val#U?$_Simple_types#D#std###std###std###2#_K#Z()
7ff75555c46e mysqld.exe!?deallocate#?$allocator#V?$sub_match#V?$_String_const_iterator#V?$_String_val#U?$_Simple_types#D#std###std###std###std###std##QEAAXQEAV?$sub_match#V?$_String_const_iterator#V?$_String_val#U?$_Simple_types#D#std###std###std###2#_K#Z()
7ff7554640f2 mysqld.exe!??$endl#DU?$char_traits#D#std###std##YAAEAV?$basic_ostream#DU?$char_traits#D#std###0#AEAV10##Z()
7ff755466d8d mysqld.exe!??$endl#DU?$char_traits#D#std###std##YAAEAV?$basic_ostream#DU?$char_traits#D#std###0#AEAV10##Z()
7ff755465e2f mysqld.exe!??$endl#DU?$char_traits#D#std###std##YAAEAV?$basic_ostream#DU?$char_traits#D#std###0#AEAV10##Z()
7ff755465ccb mysqld.exe!??$endl#DU?$char_traits#D#std###std##YAAEAV?$basic_ostream#DU?$char_traits#D#std###0#AEAV10##Z()
7ff7554630c8 mysqld.exe!??$endl#DU?$char_traits#D#std###std##YAAEAV?$basic_ostream#DU?$char_traits#D#std###0#AEAV10##Z()
7ff755474202 mysqld.exe!??$endl#DU?$char_traits#D#std###std##YAAEAV?$basic_ostream#DU?$char_traits#D#std###0#AEAV10##Z()
7ff755477cc4 mysqld.exe!??$endl#DU?$char_traits#D#std###std##YAAEAV?$basic_ostream#DU?$char_traits#D#std###0#AEAV10##Z()
7ff75553033d mysqld.exe!?deallocate#?$allocator#V?$sub_match#V?$_String_const_iterator#V?$_String_val#U?$_Simple_types#D#std###std###std###std###std##QEAAXQEAV?$sub_match#V?$_String_const_iterator#V?$_String_val#U?$_Simple_types#D#std###std###std###2#_K#Z()
7fffe04d1bb2 ucrtbase.dll!_configthreadlocale()
7fffe0807034 KERNEL32.DLL!BaseThreadInitThunk()
7fffe27026a1 ntdll.dll!RtlUserThreadStart()
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0):
Connection ID (thread ID): 0
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.
I recommend starting with --innodb_force_recovery = 4, dump all your tables, and start with a fresh installation of MySQL. Reimport them. Also, check the disk for errors, maybe because of the power outage, it's a physical problem with the disk and the data was corrupted.

After including option --skip-grant-tables in configuration file, mysqld starts, runs, and then stops immediately

My situation is the following. I can't remember my root user passsword for accessing mysqld. I'm attempting to start mysqld with the option --skip-grant-tables option in the my.ini configuration file. However, I observe that when I enable the option and then try to restart mysqld (from Task Manager, for example), the service starts, runs, and then immediately stops. I've included a Screencastify video to show you the steps I take (1min50secs long). I'm also including the error file contents below for your review. I see a mention of an error but I don't understand its message.
2022-08-25T17:52:06.012094Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2022-08-25T17:52:06.015237Z 0 [System] [MY-010116] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.28) starting as process 1048
2022-08-25T17:52:06.045494Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-25T17:52:06.398313Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-08-25T17:52:06.642873Z 0 [Warning] [MY-011311] [Server] Plugin mysqlx reported: 'All I/O interfaces are disabled, X Protocol won't be accessible'
2022-08-25T17:52:06.725383Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-08-25T17:52:06.726481Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2022-08-25T17:52:06.757168Z 0 [System] [MY-010931] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: ready for connections. Version: '8.0.28' socket: '' port: 0 MySQL Community Server - GPL.
2022-08-25T17:52:06.759476Z 0 [ERROR] [MY-010131] [Server] TCP/IP, --shared-memory, or --named-pipe should be configured on NT OS
2022-08-25T17:52:06.760755Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-25T17:52:07.903037Z 0 [ERROR] [MY-013183] [InnoDB] Assertion failure: trx0sys.cc:644:UT_LIST_GET_LEN(trx_sys->mysql_trx_list) == 0 thread 26320
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.
17:52:07 UTC - mysqld got exception 0x16 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
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...
7ff78a48fd48 mysqld.exe!?my_print_stacktrace##YAXPEBEK#Z()
7ff7896c004b mysqld.exe!?print_fatal_signal##YAXH#Z()
7ff7896bfe13 mysqld.exe!?my_server_abort##YAXXZ()
7ff78a47643a mysqld.exe!?my_abort##YAXXZ()
7ff78a6ac579 mysqld.exe!??$endl#DU?$char_traits#D#std###std##YAAEAV?$basic_ostream#DU?$char_traits#D#std###0#AEAV10##Z()
7ff78a5e8167 mysqld.exe!?set_compression_level#Zstd_comp#compression#transaction#binary_log##UEAAXI#Z()
7ff78a67033b mysqld.exe!??$endl#DU?$char_traits#D#std###std##YAAEAV?$basic_ostream#DU?$char_traits#D#std###0#AEAV10##Z()
7ff78a568550 mysqld.exe!?set_compression_level#Zstd_comp#compression#transaction#binary_log##UEAAXI#Z()
7ff7894a452b mysqld.exe!?ha_finalize_handlerton##YAHPEAUst_plugin_int###Z()
7ff7894e2304 mysqld.exe!?memcached_shutdown##YAXXZ()
7ff7894e78d9 mysqld.exe!?plugin_unlock_list##YAXPEAVTHD##PEAPEAUst_plugin_int##_K#Z()
7ff7894e6630 mysqld.exe!?plugin_shutdown##YAXXZ()
7ff789482d49 mysqld.exe!?check_valid_arguments_processor#Item_func##UEAA_NPEAE#Z()
7ff78949679a mysqld.exe!?underflow#?$basic_stringbuf#DU?$char_traits#D#std##V?$allocator#D#2##std##MEAAHXZ()
7ff78949531f mysqld.exe!?setup_conn_event_handler_threads##YAXXZ()
7ff7894988be mysqld.exe!?win_main##YAHHPEAPEAD#Z()
7ff7894916f5 mysqld.exe!?mysql_service##YAHPEAX#Z()
7ff789491d54 mysqld.exe!?mysqld_main##YAHHPEAPEAD#Z()
7ff78ab0b298 mysqld.exe!?set_timespec_nsec##YAXPEAUtimespec##_K#Z()
7ffe8b437034 KERNEL32.DLL!BaseThreadInitThunk()
7ffe8b742651 ntdll.dll!RtlUserThreadStart()
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.
Any help will be appreciated. Thank you.
Enabling shared memory in server section of config file resolved the issue.
See this Stackoverflow post for context.
If you have an issue starting MySQL, try editing the my.ini configuration file, and set innodb_force_recovery to perhaps 3.
Here's how i've reset MySQL root password on Centos; note it's from the command line.
systemctl stop mysqld
systemctl set-environment MYSQLD_OPTS=--skip-grant-tables
systemctl start mysqld
mysql> UPDATE mysql.user SET authentication_string = PASSWORD ('ENTER_NEW_PASSWORD') WHERE User = 'root' AND Host = 'localhost';
mysql> FLUSH PRIVILEGES;
mysql> quit
systemctl stop mysqld
systemctl unset-environment MYSQLD_OPTS
systemctl start mysqld
# test #
mysql -u root#localhost -p

MySQL docker image crashes after creating new table

MySQL docker image server stopped working after I added new table to the db. It was quite major change, because new table is from now on major one.
Long story short, before I had some entities related to user (many to one), now I added another relation to the entities which basically kind of groups them.
Before it was like this:
User -OneToMany- Processes
Process -OneToOne- CompanySearches
Main view was the User panel with list of Processes
and now it is like:
User -OneToMany- Processes
Process -OneToOne- CompanySearch
Company(new) -OneToMany- Processes (which includes CompanySearch)
Main view is User panel with list of Companies
Company view has list of processes related to this company
App is built with NestJS + Sequelize + MySQL + React
If I delete database and build everything from scratch everything works like a charm, but if I create some records on the previous version and try to run new version of app this error is displayed in the console
2022-07-27T13:26:05.182073Z 0 [System] [MY-010229] [Server] Starting XA crash recovery...
2022-07-27T13:26:05.193465Z 0 [System] [MY-010232] [Server] XA crash recovery finished.
2022-07-27T13:26:05.455066Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-07-27T13:26:05.455892Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2022-07-27T13:26:05.471899Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2022-07-27T13:26:05.697069Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2022-07-27T13:26:05.697720Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.28' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
2022-07-27T13:26:06.380296Z 0 [ERROR] [MY-013183] [InnoDB] Assertion failure: dict0dict.cc:3378:for_table || ref_table thread 278221408000
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.
13:26:06 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x40cc000b20
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 = 40c749bc20 thread_stack 0x100000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x3d) [0x400212557d]
/usr/sbin/mysqld(print_fatal_signal(int)+0x303) [0x40011a2453]
/usr/sbin/mysqld(my_server_abort()+0x6e) [0x40011a256e]
/usr/sbin/mysqld(my_abort()+0xa) [0x400211f70a]
/usr/sbin/mysqld(ut_dbg_assertion_failed(char const*, char const*, unsigned long)+0x326) [0x40023f6ce6]
/usr/sbin/mysqld(dict_foreign_add_to_cache(dict_foreign_t*, char const**, bool, bool, dict_err_ignore_t)+0x3aa) [0x40024dcb1a]
/usr/sbin/mysqld(dd_table_load_fk_from_dd(dict_table_t*, dd::Table const*, char const**, dict_err_ignore_t, bool)+0x4fc) [0x40024f52bc]
/usr/sbin/mysqld(dd_table_load_fk(dd::cache::Dictionary_client*, char const*, char const**, dict_table_t*, dd::Table const*, THD*, bool, bool, std::deque<char const*, ut::allocator<char const*, ut::detail::allocator_base_pfs<char const*> > >*)+0x68) [0x40024f7698]
/usr/sbin/mysqld(dict_table_t* dd_open_table_one<dd::Table>(dd::cache::Dictionary_client*, TABLE const*, char const*, dd::Table const*, THD*, std::deque<char const*, ut::allocator<char const*, ut::detail::allocator_base_pfs<char const*> > >&)+0x1bd0) [0x40024f9340]
/usr/sbin/mysqld(dict_table_t* dd_open_table<dd::Table>(dd::cache::Dictionary_client*, TABLE const*, char const*, dd::Table const*, THD*)+0xc1) [0x40024fcdd1]
/usr/sbin/mysqld(dd_table_open_on_dd_obj(THD*, dd::cache::Dictionary_client*, dd::Table const&, dd::Partition const*, char const*, dict_table_t*&, TABLE const*)+0xd98) [0x40024fdbd8]
/usr/sbin/mysqld(+0x24fe019) [0x40024fe019]
/usr/sbin/mysqld(dd_table_open_on_id(unsigned long, THD*, MDL_ticket**, bool, bool)+0x89d) [0x40024fed3d]
/usr/sbin/mysqld(row_purge_step(que_thr_t*)+0x5ba) [0x40023562da]
/usr/sbin/mysqld(que_run_threads(que_thr_t*)+0xd38) [0x400230d718]
/usr/sbin/mysqld(trx_purge(unsigned long, unsigned long, bool)+0x1df) [0x40023bb50f]
/usr/sbin/mysqld(srv_purge_coordinator_thread()+0xbca) [0x400238fefa] /usr/sbin/mysqld(std::thread::_State_impl<std::thread::_Invoker<std::tuple<Detached_thread, void (*)()> > >::_M_run()+0xbc) [0x40022ae56c]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xbbb2f) [0x4006115b2f]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7fa3) [0x4005c0dfa3]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x4006473eff]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0): Connection ID (thread ID): 0
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.
exited with code 2
2022-07-27 13:26:10+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-07-27 13:26:11+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.28-1debian10 started.
2022-07-27T13:26:14.491966Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.28) starting as process 1
2022-07-27T13:26:14.544524Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2022-07-27T13:26:14.758211Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-07-27T13:26:15.185006Z 1 [ERROR] [MY-012585] [InnoDB] Linux Native AIO interface is not supported on this platform. Please check your OS documentation and install appropriate binary of InnoDB.
2022-07-27T13:26:15.186329Z 1 [Warning] [MY-012654] [InnoDB] Linux Native AIO disabled.
2022-07-27T13:26:17.842927Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
I can't even run migration when db server crashes

mysql services restarted automatically in ubuntu 18.04

Good day!
I am getting the followin error and everytime i get this the sql service gets restarted automatically.
We tried changing the max_open_files and Limitnofile but still unlucky.
The error below:#
2021-02-24T05:48:23.615394Z 135 [Warning] [MY-010057] [Server] IP address '144.217.89.37' has been resolved to the host name '37.ip-144-217-89.net', which resembles IPv4-address itself.
05:55:13 UTC - mysqld got signal 11 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x7fba5418e130
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 = 7fba64a5ed10 thread_stack 0xc0000
/usr/sbin/`mysqld`(my_print_stacktrace(unsigned char const*, unsigned long)+0x3d) [0x55b2aaf1049d]
/usr/sbin/mysqld(handle_fatal_signal+0x2fb) [0x55b2a9eba22b]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12980) [0x7fbac2056980]
/usr/sbin/mysqld(+0xf293ce) [0x55b2a9d5d3ce]
/usr/sbin/mysqld(+0xf295f2) [0x55b2a9d5d5f2]
/usr/sbin/mysqld(+0xf29623) [0x55b2a9d5d623]
/usr/sbin/mysqld(JOIN::finalize_table_conditions()+0xeb) [0x55b2a9d6387b]
/usr/sbin/mysqld(JOIN::optimize()+0x2e16) [0x55b2a9d77866]
/usr/sbin/mysqld(SELECT_LEX::optimize(THD*)+0xb6) [0x55b2a9dd3c46]
/usr/sbin/mysqld(SELECT_LEX_UNIT::optimize(THD*, TABLE*, bool)+0x7b) [0x55b2a9e423eb]
/usr/sbin/mysqld(SELECT_LEX::optimize(THD*)+0x115) [0x55b2a9dd3ca5]
/usr/sbin/mysqld(SELECT_LEX_UNIT::optimize(THD*, TABLE*, bool)+0x7b) [0x55b2a9e423eb]
/usr/sbin/mysqld(Sql_cmd_dml::execute_inner(THD*)+0x3d) [0x55b2a9dd265d]
/usr/sbin/mysqld(Sql_cmd_dml::execute(THD*)+0x598) [0x55b2a9ddc6e8]
/usr/sbin/mysqld(mysql_execute_command(THD*, bool)+0xaae) [0x55b2a9d7f46e]
/usr/sbin/mysqld(sp_instr_stmt::exec_core(THD*, unsigned int*)+0x51) [0x55b2a9cfbe71]
/usr/sbin/mysqld(sp_lex_instr::reset_lex_and_exec_core(THD*, unsigned int*, bool)+0x17b) [0x55b2a9cfdd4b]
/usr/sbin/mysqld(sp_lex_instr::validate_lex_and_execute_core(THD*, unsigned int*, bool)+0xde) [0x55b2a9cfecfe]
/usr/sbin/mysqld(sp_instr_stmt::execute(THD*, unsigned int*)+0xc3) [0x55b2a9d00543]
/usr/sbin/mysqld(sp_head::execute(THD*, bool)+0x3be) [0x55b2a9cf50de]
/usr/sbin/mysqld(sp_head::execute_procedure(THD*, mem_root_deque<Item*>*)+0x7e3) [0x55b2a9cf8423]
/usr/sbin/mysqld(Sql_cmd_call::execute_inner(THD*)+0x136) [0x55b2aa20b106]
/usr/sbin/mysqld(Sql_cmd_dml::execute(THD*)+0x598) [0x55b2a9ddc6e8]
/usr/sbin/mysqld(mysql_execute_command(THD*, bool)+0xaae) [0x55b2a9d7f46e]
/usr/sbin/mysqld(dispatch_sql_command(THD*, Parser_state*)+0x3f9) [0x55b2a9d82d29]
/usr/sbin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x15ed) [0x55b2a9d8480d]
/usr/sbin/mysqld(do_command(THD*)+0x1c4) [0x55b2a9d85fe4]
/usr/sbin/mysqld(+0x1077020) [0x55b2a9eab020]
/usr/sbin/mysqld(+0x2640091) [0x55b2ab474091]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7fbac204b6db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fbac023d71f]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7fba549617f8): is an invalid pointer
Connection ID (thread ID): 28
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.
2021-02-24T05:55:13.760686Z 0 [Warning] [MY-010140] [Server] Could not increase number of max_open_files to more than 10000 (request: 25000)2021-02-24T05:55:13.760686Z 0 [Warning] [MY-010140] [Server] Could not increase number of max_open_files to more than 10000 (request: 25000)
2021-02-24T05:55:14.042554Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.23) starting as process 31229
2021-02-24T05:55:14.054670Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-02-24T05:55:14.941930Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-02-24T05:55:15.232295Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2021-02-24T05:55:15.260938Z 0 [System] [MY-010229] [Server] Starting XA crash recovery...
2021-02-24T05:55:15.273573Z 0 [System] [MY-010232] [Server] XA crash recovery finished.
2021-02-24T05:55:15.316036Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-02-24T05:55:15.316219Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-02-24T05:55:15.344388Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.23' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
2021-02-24T05:55:15.551426Z 8 [Warning] [MY-010057] [Server] IP address '167.114.185.61' has been resolved to the host name '61.ip-167-114-185.net', which resembles IPv4-address itself.
Anyone has anyidea. The current mysql version is 8.0.23 community version.