最近几天,我经常遇到mysql崩溃的情况,好像数据库损坏了ant,而不是mysql不断重启,但无法保持稳定。我已经检查了磁盘,但是看起来还可以。我需要一些建议,以了解如何读取此错误以及要检查什么?
在错误日志中我发现了此错误
2019-05-22T13:29:28.226689Z 0 [System] [MY-010116] [Server] /usr/local/opt/mysql/bin/mysqld (mysqld 8.0.16) starting as process 88218
2019-05-22T13:29:28.232672Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
2019-05-22T13:29:28.326779Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 35
2019-05-22T13:29:29.326903Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 35
2019-05-22T13:29:30.401687Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 35
2019-05-22T13:29:31.475526Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 35
2019-05-22T13:29:32.545354Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 35
2019-05-22T13:29:33.637548Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 35
2019-05-22T13:29:33.637575Z 1 [ERROR] [MY-013183] [InnoDB] Assertion failure: fil0fil.cc:2509:success thread 123145356632064
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:29:33 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x7fabcb081400
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 = 7000033cdea0 thread_stack 0x46000
0 mysqld 0x000000010b9d7443 my_print_stacktrace(unsigned char*, unsigned long) + 60
1 mysqld 0x000000010b0a98d6 handle_fatal_signal + 438
2 libsystem_platform.dylib 0x00007fff6d9b6b5d _sigtramp + 29
3 ??? 0x000000010ff19b76 0x0 + 4562459510
4 libsystem_c.dylib 0x00007fff6d8706a6 abort + 127
5 mysqld 0x000000010bccabdc ut_dbg_assertion_failed(char const*, char const*, unsigned long) + 332
6 mysqld 0x000000010bb1ba53 Fil_shard::open_file(fil_node_t*, bool) + 791
7 mysqld 0x000000010bb1d79d Fil_shard::open_system_tablespaces(unsigned long, unsigned long*) + 159
8 mysqld 0x000000010bb1d86d Fil_system::open_all_system_tablespaces() + 57
9 mysqld 0x000000010bc951a6 srv_start(bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 3002
10 mysqld 0x000000010bb9180d innobase_ddse_dict_init(dict_init_mode_t, unsigned int, List<dd::Object_table const>*, List<Plugin_tablespace const>*) + 451
11 mysqld 0x000000010b89cdba dd::bootstrap::DDSE_dict_init(THD*, dict_init_mode_t, unsigned int) + 108
12 mysqld 0x000000010b9bdbae dd::upgrade_57::do_pre_checks_and_initialize_dd(THD*) + 1805
13 mysqld 0x000000010ad5e92a bootstrap::handle_bootstrap(void*) + 185
14 mysqld 0x000000010bd1eea0 pfs_spawn_thread(void*) + 320
15 libsystem_pthread.dylib 0x00007fff6d9bf2eb _pthread_body + 126
16 libsystem_pthread.dylib 0x00007fff6d9c2249 _pthread_start + 66
17 libsystem_pthread.dylib 0x00007fff6d9be40d thread_start + 13
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0):
Connection ID (thread ID): 1
Status: NOT_KILLED
答案 0 :(得分:0)
去年,我在 macOS 上的三台不同计算机(两台 macbook pro,一台 iMac)上发生了多次 (5+) MySQL 8 不可恢复的 innodb 崩溃。
最近的今天:
2021-06-21T13:12:44.863980Z 0 [System] [MY-010116] [Server] /usr/local/Cellar/mysql/8.0.25_1/bin/mysqld (mysqld 8.0.25) starting as process 46771
2021-06-21T13:12:44.866651Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
2021-06-21T13:12:44.909851Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-06-21T13:12:44.992890Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-06-21T13:12:45.069896Z 1 [ERROR] [MY-013183] [InnoDB] Assertion failure: dict0dict.cc:3343:for_table || ref_table thread 0x7000063a7000
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:12:45 UTC - mysqld got signal 6 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x7fa8b0023c00
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 = 7000063a6f50 thread_stack 0x46000
0 mysqld 0x0000000101d5a9fe my_print_stacktrace(unsigned char const*, unsigned long) + 60
1 mysqld 0x0000000101365a34 handle_fatal_signal + 434
2 libsystem_platform.dylib 0x00007fff2052dd7d _sigtramp + 29
3 ??? 0x0000000000004cba 0x0 + 19642
4 libsystem_c.dylib 0x00007fff2043d411 abort + 120
5 mysqld 0x0000000102013b34 ut_dbg_assertion_failed(char const*, char const*, unsigned long) + 394
6 mysqld 0x0000000101dfdc15 dict_foreign_add_to_cache(dict_foreign_t*, char const**, bool, bool, dict_err_ignore_t) + 1159
7 mysqld 0x0000000101e0de73 dd_table_load_fk_from_dd(dict_table_t*, dd::Table const*, char const**, dict_err_ignore_t, bool) + 1630
8 mysqld 0x0000000101e0dfeb dd_table_load_fk(dd::cache::Dictionary_client*, char const*, char const**, dict_table_t*, dd::Table const*, THD*, bool, bool, std::__1::deque<char const*, ut_allocator<char const*> >*) + 75
9 mysqld 0x0000000101e12074 dict_table_t* dd_open_table_one<dd::Table>(dd::cache::Dictionary_client*, TABLE const*, char const*, dd::Table const*, THD*, std::__1::deque<char const*, ut_allocator<char const*> >&) + 6405
10 mysqld 0x0000000101e066aa dict_table_t* dd_open_table<dd::Table>(dd::cache::Dictionary_client*, TABLE const*, char const*, dd::Table const*, THD*) + 60
11 mysqld 0x0000000101e064dd dd_table_open_on_dd_obj(THD*, dd::cache::Dictionary_client*, dd::Table const&, dd::Partition const*, char const*, dict_table_t*&, TABLE const*) + 1397
12 mysqld 0x0000000101e072e2 dd_table_open_on_id_low(THD*, MDL_ticket**, unsigned long long) + 1246
13 mysqld 0x0000000101e06c29 dd_table_open_on_id(unsigned long long, THD*, MDL_ticket**, bool, bool) + 1335
14 mysqld 0x0000000101f392c5 MetadataRecover::apply() + 69
15 mysqld 0x0000000101fdc2e8 srv_dict_recover_on_restart() + 144
16 mysqld 0x0000000101eb7bae innobase_dict_recover(dict_recovery_mode_t, unsigned int) + 1506
17 mysqld 0x0000000101c0fec4 dd::bootstrap::restart(THD*) + 248
18 mysqld 0x0000000101d425a4 dd::upgrade_57::restart_dictionary(THD*) + 76
19 mysqld 0x0000000101d40e4d dd::upgrade_57::do_pre_checks_and_initialize_dd(THD*) + 1334
20 mysqld 0x0000000100fb11f0 bootstrap::handle_bootstrap(void*) + 225
21 mysqld 0x00000001020783ca pfs_spawn_thread(void*) + 290
22 libsystem_pthread.dylib 0x00007fff204e88fc _pthread_start + 224
23 libsystem_pthread.dylib 0x00007fff204e4443 thread_start + 15
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0):
Connection ID (thread ID): 1
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-06-21T13:12:45.6NZ mysqld_safe mysqld from pid file /usr/local/var/mysql/samaritan.pid ended
stnor@samaritan mysql %