Mysqld Weird crash

Source: Internet
Author: User
Tags mysql version

Suddenly received an alarm SMS, prompted that there is a group of servers MHA has been switched, log on to the server after the error log (where the relevant INSERT statement has been processed):

MySQL version: 5.5.24

151221  -: Wu: -Innodb:assertion failureinchThread139867452008192 inch fileHa_innodb.ccLine1476innodb:failing assertion:current<=Max_valueinnodb: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, eveninnodb:immediately after the mysqld startup, there may Beinnodb:corruptioninchThe InnoDB tablespace. Please refer toinnodb:http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.htmlinnodb:about forcing recovery. ,: Wu: -Utc-mysqld got Signal6 ; This could is because a bug. It's also possible that's binaryor one of the libraries it was linked against are corrupt, improperly built,or misconfi Gured. This error can also is caused by malfunctioning hardware. We'll try our best to scrape up someInfothat would hopefully helpdiagnose the problem, but since we had already crashed, something is definitely wrong and th is May fail.key_buffer_size=134217728read_buffer_size=131072max_used_connections=2max_threads= +Thread_count=1Connection_count=1It is possible this mysqld could use up to Key_buffer_size+ (read_buffer_size + sort_buffer_size) *max_threads =4366462K bytes of Memoryhope that's OK; if not, decrease some variables in the equation.Thread Pointer:0x6ba32000attempting backtrace. can use the following information toFindOutwhere Mysqld died. If you see no messages after this, something wentterribly wrong...stack_bottom= 7f356dcade20 Thread_stack0x40000/usr/local/mysql/bin/mysqld (my_print_stacktrace+0x2e)[0x76cf7e]/usr/local/mysql/bin/mysqld (handle_fatal_signal+0x386)[0x6566d6]/lib64/libpthread.so.0[0x305b20f790]/lib64/libc.so.6(gsignal+0x35)[0x305ae32625]/lib64/libc.so.6(abort+0x175)[0x305ae33e05]/usr/local/mysql/bin/mysqld[0x7ceb5a]/usr/local/mysql/bin/mysqld[0x7da5e0]/usr/local/mysql/bin/mysqld (_zn7handler21update_auto_incrementev+0x209)[0x659909]/usr/local/mysql/bin/mysqld[0x7d818f]/usr/local/mysql/bin/mysqld (_zn7handler12ha_write_roweph+0x51)[0x65b961]/usr/local/mysql/bin/mysqld (_z12write_recordp3thdp5tablep12st_copy_info+0x5d)[0x54a88d]/usr/local/mysql/bin/mysqld (_z12mysql_insertp3thdp10table_listr4listi4itemers3_is5_es6_s6_15enum_duplicatesb+0xa4a)[0x5508ba]/usr/local/mysql/bin/mysqld (_z21mysql_execute_commandp3thd+0x24d6)[0x5601f6]/usr/local/mysql/bin/mysqld (_z11mysql_parsep3thdpcjp12parser_state+0xFE)[0x563bee]/usr/local/mysql/bin/mysqld (_z16dispatch_command19enum_server_commandp3thdpcj+0x1356)[0x564fc6]/usr/local/mysql/bin/mysqld (_z10do_commandp3thd+0xc2)[0X5652F2]/usr/local/mysql/bin/mysqld (_z24do_handle_one_connectionp3thd+0xf2)[0X5F0B02]/usr/local/mysql/bin/mysqld (handle_one_connection+0x4a)[0x5f0bda]/lib64/libpthread.so.0[0x305b207a51]/lib64/libc.so.6(clone+0x6d)[0X305AEE89AD]trying to get some variables. Some pointers may is invalid and cause the dump to abort. Query (8E8BCC10): INSERT into T1 (name) VALUES ( ' Yayun ' )Connection ID (thread ID): thestatus:not_killed

Tip INSERT INTO T1 VALUES (' Yayun '); cause mysqld crash
Can such a simple statement also lead to mysqld crash?

Let's look at the table structure:

Mysql>ShowCreate Tablet1\g*************************** 1. Row***************************       Table: T1Create Table:CREATE TABLE' T1 ' (' ID ')tinyint(4) not NULLauto_increment, ' name 'Char( -)DEFAULT NULL,  PRIMARY KEY(' id ')) ENGINE=InnoDB auto_increment= - DEFAULTCHARSET=UTF81Rowinch Set(0.00Sec

If you do not look closely and find out what is wrong, then take a closer look? Yes, it is the ID field, which is the tinyint type, and the value range of the tinyint is: the signed range is 128 to 127. The unsigned range is 0 to 255
The auto_increment=128 was designated at the time of the construction, and it was at the tipping point. When you insert again, it causes the mysqld process to restart. If you insert it again, the change is reset. Let's take a look.

Mysql> CREATE TABLET1 (IDTINYINT  not NULLAuto_incrementPRIMARY KEY, nameChar( -)) ENGINE=InnoDB auto_increment= -; Query OK,0Rows Affected (0.00sec) MySQL>ShowCreate Tablet1\g*************************** 1. Row***************************       Table: T1Create Table:CREATE TABLE' T1 ' (' ID ')tinyint(4) not NULLauto_increment, ' name 'Char( -)DEFAULT NULL,  PRIMARY KEY(' id ')) ENGINE=InnoDB auto_increment= - DEFAULTCHARSET=UTF81Rowinch Set(0.00Sec

Inserting a record immediately causes the MYSQLD process to crash.

MySQL>  INSERTintoVALUES ('yayun'   -  to MySQL Server during query

It's OK to insert again.

Mysql> Select *  fromT1;+----+-------+|Id|Name|+----+-------+|  1 |Yayun||  2 |Yayun|+----+-------+2Rowsinch Set(0.00sec) MySQL>ShowCreate Tablet1\g*************************** 1. Row***************************       Table: T1Create Table:CREATE TABLE' T1 ' (' ID ')tinyint(4) not NULLauto_increment, ' name 'Char( -)DEFAULT NULL,  PRIMARY KEY(' id ')) ENGINE=InnoDB auto_increment=3 DEFAULTCHARSET=UTF81Rowinch Set(0.00Sec

Summarize:

In short, the situation above is also the history of business left the pit, has urged the development to make changes. Above this belongs to a bug, the bug was early feedback, I stepped on a pit.

Resources:

http://bugs.mysql.com/bug.php?id=66836

Mysqld Weird crash

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.