问题发生背景

问题实例之前使用的是percona server,是安装pmm镜像自带的数据库,之后通过mysqldump迁移到了MySQL server,目前是只有有pmm server 访问pmm库,MySQL server就crash,并通过守护进程mysqld_safe 自动重启,crash 集尝试重启的一部分信息如下

:: UTC - mysqld got signal  ;
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=
read_buffer_size=
max_used_connections=
max_threads=
thread_count=
connection_count=
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = K bytes of memory
Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x7f7ac8000b30
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 = 7f7b20769e28 thread_stack 0x40000
/usr/local/mysql/bin/mysqld(my_print_stacktrace+0x35)[0xf32bd5]
/usr/local/mysql/bin/mysqld(handle_fatal_signal+0x4a4)[0x77b844]
/lib64/libpthread.so.[0x3db380f710]
/usr/local/mysql/bin/mysqld(_ZN10Field_blob15copy_blob_valueEP11st_mem_root+0x30)[0x7ab940]
/usr/local/mysql/bin/mysqld(_Z25mysql_prepare_blob_valuesP3THDR4ListI4ItemEP11st_mem_root+0x35e)[0xe8309e]
/usr/local/mysql/bin/mysqld(_Z12write_recordP3THDP5TABLEP9COPY_INFOS4_+0x251)[0xe835d1]
/usr/local/mysql/bin/mysqld(_ZN14Sql_cmd_insert12mysql_insertEP3THDP10TABLE_LIST+0x8d2)[0xe84882]
/usr/local/mysql/bin/mysqld(_ZN14Sql_cmd_insert7executeEP3THD+0xce)[0xe8500e]
/usr/local/mysql/bin/mysqld(_Z21mysql_execute_commandP3THDb+0xd92)[0xd10fe2]
/usr/local/mysql/bin/mysqld(_ZN18Prepared_statement7executeEP6Stringb+0x320)[0xd3ddd0]
/usr/local/mysql/bin/mysqld(_ZN18Prepared_statement12execute_loopEP6StringbPhS2_+0xdb)[0xd3e04b]
/usr/local/mysql/bin/mysqld(_Z19mysqld_stmt_executeP3THDmmPhm+0x11f)[0xd3e4cf]
/usr/local/mysql/bin/mysqld(_Z16dispatch_commandP3THDPK8COM_DATA19enum_server_command+0x74c)[0xd15c3c]
/usr/local/mysql/bin/mysqld(_Z10do_commandP3THD+0x194)[0xd17114]
/usr/local/mysql/bin/mysqld(handle_connection+0x294)[0xde1c34]
/usr/local/mysql/bin/mysqld(pfs_spawn_thread+0x174)[0x11f96f4]
/lib64/libpthread.so.[0x3db38079d1]
/lib64/libpthread.so.[0x3db38079d1]
/lib64/libc.so.(clone+0x6d)[0x3db34e8b6d] Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f7ac80054f0): Query (7f7ac80054f0): is an invalid pointer
Connection ID (thread ID):
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. :: mysqld_safe Number of processes running now: :: mysqld_safe mysqld restarted
--11T11::.827511Z [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.

原 percona server 版本:5.7.18-16;目前MySQL server 版本:5.7.10

尝试将MySQL server 版本升级到5.7.20,无法解决问题,后来变更为percona server 5.7的一个分支版本解决问题

通过rmp 安装percona server

官方文档

# 安装yum 源
yum install http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm
# 安装percona server
yum install Percona-Server-server-

防止使用my.cnf启动,指定配置文件启动服务,使用现有的配置文件和数据文件

# 启动服务
/usr/bin/mysqld_multi --defaults-file=/etc/mysql/.cnf --mysqladmin=/usr/bin/mysqladmin --mysqld=/usr/bin/mysqld_safe --no-log start 3306
# 关闭服务
/usr/bin/mysqld_multi --defaults-file=/etc/mysql/3306.cnf --mysqladmin=/usr/bin/mysqladmin --mysqld=/usr/bin/mysqld_safe --no-log stop 3306
# 登陆
/usr/bin/mysql -S /tmp/mysql_3306.sock

关于MySQL server的pid-file 和mysqld_multi 的启动项

由于启动的选项是--defaults-extra-file 所以同时会读取全局变量文件/etc/my.cnf,可以设置为

[mysqld]
...
[mysqld_safe]
...
[mysqld_multi] mysqld=/usr/local/mysql/bin/mysqld_safe
mysqladmin=/usr/local/mysql/bin/mysqladmin

对于--mysqld 的值可以是二进制文件mysqld的位置(会读取[mysqld]下的配置),守护进程mysqld_safe不会启动

也可以是mysqld_safe启动脚本的位置(会读取[mysqld_safe]下的配置),mysqld和守护进程mysqld_safe都会启动,如下可以看到两者的运行信息

ps -ef|grep
root : pts/ :: /bin/sh /usr/local/mysql/bin/mysqld_safe --server-id= --user=mysql --port= --datadir=/data0/mysql/3309_test --socket=/tmp/mysql_3309.sock --innodb_data_home_dir=/data0/mysql/3309_test --innodb_log_group_home_dir=/data0/mysql/3309_test --transaction-isolation=READ-COMMITTED --explicit_defaults_for_timestamp=on --max_allowed_packet=100M --read_rnd_buffer_size=8M --tmp_table_size=128M --thread_cache_size= --max_connections= --max_heap_table_size=128M --open-files-limit= --max_connect_errors= --symbolic-links= --tmpdir=/data0/mysql/tmp --innodb_online_alter_log_max_size=1G --innodb_data_file_path=ibdata1:512M:autoextend --innodb_log_files_in_group= --innodb_buffer_pool_size=256M --innodb_log_file_size=100M --innodb_flush_log_at_trx_commit= --innodb_open_files= --innodb_lock_wait_timeout= --log-error=log-error --slow_query_log_file=slow_query.log --slow_launch_time= --slow_query_log= --log-bin=mysql-bin --binlog_format=ROW --max_binlog_size=1G --expire_logs_days= --master-info-repository=TABLE --relay-log-info-repository=TABLE --gtid-mode=on --enforce-gtid-consistency=on --log-slave-updates= --relay-log=relay-log --sync-master-info= --skip-slave-start --slave_pending_jobs_size_max= --log_bin_trust_function_creators= --report-port= --report-host=10.211.253.192 --slave-sql-verify-checksum= --master-verify-checksum= --slave_parallel_type=LOGICAL_CLOCK --slave-parallel-workers= --binlog_group_commit_sync_delay= --skip-name-resolve --lower_case_table_names= --character-set-server=utf8 --sql_mode=NO_AUTO_VALUE_ON_ZERO,STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION --slave_preserve_commit_order= --default_password_lifetime= --binlog_rows_query_log_events=
mysql : pts/ :: /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/data0/mysql/3309_test --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --server-id= --innodb-data-home-dir=/data0/mysql/3309_test --innodb-log-group-home-dir=/data0/mysql/3309_test --transaction-isolation=READ-COMMITTED --explicit-defaults-for-timestamp=on --max-allowed-packet=100M --read-rnd-buffer-size=8M --tmp-table-size=128M --thread-cache-size= --max-connections= --max-heap-table-size=128M --max-connect-errors= --symbolic-links= --tmpdir=/data0/mysql/tmp --innodb-online-alter-log-max-size=1G --innodb-data-file-path=ibdata1:512M:autoextend --innodb-log-files-in-group= --innodb-buffer-pool-size=256M --innodb-log-file-size=100M --innodb-flush-log-at-trx-commit= --innodb-open-files= --innodb-lock-wait-timeout= --slow-query-log-file=slow_query.log --slow-launch-time= --slow-query-log= --log-bin=mysql-bin --binlog-format=ROW --max-binlog-size=1G --expire-logs-days= --master-info-repository=TABLE --relay-log-info-repository=TABLE --gtid-mode=on --enforce-gtid-consistency=on --log-slave-updates= --relay-log=relay-log --sync-master-info= --skip-slave-start --slave-pending-jobs-size-max= --log-bin-trust-function-creators= --report-port= --report-host=10.211.253.192 --slave-sql-verify-checksum= --master-verify-checksum= --slave-parallel-type=LOGICAL_CLOCK --slave-parallel-workers= --binlog-group-commit-sync-delay= --skip-name-resolve --lower-case-table-names= --character-set-server=utf8 --sql-mode=NO_AUTO_VALUE_ON_ZERO,STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION --slave-preserve-commit-order= --default-password-lifetime= --binlog-rows-query-log-events= --log-error=/data0/mysql/3309_test/log-error.err --open-files-limit= --pid-file=/data0/mysql/3309_test/mysql-bcc03.dev.yz.pid --socket=/tmp/mysql_3309.sock --port=

如果pid-file在配置文件中没有指定,则默认为$datadir/`hostname`.pid

mysqld got signal 11的更多相关文章

  1. MySQL案例-mysqld got signal 11

    背景:MySQL-5.7.12, debian 8核16G虚拟机, 业务方反馈在某一个时间点, 出现了大量的数据库报错, 之后恢复正常; 场景:开发查看日志后, 发现在某个时间点, 应用断开了所有与数 ...

  2. Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1) 错误 解决方案(android-ndk)

    在android里做ndk编程的时候,碰到个随机性错误 错误信息如下: 05-06 15:59:44.411: A/libc(3347): Fatal signal 11 (SIGSEGV) at 0 ...

  3. 关于cocos2dx 3.0升级崩溃报错(unable to load native library) 和(Fatal signal 11 (SIGSEGV) at 0x00000000)

    近期一直在Windows平台开发cocos-2dx游戏,期间做了一次引擎升级,升级到了3.0正式版本号.Windows平台上表现非常正常,没有出现什么问题. 上周五准备公布一个安卓包,编译非常轻松的就 ...

  4. [cocos2d-x][apk打包][Fatal signal 11][andriod]Eclipse编译Fatal signal 11报错-都是字符赋值惹的祸

    流程重现: 使用coco2d-x制作了一个2048,在xcode模拟器执行以及在pad上真机调试都是没有问题的. 可是在使用eclipse调试打包android可以执行,可是进入游戏之后会在随机的地方 ...

  5. exited abnormally with signal 11: Segmentation fault 的相关处理

    前一阵子遇到一个问题,程序打包后,在某个界面总是崩溃,device log只打印了exited abnormally with signal 11: Segmentation fault 网上找了下相 ...

  6. Pycharm出现Segmentation fault...(interrupted by signal 11: SIGSEGV)的解决方法

    众所周知,用pycharm远程服务器debug代码已经成为学习深度学习相关代码的有力工具,但是最近创建了一个虚拟环境,进行debug的时候,莫名会出现下面这个错误,看的我都抽风了 bash: line ...

  7. 常见 core dump 原因分析signal 11 - SIGSEGV

    signal 6 - SIGABRT free 多次 char *p = malloc(100); free(p); free(p); fclose 多次 // fclose 内部调用 free FI ...

  8. A/libc:fatal signal 11(SIGSEGV).code 1, fault addr 0x0 in tid 26488 (VideoEncoder)

    在调试Camera模块:发现相同的代码在厂家提供的环境里边编译.就是ok的,在我们的源码树中编译,将HAL库推进去后.就会signal 11退出. 一.现象 F/libc ( ): Fatal sig ...

  9. Command terminated by signal 11

    Command terminated by signal 11可能的情况之中的一个是数组越界.你在訪问不被同意的内存空间.

随机推荐

  1. POJ 3311 Hie with the Pie (状压DP)

    题意: 每个点都可以走多次的TSP问题:有n个点(n<=11),从点1出发,经过其他所有点至少1次,并回到原点1,使得路程最短是多少? 思路: 同HDU 5418 VICTOR AND WORL ...

  2. HTTP协议初探

    HTTP协议初探 HTTP协议初探 什么是http协议? 遵守协议的双方 再来回答什么是http协议 抓到这两段文本 可以总结出以下规律 HTTP 请求命令(动作,谓词 ,METHOD) GET 和 ...

  3. 使用JPA + Eclipselink操作PostgreSQL数据库

    首先确保您已经安装了PostgreSQL.您可以参考我这篇文章PostgreSQL扫盲教程. 使用Eclipse创建一个新的JPA project: Platform选择EclipseLink,作为J ...

  4. 十分钟看懂,未来Web前端开发最新趋势

    首先,展望未来趋势我们就要弄懂过去的一年,也就是18年,web前端开发的重要新闻.重要事件和JavaScript的各种流行框架.模式发展趋势. 我们来快速回顾一下. NPM热门前端框架下载 先来看最热 ...

  5. 《剑指offer》39题—数组中出现次数超过一半的数字

    题目描述 数组中有一个数字出现的次数超过数组长度的一半,请找出这个数字.例如输入一个长度为9的数组{1,2,3,2,2,2,5,4,2}.由于数字2在数组中出现了5次,超过数组长度的一半,因此输出2. ...

  6. IOS中将颜色转换为image

    - (UIImage *)createImageWithColor:(UIColor *)color { CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f ...

  7. MATLAB编程技巧

    [摘要] MATLAB是一种科学计算语言,和C.Fortran等高级语言相类似,能方便的实现程序控制.以下介绍一点matlab编程的技巧. 嵌套计算 程序执行的速度取决于调用的子程序的个数和算法实现. ...

  8. PHP 存储密码

    最佳实践是 $hashedPassword = password_hash('my super cool password', PASSWORD_DEFAULT); $res = password_v ...

  9. Thinkphp 5 调试执行的SQL语句

    在模型操作中 ,为了更好的查明错误,经常需要查看下最近使用的SQL语句,我们可以用getLastsql方法来输出上次执行的sql语句.例如: User::get(1); echo User::getL ...

  10. Can Japan stand up to US request to contain China?

    From Global Times Two days before US President Donald Trump's visit to Japan, A fake news story caug ...