3

my mysql db crash after running for some time. MySQL version is

*************************** 1. row ***************************
Variable_name: innodb_version
        Value: 5.7.10-3
*************************** 2. row ***************************
Variable_name: protocol_version
        Value: 10
*************************** 3. row ***************************
Variable_name: slave_type_conversions
        Value:
*************************** 4. row ***************************
Variable_name: tls_version
        Value: TLSv1,TLSv1.1,TLSv1.2
*************************** 5. row ***************************
Variable_name: version
        Value: 5.7.10-3-log
*************************** 6. row ***************************
Variable_name: version_comment
        Value: Percona Server (GPL), Release 3, Revision 63dafaf
*************************** 7. row ***************************
Variable_name: version_compile_machine
        Value: x86_64
*************************** 8. row ***************************
Variable_name: version_compile_os
        Value: Linux

It has a slave in another server.

My Server info:

a physical server with 32 cores && 62G ram

the mysql error log at the time below:

06:59:18 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.
Please help us make Percona Server better by reporting any
bugs at http://bugs.percona.com/

key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=328
max_threads=4191
thread_count=294
connection_count=294
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1675826 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7eec20c2a820
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 = 7ef062fddd70 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x3b)[0xed8a9b]
/usr/sbin/mysqld(handle_fatal_signal+0x471)[0x7935a1]
/lib64/libpthread.so.0(+0xf100)[0x7efdb8ccb100]
/usr/sbin/mysqld[0xcabe35]
/usr/sbin/mysqld(_ZN4JOIN14test_skip_sortEv+0x15d)[0xcacbcd]
/usr/sbin/mysqld(_ZN4JOIN8optimizeEv+0x1c05)[0xcb9f95]
/usr/sbin/mysqld(_ZN13st_select_lex8optimizeEP3THD+0x685)[0xd00155]
/usr/sbin/mysqld(_Z12handle_queryP3THDP3LEXP12Query_resultyy+0x155)[0xd00335]
/usr/sbin/mysqld[0x754feb]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THDb+0x46fe)[0xcc2d5e]
/usr/sbin/mysqld(_Z11mysql_parseP3THDP12Parser_state+0x5dd)[0xcc5d5d]
/usr/sbin/mysqld(_Z16dispatch_commandP3THDPK8COM_DATA19enum_server_command+0x92f)[0xcc671f]
/usr/sbin/mysqld(_Z10do_commandP3THD+0x1df)[0xcc809f]
/usr/sbin/mysqld(handle_connection+0x2a0)[0xd8af20]
/usr/sbin/mysqld(pfs_spawn_thread+0x1b4)[0x1253834]
/lib64/libpthread.so.0(+0x7dc5)[0x7efdb8cc3dc5]
/lib64/libc.so.6(clone+0x6d)[0x7efdb6f151cd]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7eed990ea7a0): SELECT         DISTINCT(bill_no) as billNo,         trade_time as tradeTime         from bill         where (1=1)                                                     AND trade_time >=DATE('2016-12-22 00:00:00')                                 AND trade_time  < DATE('2016-12-30 00:00:00')                                 AND source = 'BM'                                 AND bill_type = 'ORIGIN'                   order by trade_time ASC         limit 0,10
Connection ID (thread ID): 697519
Status: NOT_KILLED

You may download the Percona Server operations manual by visiting
http://www.percona.com/software/percona-server/. You may find information
in the manual which will help you identify the cause of the crash.
2016-12-29T06:59:21.907135Z 0 [Warning] Could not increase number of max_open_files to more than 5000 (request: 65535)
2016-12-29T06:59:21.907269Z 0 [Warning] Changed limits: max_connections: 4190 (requested 5000)
2016-12-29T06:59:21.907277Z 0 [Warning] Changed limits: table_open_cache: 400 (requested 2048)
2016-12-29T14:59:22.075502+08:00 0 [Warning] The use of InnoDB is mandatory since MySQL 5.7. The former options like '--innodb=0/1/OFF/ON' or '--skip-innodb' are ignored.
2016-12-29T14:59:22.075523+08:00 0 [Warning] The syntax 'avoid_temporal_upgrade' is deprecated and will be removed in a future release
2016-12-29T14:59:22.075577+08:00 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-12-29T14:59:22.076608+08:00 0 [Note] /usr/sbin/mysqld (mysqld 5.7.10-3-log) starting as process 314647 ...

I have no idea what's going on, Anyone could help?

  • You may want to consider following the suggestion in the error message and report a bug. – mustaccio Dec 29 '16 at 13:11
3

Your server got a Segment fault and killed itself. Those are not common- I've only seen crashes like this (aside from the most common Out Of Memory Killer) when there was hardware (memory or disk) corruption or (more rarely) a software bug:

Things I would do:

  • Run a memtest
  • Run a disk test (this 2 will probably give no results, but they are easy to discard them)
  • Check if you can reproduce it again by running the same query or similar ones like that. It seems a thread-related issue within test_skip_sort.
  • Check the Percona changelog to see if that is an already known bug
  • You seem to be running a relatively early 5.7 Percona version, I would recommend upgrading to a more recent one (you probably should be on one of the most recent minor releases within the same major version).

Not the answer you're looking for? Browse other questions tagged or ask your own question.