Bug #67488 mysqld got signal 11 ;
Submitted: 6 Nov 2012 18:13 Modified: 17 Dec 2012 18:49
Reporter: leo strashnoy Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:5.5.28 OS:Linux (fedora 17)
Assigned to: CPU Architecture:Any

[6 Nov 2012 18:13] leo strashnoy
Description:
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.
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.

key_buffer_size=16777216
read_buffer_size=1048576
max_used_connections=1
max_threads=112
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 705788 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f0dc8000990
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 = 7f0e766ff7a0 thread_stack 0x40000
/usr/libexec/mysqld(my_print_stacktrace+0x29)[0x779e29]
/usr/libexec/mysqld(handle_fatal_signal+0x471)[0x674bb1]
/lib64/libpthread.so.0(+0xefe0)[0x7f0e763acfe0]
/lib64/libc.so.6(+0x12ea1a)[0x7f0e748b1a1a]
/usr/libexec/mysqld(_ZN5TABLE4initEP3THDP10TABLE_LIST+0x4e)[0x60b20e]
/usr/libexec/mysqld(_Z10open_tableP3THDP10TABLE_LISTP11st_mem_rootP18Open_table_context+0x198)[0x563608]
/usr/libexec/mysqld(_Z11open_tablesP3THDPP10TABLE_LISTPjjP19Prelocking_strategy+0x446)[0x564756]
/usr/libexec/mysqld(_Z20open_and_lock_tablesP3THDP10TABLE_LISTbjP19Prelocking_strategy+0x49)[0x565039]
/usr/libexec/mysqld(_Z12mysql_insertP3THDP10TABLE_LISTR4ListI4ItemERS3_IS5_ES6_S6_15enum_duplicatesb+0xd9)[0x580bc9]
/usr/libexec/mysqld(_Z21mysql_execute_commandP3THD+0x1e4b)[0x59314b]
/usr/libexec/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x1b2)[0x5976e2]
/usr/libexec/mysqld(_ZN15Query_log_event14do_apply_eventEPK14Relay_log_infoPKcj+0xcd3)[0x7043d3]
/usr/libexec/mysqld(_Z26apply_event_and_update_posP9Log_eventP3THDP14Relay_log_info+0xfd)[0x54014d]
/usr/libexec/mysqld(handle_slave_sql+0x93a)[0x54104a]
/lib64/libpthread.so.0(+0x7d14)[0x7f0e763a5d14]
/lib64/libc.so.6(clone+0x6d)[0x7f0e7487467d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f0dc800d714): INSERT INTO mgmt_link_status (LINK_ID, LINK_ROLE, LINK_BEHAVIOR, UPSTREAM_ADDR_TYP, UPSTREAM_ADDR,   DOWNSTREAM_ADDR_TYP, DOWNSTREAM_ADDR, DOWNSTREAM_STATUS, DOWNSTREAM_RSS,   RUNTIME_SECS, CHG_TIMESTAMP)  VALUES (5417, 1, 128, 0, '', 1, '00:12:6F:04:2E:BC', 0, -47, 1352034271, '2012-11-05 16:50:51')  ON DUPLICATE KEY UPDATE  LINK_ROLE = 1,  LINK_BEHAVIOR = 128,  UPSTREAM_ADDR_TYP = 0,  UPSTREAM_ADDR = '',  DOWNSTREAM_ADDR_TYP = 1,  DOWNSTREAM_ADDR = '00:12:6F:04:2E:BC',  DOWNSTREAM_STATUS = 0,  DOWNSTREAM_RSS = -47,  RUNTIME_SECS = 1352034271,  CHG_TIMESTAMP = '2012-11-05 16:50:51'
Connection ID (thread ID): 3
Status: NOT_KILLED

How to repeat:
restart replication
[7 Nov 2012 18:51] Sveta Smirnova
Thank you for the report.

Do you experience this error on slave? Will crash happen if you run query INSERT INTO mgmt_link_status (LINK_ID, LINK_ROLE, LINK_BEHAVIOR, UPSTREAM_ADDR_TYP, UPSTREAM_ADDR,   DOWNSTREAM_ADDR_TYP, DOWNSTREAM_ADDR, DOWNSTREAM_STATUS, DOWNSTREAM_RSS,   RUNTIME_SECS, CHG_TIMESTAMP)  VALUES (5417, 1, 128, 0, '', 1, '00:12:6F:04:2E:BC', 0, -47, 1352034271, '2012-11-05 16:50:51')  ON DUPLICATE KEY UPDATE  LINK_ROLE = 1,  LINK_BEHAVIOR = 128,  UPSTREAM_ADDR_TYP = 0,  UPSTREAM_ADDR = '',  DOWNSTREAM_ADDR_TYP = 1,  DOWNSTREAM_ADDR = '00:12:6F:04:2E:BC',  DOWNSTREAM_STATUS = 0,  DOWNSTREAM_RSS = -47,  RUNTIME_SECS = 1352034271,  CHG_TIMESTAMP = '2012-11-05 16:50:51' using normal connection, not slave SQL thread?
[8 Nov 2012 18:56] leo strashnoy
this table has a trigger
[12 Nov 2012 21:42] leo strashnoy
Thanks Sveta,
Error log that you see is from the slave. It will crash the slave...
We can reproduce the problem from clean database by doing this on master:

create table x(md5 int);
CREATE DEFINER=`root`@`localhost` TRIGGER `test`.`x` BEFORE INSERT ON test.x FOR EACH ROW
if (@DISABLE_TRIGER IS NULL OR @DISABLE_TRIGER <> 1) then 
    SET new.MD5 = 1;
end if;

insert into x values(5); -- the insert crashes the slave.

Let me know if you need my.cnf from slave or master.

Thanks, 

Leonard Strashnoy
[12 Nov 2012 21:47] leo strashnoy
BTW Sveta, 

I don't think it even get to the SQL thread - it will crash a slave even when I delete this table on the slave.

As I see it - replication itself causing crash...

-Leonard Strashnoy
[13 Nov 2012 18:59] leo strashnoy
my.cnf from slave and master

Attachment: my.cnf slave.cnf (application/octet-stream, text), 1.73 KiB.

[13 Nov 2012 20:24] leo strashnoy
master cnf

Attachment: my.cnf master.cnf (application/octet-stream, text), 944 bytes.

[13 Nov 2012 21:44] MySQL Verification Team
uninitialized user variables in a query, in combination with replicate-wild-*-table options on slave is known to cause memory corruption.. 5.5.29 will see a fix for that.
[13 Nov 2012 22:54] leo strashnoy
We removed replicate-wild and it still the same crash.
Do you recommend work-around user variables?

Thx,
-Leonard Strashnoy
[13 Nov 2012 22:59] leo strashnoy
updated my.cnf (replicate-wild removed)

Attachment: my.cnf (application/octet-stream, text), 948 bytes.

[17 Dec 2012 18:49] Sveta Smirnova
Thank you for the report.

This is fixed in current development tree. Please wait when version 5.5.29 is released, test it and update the report if issue still repeatable for you.