mysqld got signal 11

【1】mysql实例启动故障

5.7.21 -》 5.7.42 数据库升级后,启动发现错误日志如下

2023-08-10T23:05:53.463377+08:00 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2023-08-10T23:05:53.463537+08:00 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2023-08-10T23:05:53.463579+08:00 0 [Note] mysqld (mysqld 5.7.42-log) starting as process 3252 ...
2023-08-10T23:05:53.584149+08:00 0 [Note] InnoDB: PUNCH HOLE support available
2023-08-10T23:05:53.584211+08:00 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2023-08-10T23:05:53.584219+08:00 0 [Note] InnoDB: Uses event mutexes
2023-08-10T23:05:53.584225+08:00 0 [Note] InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
2023-08-10T23:05:53.584233+08:00 0 [Note] InnoDB: Compressed tables use zlib 1.2.13
2023-08-10T23:05:53.584239+08:00 0 [Note] InnoDB: Using Linux native AIO
2023-08-10T23:05:53.585577+08:00 0 [Note] InnoDB: Number of pools: 1
2023-08-10T23:05:53.585723+08:00 0 [Note] InnoDB: Using CPU crc32 instructions
2023-08-10T23:05:53.590110+08:00 0 [Note] InnoDB: Initializing buffer pool, total size = 32G, instances = 8, chunk size = 128M
2023-08-10T23:05:56.038223+08:00 0 [Note] InnoDB: Completed initialization of buffer pool
2023-08-10T23:05:56.560711+08:00 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2023-08-10T23:05:56.591687+08:00 0 [Note] InnoDB: Highest supported file format is Barracuda.
2023-08-10T23:05:56.968207+08:00 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 4931548026404
2023-08-10T23:05:56.968285+08:00 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 4931548043959
2023-08-10T23:05:56.969722+08:00 0 [Note] InnoDB: Database was not shutdown normally!
2023-08-10T23:05:56.969743+08:00 0 [Note] InnoDB: Starting crash recovery.
2023-08-10T23:05:57.375955+08:00 0 [Note] InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percent: 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 
2023-08-10T23:05:58.845147+08:00 0 [Note] InnoDB: Apply batch completed
2023-08-10T23:05:58.845223+08:00 0 [Note] InnoDB: Last MySQL binlog file position 0 8974080, file name mysql_bin.002478
2023-08-10T23:05:59.320348+08:00 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2023-08-10T23:05:59.320397+08:00 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2023-08-10T23:05:59.320475+08:00 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2023-08-10T23:05:59.343236+08:00 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2023-08-10T23:05:59.346806+08:00 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2023-08-10T23:05:59.346864+08:00 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2023-08-10T23:05:59.348142+08:00 0 [Note] InnoDB: Waiting for purge to start
2023-08-10T23:05:59.398428+08:00 0 [Note] InnoDB: 5.7.42 started; log sequence number 4931548043959
2023-08-10T23:05:59.400101+08:00 0 [Note] InnoDB: Loading buffer pool(s) from /data/mysql/mysqldata/ib_buffer_pool
2023-08-10T23:05:59.402214+08:00 0 [Note] Plugin 'FEDERATED' is disabled.
230810 23:05:59 server_audit: MariaDB Audit Plugin version 1.4.13 STARTED.
230810 23:05:59 server_audit: logging started to the file /data/mysql/logs/audit.log.
2023-08-10T23:05:59.415293+08:00 0 [Note] Recovering after a crash using /data/mysql/binlog/mysql_bin
2023-08-10T23:05:59.415334+08:00 0 [Note] Starting crash recovery...
2023-08-10T23:05:59.415375+08:00 0 [Note] Crash recovery finished.
2023-08-10T23:05:59.430205+08:00 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2023-08-10T23:05:59.430293+08:00 0 [Note] Skipping generation of SSL certificates as certificate files are present in data directory.
2023-08-10T23:05:59.430394+08:00 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.
2023-08-10T23:05:59.430423+08:00 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.
2023-08-10T23:05:59.432689+08:00 0 [Warning] CA certificate ca.pem is self signed.
2023-08-10T23:05:59.432845+08:00 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2023-08-10T23:05:59.433191+08:00 0 [Note] Server hostname (bind-address): '*'; port: 3306
2023-08-10T23:05:59.433301+08:00 0 [Note] IPv6 is available.
2023-08-10T23:05:59.433329+08:00 0 [Note]   - '::' resolves to '::';
2023-08-10T23:05:59.433421+08:00 0 [Note] Server socket created on IP: '::'.
2023-08-10T23:05:59.457927+08:00 0 [Warning] Recovery from master pos 66041478 and file mysql_bin.001570 for channel '10.18.51.33'. Previous relay log pos and relay log file had been set to 4, /data/mysql/binlog/mysql_relay_bin-10@002e18@002e51@002e33.002246 respectively.
2023-08-10T23:05:59.464291+08:00 0 [Warning] Recovery from master pos 244048313 and file mysql_bin.001144 for channel '10.18.51.36'. Previous relay log pos and relay log file had been set to 4, /data/mysql/binlog/mysql_relay_bin-10@002e18@002e51@002e36.003410 respectively.
2023-08-10T23:05:59.470618+08:00 0 [Warning] Recovery from master pos 160184753 and file mysql_bin.000402 for channel '10.18.51.39'. Previous relay log pos and relay log file had been set to 4, /data/mysql/binlog/mysql_relay_bin-10@002e18@002e51@002e39.001131 respectively.
2023-08-10T23:05:59.477027+08:00 0 [Warning] Recovery from master pos 1062380540 and file mysql-bin.000150 for channel '10.18.51.59'. Previous relay log pos and relay log file had been set to 4, /data/mysql/binlog/mysql_relay_bin-10@002e18@002e51@002e59.000858 respectively.
15:05:59 UTC - mysqld got signal 11 ;
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=2147483648
read_buffer_size=4194304
max_used_connections=0
max_threads=2048
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 = 44067632 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x394c8720
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 = 7fffe0204008 thread_stack 0x40000
mysqld(my_print_stacktrace+0x35)[0xf83e25]
mysqld(handle_fatal_signal+0x4b9)[0x800999]
/lib64/libpthread.so.0(+0xf630)[0x7f29aaaaf630]
/usr/local/mysql-5.7.42-linux-glibc2.12-x86_64/lib/plugin/server_audit.so(get_db_mysql57+0x30)[0x7f20c0071d80]
/usr/local/mysql-5.7.42-linux-glibc2.12-x86_64/lib/plugin/server_audit.so(+0xce8b)[0x7f20c0071e8b]
mysqld(_Z18mysql_audit_notifyP3THD30mysql_event_general_subclass_tPKciS3_m+0x2f1)[0x802ff1]
mysqld(my_message_sql+0x134)[0x7f2be4]
mysqld(my_error+0xe0)[0xf7ec40]
mysqld(_Z16open_table_errorP11TABLE_SHAREiii+0x33c)[0xdf29dc]
mysqld(_Z14open_table_defP3THDP11TABLE_SHAREj+0x37b)[0xdfa06b]
mysqld(_Z15get_table_shareP3THDP10TABLE_LISTPKcmjPij+0x172)[0xcee052]
mysqld(_Z10open_tableP3THDP10TABLE_LISTP18Open_table_context+0x8bf)[0xcf05df]
mysqld(_Z11open_tablesP3THDPP10TABLE_LISTPjjP19Prelocking_strategy+0xc8e)[0xcf274e]
mysqld(_ZN22PFS_engine_table_share15check_one_tableEP3THD+0x19a)[0x11615fa]
mysqld(_ZN22PFS_engine_table_share16check_all_tablesEP3THD+0x2c)[0x11617cc]
mysqld(_Z24check_performance_schemav+0x49)[0x115c1c9]
mysqld(_Z11mysqld_mainiPPc+0x17c7)[0x7fd557]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f29a9483555]
mysqld[0x7f0699]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0): is an invalid pointer
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.

【2】分析与结论

结论,引用了插件,但插件不支持,所以报错,my.cnf 

(1)内存分析

找了一下 perror :OS error code 11: Resource temporarily unavailable
对应修改了一下,key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 86010672 K bytes of memory
总内存48 G的服务器让这个计算值达到 14398550 K,还是一样的错误

(2)结论

审计插件的问题,升级后升级插件无法适应新版本。配置文件中去掉该参数后重启启动成功。

/usr/local/mysql-5.7.42-linux-glibc2.12-x86_64/lib/plugin/server_audit.so(get_db_mysql57+0x30)[0x7f20c0071d80]
/usr/local/mysql-5.7.42-linux-glibc2.12-x86_64/lib/plugin/server_audit.so(+0xce8b)[0x7f20c0071e8b]
mysqld(_Z18mysql_audit_notifyP3THD30mysql_event_general_subclass_tPKciS3_m+0x2f1)[0x802ff1]
mysqld(my_message_sql+0x134)[0x7f2be4]
mysqld(my_error+0xe0)[0xf7ec40]

 

posted @ 2023-11-02 11:41  郭大侠1  阅读(324)  评论(0编辑  收藏  举报