Bug #73881 InnoDB: Failing assertion: state == TRX_STATE_NOT_STARTED on concurrent DDL/DML
Submitted: 10 Sep 2014 23:39 Modified: 12 Sep 2014 18:02
Reporter: Elena Stepanova Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.6 OS:Any
Assigned to: CPU Architecture:Any

[10 Sep 2014 23:39] Elena Stepanova
Description:
2014-09-11 03:14:42 7fb91da9f700  InnoDB: Assertion failure in thread 140433043355392 in file trx0trx.ic line 60
InnoDB: Failing assertion: state == TRX_STATE_NOT_STARTED

#5  0x00007fb9456e77c0 in *__GI_abort () at abort.c:92
#6  0x0000000000c7ca0e in trx_state_eq (trx=0x7fb914261288, state=TRX_STATE_ACTIVE) at mysql-5.6/storage/innobase/include/trx0trx.ic:60
#7  0x0000000000c7e593 in trx_release_savepoint_for_mysql (trx=0x7fb914261288, savepoint_name=0x7fb91da9c5d0 "1DS1Z3MP40") at mysql-5.6/storage/innobase/trx/trx0roll.cc:506
#8  0x0000000000b1f462 in innobase_release_savepoint (hton=0x343bca0, thd=0x3e1ee60, savepoint=0x7fb9140087a0) at mysql-5.6/storage/innobase/handler/ha_innodb.cc:3775
#9  0x000000000065d602 in ha_release_savepoint (thd=0x3e1ee60, sv=0x7fb914008770) at mysql-5.6/sql/handler.cc:2172
#10 0x00000000007abfa2 in THD::restore_sub_statement_state (this=0x3e1ee60, backup=0x7fb91da9c700) at mysql-5.6/sql/sql_class.cc:4429
#11 0x000000000086ec25 in Table_triggers_list::process_triggers (this=0x44f5ff0, thd=0x3e1ee60, event=TRG_EVENT_UPDATE, time_type=TRG_ACTION_BEFORE, old_row_is_record1=true) at mysql-5.6/sql/sql_trigger.cc:2181
#12 0x000000000078e434 in fill_record_n_invoke_before_triggers (thd=0x3e1ee60, fields=..., values=..., ignore_errors=false, triggers=0x44f5ff0, event=TRG_EVENT_UPDATE) at mysql-5.6/sql/sql_base.cc:9017
#13 0x00000000008770de in mysql_update (thd=0x3e1ee60, table_list=0x7fb914000b28, fields=..., values=..., conds=0x7fb914001490, order_num=1, order=0x7fb914001710, limit=7, handle_duplicates=DUP_ERROR, ignore=false, found_return=0x7fb91da9d9b8, updated_return=0x7fb91da9d9b0) at mysql-5.6/sql/sql_update.cc:751
#14 0x00000000007ebe37 in mysql_execute_command (thd=0x3e1ee60) at mysql-5.6/sql/sql_parse.cc:3307
#15 0x00000000007f3b5c in mysql_parse (thd=0x3e1ee60, rawbuf=0x7fb9140008c0 "UPDATE `table1_innodb_key_pk_parts_2_int_autoinc` SET `pk` = RAND() WHERE `col_int` > 1 ORDER BY RAND () LIMIT 7", length=112, parser_state=0x7fb91da9de60) at mysql-5.6/sql/sql_parse.cc:6245
#16 0x00000000007e75de in dispatch_command (command=COM_QUERY, thd=0x3e1ee60, packet=0x3e4dcf1 " UPDATE `table1_innodb_key_pk_parts_2_int_autoinc` SET `pk` = RAND() WHERE `col_int` > 1 ORDER BY RAND () LIMIT 7 ", packet_length=114) at mysql-5.6/sql/sql_parse.cc:1332
#17 0x00000000007e67c0 in do_command (thd=0x3e1ee60) at mysql-5.6/sql/sql_parse.cc:1034
#18 0x00000000007b0ed8 in do_handle_one_connection (thd_arg=0x3cda970) at mysql-5.6/sql/sql_connect.cc:982
#19 0x00000000007b0a07 in handle_one_connection (arg=0x3cda970) at mysql-5.6/sql/sql_connect.cc:898
#20 0x0000000000dcebed in pfs_spawn_thread (arg=0x3c9d800) at mysql-5.6/storage/perfschema/pfs.cc:1860
#21 0x00007fb946a27b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#22 0x00007fb94578e20d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7fb9140008c0): UPDATE `table1_innodb_key_pk_parts_2_int_autoinc` SET `pk` = RAND() WHERE `col_int` > 1 ORDER BY RAND () LIMIT 7
Connection ID (thread ID): 7
Status: NOT_KILLED

Stack trace from:
revision-id: mysql-builder@oracle.com-20140718153331-alv04ylhcui1z4y6
revno: 6060
branch-nick: mysql-5.6

How to repeat:
# 1.yy and 1.zz files are attached
# RQG command line:

perl ./runall-new.pl  --threads=8 --duration=1200 --queries=100M --views --grammar=1.yy --gendata=1.zz --engine=InnoDB --reporters=QueryTimeout --seed=1409039505 --basedir1=<MySQL 5.6 basedir> --vardir1=<vardir>
[10 Sep 2014 23:40] Elena Stepanova
RQG grammar

Attachment: 1.yy (application/octet-stream, text), 3.70 KiB.

[10 Sep 2014 23:40] Elena Stepanova
RQG data template

Attachment: 1.zz (application/octet-stream, text), 323 bytes.

[11 Sep 2014 8:02] MySQL Verification Team
Similar to bugs:
Bug 16802288 - FAILING ASSERTION: PREBUILT->SQL_STAT_START || TRX->STATE == TRX_STATE_ACTIVE 
Bug 16268055 - INNODB: FAILING ASSERTION: UT_LIST_GET_LEN(TRX->LOCK.TRX_LOCKS) == 0 
Bug 16543220 - ERROR: MYSQL IS TRYING TO PERFORM A CONSISTENT READ
Bug 19142753 - ASSERT: MODE !=LOCK_X || LOCK_TABLE_HAS(THR_GET_TRX(THR), INDEX->TABLE, LOCK_IX)
[12 Sep 2014 17:58] MySQL Verification Team
2014-09-12 14:53:34 18730 [Note] /home/miguel/mysql-5.6/sql/mysqld: ready for connections.
Version: '5.6.22-debug-log'  socket: '/home/miguel/mysql-5.6/mysql-test/var/mysql.sock'  port: 19300  Source distribution
2014-09-12 14:53:52 18730 [ERROR] /home/miguel/mysql-5.6/sql/mysqld: Deadlock found when trying to get lock; try restarting transaction
2014-09-12 14:53:52 18730 [ERROR] /home/miguel/mysql-5.6/sql/mysqld: Sort aborted: Deadlock found when trying to get lock; try restarting transaction
2014-09-12 14:53:53 18730 [ERROR] /home/miguel/mysql-5.6/sql/mysqld: Deadlock found when trying to get lock; try restarting transaction
2014-09-12 14:53:53 18730 [ERROR] /home/miguel/mysql-5.6/sql/mysqld: Sort aborted: Deadlock found when trying to get lock; try restarting transaction
2014-09-12 14:53:53 18730 [ERROR] /home/miguel/mysql-5.6/sql/mysqld: Deadlock found when trying to get lock; try restarting transaction
2014-09-12 14:53:53 18730 [ERROR] /home/miguel/mysql-5.6/sql/mysqld: Sort aborted: Deadlock found when trying to get lock; try restarting transaction
2014-09-12 14:53:54 18730 [ERROR] /home/miguel/mysql-5.6/sql/mysqld: Deadlock found when trying to get lock; try restarting transaction
2014-09-12 14:53:54 18730 [ERROR] /home/miguel/mysql-5.6/sql/mysqld: Sort aborted: Deadlock found when trying to get lock; try restarting transaction
2014-09-12 14:54:24 18730 [ERROR] /home/miguel/mysql-5.6/sql/mysqld: Sort aborted: Query execution was interrupted
2014-09-12 14:54:26 18730 [ERROR] /home/miguel/mysql-5.6/sql/mysqld: Deadlock found when trying to get lock; try restarting transaction
2014-09-12 14:54:26 18730 [ERROR] /home/miguel/mysql-5.6/sql/mysqld: Sort aborted: Deadlock found when trying to get lock; try restarting transaction
2014-09-12 14:54:26 7fdd81b99700  InnoDB: Assertion failure in thread 140589340923648 in file trx0trx.ic line 60
InnoDB: Failing assertion: state == TRX_STATE_NOT_STARTED
InnoDB: 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, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
17:54:26 UTC - mysqld got signal 6 ;
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=8388608
read_buffer_size=131072
max_used_connections=10
max_threads=151
thread_count=9
connection_count=9
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 68279 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x2f55230
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 = 7fdd81b98e28 thread_stack 0x40000
/home/miguel/mysql-5.6/sql/mysqld(my_print_stacktrace+0x38)[0xa8bbdb]
/home/miguel/mysql-5.6/sql/mysqld(handle_fatal_signal+0x39f)[0x718f21]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10340)[0x7fdd9595f340]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39)[0x7fdd94d9ff89]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7fdd94da3398]
/home/miguel/mysql-5.6/sql/mysqld[0xccf83e]
/home/miguel/mysql-5.6/sql/mysqld[0xcd1419]
/home/miguel/mysql-5.6/sql/mysqld[0xb6ed18]
/home/miguel/mysql-5.6/sql/mysqld(_Z20ha_release_savepointP3THDP12st_savepoint+0xab)[0x630998]
/home/miguel/mysql-5.6/sql/mysqld(_ZN3THD27restore_sub_statement_stateEP19Sub_statement_state+0xd1)[0x784c7d]
/home/miguel/mysql-5.6/sql/mysqld(_ZN19Table_triggers_list16process_triggersEP3THD14trg_event_type20trg_action_time_typeb+0x261)[0x84df25]
/home/miguel/mysql-5.6/sql/mysqld(_Z36fill_record_n_invoke_before_triggersP3THDR4ListI4ItemES4_bP19Table_triggers_list14trg_event_type+0x68)[0x766956]
/home/miguel/mysql-5.6/sql/mysqld(_Z12mysql_updateP3THDP10TABLE_LISTR4ListI4ItemES6_PS4_jP8st_ordery15enum_duplicatesbPySB_+0x1d3d)[0x8568e0]
/home/miguel/mysql-5.6/sql/mysqld(_Z21mysql_execute_commandP3THD+0x273c)[0x7c5b76]
/home/miguel/mysql-5.6/sql/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x409)[0x7cdd51]
/home/miguel/mysql-5.6/sql/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xc20)[0x7c11af]
/home/miguel/mysql-5.6/sql/mysqld(_Z10do_commandP3THD+0x30f)[0x7c0363]
/home/miguel/mysql-5.6/sql/mysqld(_Z24do_handle_one_connectionP3THD+0x195)[0x789e3f]
/home/miguel/mysql-5.6/sql/mysqld(handle_one_connection+0x33)[0x789976]
/home/miguel/mysql-5.6/sql/mysqld(pfs_spawn_thread+0x156)[0xad78e1]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8182)[0x7fdd95957182]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7fdd94e6438d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7fdd30004c90): UPDATE `table1_innodb_key_pk_parts_2_int_autoinc` SET `pk` = 2 WHERE `col_int` = 'yeah'
Connection ID (thread ID): 13
Status: NOT_KILLED
[12 Sep 2014 18:02] MySQL Verification Team
Thank you for the bug report.