Bug #88748 InnoDB: Failing assertion: trx->conc_state == 1
Submitted: 5 Dec 2017 1:11 Modified: 5 Dec 2017 5:47
Reporter: Roel Van de Paar (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: XA transactions Severity:S6 (Debug Builds)
Version:5.5.58 OS:Any
Assigned to: CPU Architecture:Any

[5 Dec 2017 1:11] Roel Van de Paar
Description:
171205 11:37:28 [Note] /sda/MS091117-mysql-5.5.58-linux-x86_64-debug/bin/mysqld: ready for connections.
Version: '5.5.58-debug'  socket: '/sda/MS091117-mysql-5.5.58-linux-x86_64-debug/socket.sock'  port: 18611  MySQL Community Server (GPL)
171205 11:37:45  InnoDB: Assertion failure in thread 139898496866048 in file trx0trx.c line 1106
InnoDB: Failing assertion: trx->conc_state == 1

Core was generated by `/sda/MS091117-mysql-5.5.58-linux-x86_64-debug/bin/mysqld --no-defaults --core -'.
Program terminated with signal 6, Aborted.
#0  0x00007f3ca7d689b1 in __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
61	  val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
(gdb) bt
#0  0x00007f3ca7d689b1 in __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1  0x00000000007dffb8 in my_write_core (sig=6) at /git/mysql-server_dbg/mysys/stacktrace.c:433
#2  0x00000000006a2f16 in handle_fatal_signal (sig=6) at /git/mysql-server_dbg/sql/signal_handler.cc:247
#3  <signal handler called>
#4  0x00007f3ca649e1f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5  0x00007f3ca649f8e8 in __GI_abort () at abort.c:90
#6  0x00000000008cb413 in trx_assign_read_view (trx=0x7f3c85470478) at /git/mysql-server_dbg/storage/innobase/trx/trx0trx.c:1106
#7  0x0000000000853dbf in ha_innobase::init_table_handle_for_HANDLER (this=0x7f3c8546c010)
    at /git/mysql-server_dbg/storage/innobase/handler/ha_innodb.cc:2187
#8  0x00000000005733f0 in mysql_ha_read (thd=thd@entry=0x7f3c98f89000, tables=tables@entry=0x7f3c8541f170, mode=RFIRST, 
    keyname=0x0, key_expr=0x7f3c8541f638, ha_rkey_mode=HA_READ_KEY_EXACT, cond=0x0, select_limit_cnt=1, offset_limit_cnt=0)
    at /git/mysql-server_dbg/sql/sql_handler.cc:647
#9  0x0000000000591537 in mysql_execute_command (thd=thd@entry=0x7f3c98f89000) at /git/mysql-server_dbg/sql/sql_parse.cc:3813
#10 0x00000000005940f6 in mysql_parse (thd=thd@entry=0x7f3c98f89000, rawbuf=<optimized out>, length=21, 
    parser_state=parser_state@entry=0x7f3ca835c580) at /git/mysql-server_dbg/sql/sql_parse.cc:5831
#11 0x00000000005959f5 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f3c98f89000, 
    packet=packet@entry=0x7f3c98f80001 "", packet_length=packet_length@entry=21) at /git/mysql-server_dbg/sql/sql_parse.cc:1075
#12 0x0000000000597836 in do_command (thd=0x7f3c98f89000) at /git/mysql-server_dbg/sql/sql_parse.cc:776
#13 0x000000000063fd82 in do_handle_one_connection (thd_arg=thd_arg@entry=0x7f3c98f89000)
    at /git/mysql-server_dbg/sql/sql_connect.cc:870
#14 0x000000000063fe3f in handle_one_connection (arg=0x7f3c98f89000) at /git/mysql-server_dbg/sql/sql_connect.cc:789
#15 0x00007f3ca7d63e25 in start_thread (arg=0x7f3ca835d700) at pthread_create.c:308
#16 0x00007f3ca656134d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

How to repeat:
USE test;
CREATE TABLE t0(id INT UNSIGNED,c0 CHAR (0),KEY (id)) ENGINE=RocksDB;
CREATE TABLE t0(c INT);
XA START'';
handler t0 open t0;
INSERT INTO t0 VALUES('','',0,'',0);
XA END'';
xa prepare'';
handler t0 read first;
[5 Dec 2017 5:47] Umesh Shastry
Hello Roel,

Thank you for the report and test case.
Observed that 5.5.58 debug build is affected.

Thanks,
Umesh