Bug #93083 InnoDB: Failing assertion: srv_read_only_mode || trx->in_depth > 0
Submitted: 5 Nov 12:08 Modified: 5 Nov 12:50
Reporter: Ramesh Sivaraman (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S6 (Debug Builds)
Version:5.7.23, 5.7.24 OS:Any
Assigned to: CPU Architecture:Any
Tags: debug

[5 Nov 12:08] Ramesh Sivaraman
Description:
This issue is similar to https://bugs.mysql.com/bug.php?id=76415

GDB Info

#0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:62
#1  0x00000000019813b2 in my_write_core (sig=6) at /qa/binaries/MS-57_dbg/mysys/stacktrace.c:249
#2  0x0000000000f1546f in handle_fatal_signal (sig=6) at /qa/binaries/MS-57_dbg/sql/signal_handler.cc:220
#3  <signal handler called>
#4  0x00007f252664a428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#5  0x00007f252664c02a in __GI_abort () at abort.c:89
#6  0x0000000001c871cd in ut_dbg_assertion_failed (expr=0x222add0 "srv_read_only_mode || trx->in_depth > 0", file=0x222ad90 "/qa/binaries/MS-57_dbg/storage/innobase/include/trx0trx.h", line=1403) at /qa/binaries/MS-57_dbg/storage/innobase/ut/ut0dbg.cc:67
#7  0x0000000001a4ad96 in TrxInInnoDB::is_aborted (trx=0x7f2517a898d0) at /qa/binaries/MS-57_dbg/storage/innobase/include/trx0trx.h:1403
#8  0x0000000001a34a22 in ha_innobase::general_fetch (this=0x7f24b0030750, buf=0x7f24b0030a40 "\377\004", direction=1, match_mode=0) at /qa/binaries/MS-57_dbg/storage/innobase/handler/ha_innodb.cc:9012
#9  0x0000000001a350e7 in ha_innobase::rnd_next (this=0x7f24b0030750, buf=0x7f24b0030a40 "\377\004") at /qa/binaries/MS-57_dbg/storage/innobase/handler/ha_innodb.cc:9251
#10 0x0000000000f9aa05 in handler::ha_rnd_next (this=0x7f24b0030750, buf=0x7f24b0030a40 "\377\004") at /qa/binaries/MS-57_dbg/sql/handler.cc:2947
#11 0x000000000152be61 in rr_sequential (info=0x7f24b0035a38) at /qa/binaries/MS-57_dbg/sql/records.cc:510
#12 0x00000000015cb05b in sub_select (join=0x7f24b0035308, qep_tab=0x7f24b00359e8, end_of_records=false) at /qa/binaries/MS-57_dbg/sql/sql_executor.cc:1280
#13 0x00000000015ca958 in do_select (join=0x7f24b0035308) at /qa/binaries/MS-57_dbg/sql/sql_executor.cc:950
#14 0x00000000015c873a in JOIN::exec (this=0x7f24b0035308) at /qa/binaries/MS-57_dbg/sql/sql_executor.cc:199
#15 0x0000000001669d66 in handle_query (thd=0x7f24b0000b70, lex=0x7f24b0002e88, result=0x7f24b0034f90, added_options=0, removed_options=0) at /qa/binaries/MS-57_dbg/sql/sql_select.cc:184
#16 0x000000000161a193 in execute_sqlcom_select (thd=0x7f24b0000b70, all_tables=0x7f24b0032e48) at /qa/binaries/MS-57_dbg/sql/sql_parse.cc:5144
#17 0x000000000161337e in mysql_execute_command (thd=0x7f24b0000b70, first_level=true) at /qa/binaries/MS-57_dbg/sql/sql_parse.cc:2816
#18 0x000000000161b112 in mysql_parse (thd=0x7f24b0000b70, parser_state=0x7f24fc2bc550) at /qa/binaries/MS-57_dbg/sql/sql_parse.cc:5570
#19 0x000000000161007d in dispatch_command (thd=0x7f24b0000b70, com_data=0x7f24fc2bce00, command=COM_QUERY) at /qa/binaries/MS-57_dbg/sql/sql_parse.cc:1484
#20 0x000000000160ef0c in do_command (thd=0x7f24b0000b70) at /qa/binaries/MS-57_dbg/sql/sql_parse.cc:1025
#21 0x00000000017528a1 in handle_connection (arg=0x4a6f640) at /qa/binaries/MS-57_dbg/sql/conn_handler/connection_handler_per_thread.cc:300
#22 0x0000000001e44dfa in pfs_spawn_thread (arg=0x49f09a0) at /qa/binaries/MS-57_dbg/storage/perfschema/pfs.cc:2190
#23 0x00007f25272876ba in start_thread (arg=0x7f24fc2bd700) at pthread_create.c:333
#24 0x00007f252671c41d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

How to repeat:
rm -Rf /dev/shm/1541412257
mkdir -p /dev/shm/1541412257/tmp

/qa/binaries/mysql-5.7.24-linux-x86_64-debug/bin/mysqld --no-defaults --basedir=/qa/binaries/mysql-5.7.24-linux-x86_64-debug --datadir=/dev/shm/1541412257/data --initialize-insecure 

/qa/binaries/mysql-5.7.24-linux-x86_64-debug/bin/mysqld --no-defaults --basedir=/qa/binaries/mysql-5.7.24-linux-x86_64-debug --datadir=/dev/shm/1541412257/data --tmpdir=/dev/shm/1541412257/tmp --port=30958 --pid-file=/dev/shm/1541412257/pid.pid --core-file --socket=/dev/shm/1541412257/socket.sock  --log_bin=binlog --server-id=100 --sql_mode=ONLY_FULL_GROUP_BY --log-output=none  --log-error=/dev/shm/1541412257/error.log.out &

CREATE DATABASE test;
USE test;
CREATE TEMPORARY TABLE t1(c1 LONGTEXT NOT NULL);
INSERT INTO t1 VALUES(4616);
ALTER TABLE t1 ADD COLUMN a int(11) unsigned default NULL;
LOCK TABLES performance_schema.setup_timers READ;
select a, exists (select 1 from information_schema.columns where table_schema=concat('tes',a)) from t1; ;
[5 Nov 12:50] Umesh Shastry
Hello Ramesh,

Thank you for the report and testcase.
observed that 5.7.24 debug build is affected.

thanks,
Umesh