20211007 MariaDB

JM·2021년 10월 8일
0

Trouble shooting

목록 보기
5/5

1. 구성

  • MariaDB 10.0
  • Single

2. 장애 사항

  • 관리자 실수로 데이터 export 대신 import
  • 기존 백업 파일로 복구 진행 (운영중 데이터 디렉토리 COPY 백업)
  • 서비스 중 연결 끊어지는 현상 발생으로 원인 분석 요청

3. 에러 로그

[Note] /usr/sbin/mysqld (mysqld 10.0.25-MariaDB) starting as process 22335 ...
[Note] InnoDB: Using mutexes to ref count buffer pool pages
[Note] InnoDB: The InnoDB memory heap is disabled
[Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
[Note] InnoDB: Memory barrier is not used
[Note] InnoDB: Compressed tables use zlib 1.2.7
[Note] InnoDB: Using Linux native AIO
[Note] InnoDB: Using CPU crc32 instructions
[Note] InnoDB: Initializing buffer pool, size = 128.0M
[Note] InnoDB: Completed initialization of buffer pool
[Note] InnoDB: Highest supported file format is Barracuda.
[Note] InnoDB: Log scan progressed past the checkpoint lsn 17734629204
[Note] InnoDB: Database was not shutdown normally!
[Note] InnoDB: Starting crash recovery.
[Note] InnoDB: Reading tablespace information from the .ibd files...
[Note] InnoDB: Restoring possible half-written data pages
[Note] InnoDB: from the doublewrite buffer...
InnoDB: Doing recovery: scanned up to log sequence number 17734629466
[Note] InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percent: 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
[Note] InnoDB: 128 rollback segment(s) are active.
[Note] InnoDB: Waiting for purge to start
[Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.29-76.2 started; log sequence number 17734629466
[Note] Plugin 'FEEDBACK' is disabled.
[Note] Server socket created on IP: '::'.
[Note] /usr/sbin/mysqld: ready for connections.
Version: '10.0.25-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
[Warning] IP address 'xxx.xxx.xxx.xxx' could not be resolved: Temporary failure in name resolution
7f2eb8dd2700  InnoDB: Assertion failure in thread 139838646724352 in file fsp0fsp.cc line 2480
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.6/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
[ERROR] 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.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Server version: 10.0.25-MariaDB
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=1
max_threads=153
thread_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467005 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0x7f2e9cffa008
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 = 0x7f2eb8dd1d80 thread_stack 0x48000
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0xbd3c0e]
/usr/sbin/mysqld(handle_fatal_signal+0x390)[0x73c140]
/lib64/libpthread.so.0(+0xf100)[0x7f2eb8a1c100]
/lib64/libc.so.6(gsignal+0x37)[0x7f2eb71d05f7]
/lib64/libc.so.6(abort+0x148)[0x7f2eb71d1ce8]
/usr/sbin/mysqld[0xa45dd2]
/usr/sbin/mysqld[0xa47d1c]
/usr/sbin/mysqld[0x9be7c1]
/usr/sbin/mysqld[0x9cbd43]
/usr/sbin/mysqld[0x94e7d0]
/usr/sbin/mysqld[0x94f31d]
/usr/sbin/mysqld[0x94f8dc]
/usr/sbin/mysqld[0x95ac37]
/usr/sbin/mysqld[0x8c4fb3]
/usr/sbin/mysqld(_ZN7handler12ha_write_rowEPh+0x3eb)[0x7463db]
/usr/sbin/mysqld(_Z12write_recordP3THDP5TABLEP12st_copy_info+0x60)[0x5b5e90]
/usr/sbin/mysqld(_Z12mysql_insertP3THDP10TABLE_LISTR4ListI4ItemERS3_IS5_ES6_S6_15enum_duplicatesb+0xd8e)[0x5b944e]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x2b6f)[0x5d552f]
/usr/sbin/mysqld(_ZN18Prepared_statement7executeEP6Stringb+0x46d)[0x5ed1cd]
/usr/sbin/mysqld(_ZN18Prepared_statement12execute_loopEP6StringbPhS2_+0x86)[0x5ed306]
/usr/sbin/mysqld(_Z19mysqld_stmt_executeP3THDPcj+0x148)[0x5ed598]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xfd6)[0x5dbff6]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x22b)[0x6a3a8b]
/usr/sbin/mysqld(handle_one_connection+0x39)[0x6a3b49]
/lib64/libpthread.so.0(+0x7dc5)[0x7f2eb8a14dc5]
/lib64/libc.so.6(clone+0x6d)[0x7f2eb729121d]


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

Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on

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.
mysqld_safe Number of processes running now: 0
mysqld_safe mysqld restarted

4. 원인 분석

  • 잘못된 백업 방식으로 인한 데이터 파일 손상 발생
  • 손상된 테이블 사용 시 DB 재기동
    • [ERROR] mysqld got signal 6
    • Query (0x7f2e8cc40020): is an invalid pointer
    • mysqld_safe mysqld restarted
profile
오픈소스 DB엔지니어

0개의 댓글