Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.2(EOL), 10.3(EOL)
Description
The RQG test provided below represents simple non-concurrent one-thread flow consisting of updates on temporary InnoDB tables, followed by rollbacks. Very soon (for me it happens within the first minute of the test) one of ROLLBACKs causes an assertion failure on 10.3 or hangs on 10.2. For 10.3, even one table is enough, 10.2 seems to need two tables, so the grammar has two tables.
10.1 does not hang or crash.
10.3 fa68b88b5d415 |
mysqld: /data/src/10.3/storage/innobase/include/trx0rec.ic:68: trx_undo_rec_t* trx_undo_rec_copy(const trx_undo_rec_t*, mem_heap_t*): Assertion `len < ((ulint) srv_page_size)' failed.
|
180419 0:27:25 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007f3211effee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
|
#8 0x000055bb77d5623e in trx_undo_rec_copy (undo_rec=0x7f31f072f041 "", heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/include/trx0rec.ic:68
|
#9 0x000055bb77d5d45b in trx_undo_get_undo_rec_low (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175
|
#10 0x000055bb77d5d54b in trx_undo_get_undo_rec (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90, trx_id=5480, name=..., undo_rec=0x7f3210185be0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211
|
#11 0x000055bb77d5d82c in trx_undo_prev_version_build (index_rec=0x7f31f052809b "", index_mtr=0x7f3210186520, rec=0x7f31a04e0b8e "", index=0x7f31a02a4f78, offsets=0x7f31a04e0bf0, heap=0x7f31a04e0e90, old_vers=0x7f3210185cd0, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297
|
#12 0x000055bb77d14702 in row_vers_old_has_index_entry (also_curr=0, rec=0x7f31f052809b "", mtr=0x7f3210186520, index=0x7f31a02a4ad8, ientry=0x7f31a04e05f8, roll_ptr=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:987
|
#13 0x000055bb77f03e4b in row_undo_mod_del_mark_or_remove_sec_low (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8, mode=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:544
|
#14 0x000055bb77f041a1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8) at /data/src/10.3/storage/innobase/row/row0umod.cc:616
|
#15 0x000055bb77f055f1 in row_undo_mod_upd_exist_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1096
|
#16 0x000055bb77f05edd in row_undo_mod (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1314
|
#17 0x000055bb77cfe36f in row_undo (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:308
|
#18 0x000055bb77cfe551 in row_undo_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:362
|
#19 0x000055bb77c4f65a in que_thr_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1049
|
#20 0x000055bb77c4f8a9 in que_run_threads_low (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1113
|
#21 0x000055bb77c4fa9a in que_run_threads (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1153
|
#22 0x000055bb77d5ff2e in trx_rollback_to_savepoint_low (trx=0x7f3210268828, savept=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145
|
#23 0x000055bb77d6039c in trx_rollback_for_mysql_low (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214
|
#24 0x000055bb77d606db in trx_rollback_for_mysql (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:240
|
#25 0x000055bb77b497c3 in innobase_rollback (hton=0x55bb7af9c420, thd=0x7f31a0000b00, rollback_trx=true) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4632
|
#26 0x000055bb77834907 in ha_rollback_trans (thd=0x7f31a0000b00, all=true) at /data/src/10.3/sql/handler.cc:1721
|
#27 0x000055bb776c147d in trans_rollback (thd=0x7f31a0000b00) at /data/src/10.3/sql/transaction.cc:422
|
#28 0x000055bb77558739 in mysql_execute_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:5829
|
#29 0x000055bb7755eb06 in mysql_parse (thd=0x7f31a0000b00, rawbuf=0x7f31a0015ae8 "ROLLBACK /* QNO 22863 CON_ID 12 */", length=34, parser_state=0x7f3210188620, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8001
|
#30 0x000055bb7754c2e9 in dispatch_command (command=COM_QUERY, thd=0x7f31a0000b00, packet=0x7f31a04009c1 "ROLLBACK /* QNO 22863 CON_ID 12 */ ", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1846
|
#31 0x000055bb7754ad28 in do_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:1391
|
#32 0x000055bb776ad791 in do_handle_one_connection (connect=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1402
|
#33 0x000055bb776ad51e in handle_one_connection (arg=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1308
|
#34 0x00007f3213bd6494 in start_thread (arg=0x7f3210189700) at pthread_create.c:333
|
#35 0x00007f3211fbc93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
|
10.2 66c14d3a8d31e while hanging |
Thread 3 (Thread 0x7faef41c5700 (LWP 32647)):
|
#0 GenericPolicy<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538878 <rw_lock_debug_mutex+56>, mutex=..., filename=0x555abd3a9670 "/data/src/10.2/storage/innobase/sync/sync0debug.cc"
|
, line=1268) at /data/src/10.2/storage/innobase/include/sync0policy.h:349
|
#1 0x0000555abcd6d6b9 in PolicyMutex<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538840 <rw_lock_debug_mutex>, n_spins=30, n_delay=6, name=0x555abd3a9670 "/data/src/10.2/storage/inn
|
obase/sync/sync0debug.cc", line=1268) at /data/src/10.2/storage/innobase/include/ib0mutex.h:635
|
#2 0x0000555abce74aa8 in rw_lock_debug_mutex_enter () at /data/src/10.2/storage/innobase/sync/sync0debug.cc:1268
|
#3 0x0000555abce6cc41 in rw_lock_own (lock=0x555abfef9780, lock_type=4) at /data/src/10.2/storage/innobase/sync/sync0rw.cc:1029
|
#4 0x0000555abcf2401c in buf_page_get_gen (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, file=0x555abd3b2ed0 "/data/src/10.2/storage/innobase/include/trx0undo.ic", line=180,
|
mtr=0x7faef41c1380, err=0x0) at /data/src/10.2/storage/innobase/buf/buf0buf.cc:4829
|
#5 0x0000555abce972b2 in trx_undo_page_get_s_latched (page_id=..., mtr=0x7faef41c1380) at /data/src/10.2/storage/innobase/include/trx0undo.ic:179
|
#6 0x0000555abce9c364 in trx_undo_get_undo_rec_low (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2120
|
#7 0x0000555abce9c486 in trx_undo_get_undo_rec (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030, trx_id=2572, name=..., undo_rec=0x7faef41c1950) at /data/src/10.2/storage/inno
|
base/trx/trx0rec.cc:2158
|
#8 0x0000555abce9c6db in trx_undo_prev_version_build (index_rec=0x7faed44fc09b "", index_mtr=0x7faef41c22a0, rec=0x7fae78057d26 "", index=0x7fae78048798, offsets=0x7fae78057d88, heap=0x7fa
|
e78058030, old_vers=0x7faef41c1a40, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2244
|
#9 0x0000555abce53ad2 in row_vers_old_has_index_entry (also_curr=0, rec=0x7faed44fc09b "", mtr=0x7faef41c22a0, index=0x7fae78048368, ientry=0x7fae78057798, roll_ptr=0, trx_id=0) at /data/src/10.2/storage/innobase/row/row0vers.cc:999
|
#10 0x0000555abd02c8e9 in row_undo_mod_del_mark_or_remove_sec_low (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798, mode=2) at /data/src/10.2/storage/innobase/row/row0umod.cc:510
|
#11 0x0000555abd02cc02 in row_undo_mod_del_mark_or_remove_sec (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798) at /data/src/10.2/storage/innobase/row/row0umod.cc:582
|
#12 0x0000555abd02df86 in row_undo_mod_upd_exist_sec (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1063
|
#13 0x0000555abd02e63e in row_undo_mod (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1260
|
#14 0x0000555abce3e324 in row_undo (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:304
|
#15 0x0000555abce3e472 in row_undo_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:352
|
#16 0x0000555abcda1679 in que_thr_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1047
|
#17 0x0000555abcda1893 in que_run_threads_low (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1111
|
#18 0x0000555abcda1a3c in que_run_threads (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1151
|
#19 0x0000555abce9f233 in trx_rollback_to_savepoint_low (trx=0x7faee0b567e8, savept=0x0) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:112
|
#20 0x0000555abce9f59d in trx_rollback_for_mysql_low (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:174
|
#21 0x0000555abce9f87b in trx_rollback_for_mysql (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:202
|
#22 0x0000555abccb023f in innobase_rollback (hton=0x555abf7542a0, thd=0x7fae78000b00, rollback_trx=true) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:4810
|
#23 0x0000555abc9a4449 in ha_rollback_trans (thd=0x7fae78000b00, all=true) at /data/src/10.2/sql/handler.cc:1672
|
#24 0x0000555abc88e299 in trans_rollback (thd=0x7fae78000b00) at /data/src/10.2/sql/transaction.cc:415
|
#25 0x0000555abc736a08 in mysql_execute_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:5610
|
#26 0x0000555abc73d496 in mysql_parse (thd=0x7fae78000b00, rawbuf=0x7fae78013288 "ROLLBACK /* QNO 3689 CON_ID 12 */", length=33, parser_state=0x7faef41c4250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7924
|
#27 0x0000555abc72b32b in dispatch_command (command=COM_QUERY, thd=0x7fae78000b00, packet=0x7fae78008851 "ROLLBACK /* QNO 3689 CON_ID 12 */ ", packet_length=34, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1820
|
#28 0x0000555abc729c8e in do_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:1374
|
#29 0x0000555abc878694 in do_handle_one_connection (connect=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1335
|
#30 0x0000555abc878421 in handle_one_connection (arg=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1241
|
#31 0x00007faef81e4494 in start_thread (arg=0x7faef41c5700) at pthread_create.c:333
|
#32 0x00007faef65ca93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
|
All threads for both servers are attached.
For a note, I've seen the assertion failure on 10.2 before in my random tests, but it isn't happening here, the server always hangs instead.
To reproduce:
git clone https://github.com/elenst/rqg --branch=mdev15374 rqg-mdev15374
|
cd rqg-mdev15374
|
Further, if you want the test to start the server (on port 19300 by default), run the test and then stop the server if it doesn't crash before:
perl ./runall-new.pl --duration=350 --threads=1 --grammar=./mdev15374.yy --skip-gendata --vardir=/dev/shm/vardir
|
Or, if you already have the server running, e.g. on port 3306, then
perl ./gentest.pl --duration=350 --threads=1 --queries=100M --grammar=./mdev15374.yy --dsn="dbi:mysql:user=root:host=127.0.0.1:port=3306:database=test"
|
If you are running the test on 10.3, it is expected to crash very fast. If you are running it on 10.2, check the processlist, as soon as it starts saying something like
+----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+
|
| Id | User | Host | db | Command | Time | State | Info | Progress |
|
+----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+
|
| 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 |
|
| 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 |
|
| 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 |
|
| 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 |
|
| 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 |
|
| 16 | root | localhost:54026 | test | Query | 75 | init | ROLLBACK /* QNO 26430 CON_ID 16 */ | 0.000 |
|
| 17 | root | localhost:53639 | NULL | Query | 0 | init | show processlist | 0.000 |
|
+----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+
|
you have hit the problem.
InnoDB will eventually abort with long semaphore wait and the test will complain, but it will take long time, because it optimistically waits for the server to wake up, while in this case the failure, when it happens, happens very fast.
In case you don't want to clone the dedicated RQG tree, here is the grammar:
query_init:
|
CREATE TEMPORARY TABLE t1 (a INT, key (a)); INSERT INTO t1 VALUES (1),(2)
|
; CREATE TEMPORARY TABLE t2 (a INT, key (a)); INSERT INTO t2 VALUES (1),(2)
|
;
|
|
query:
|
transaction |
|
UPDATE table_name SET a = _digit |
|
;
|
|
table_name:
|
t1 | t2
|
;
|
|
transaction:
|
START TRANSACTION |
|
ROLLBACK
|
;
|
Non-debug stack trace for the reference:
10.3 non-debug 560743198604caf |
#2 <signal handler called>
|
#3 0x00007f4bff883f0f in __memmove_avx_unaligned_erms () from /lib/x86_64-linux-gnu/libc.so.6
|
#4 0x000055819f3b2726 in memcpy (__len=18446744073709539341, __src=0x7f4bd8706ff3, __dest=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string3.h:53
|
#5 mem_heap_dup (len=18446744073709539341, data=0x7f4bd8706ff3, heap=0x7f4b9402d040) at /data/src/10.3/storage/innobase/include/mem0mem.h:306
|
#6 trx_undo_rec_copy (heap=0x7f4b9402d040, undo_rec=0x7f4bd8706ff3 <error: Cannot access memory at address 0x7f4bd8706ff3>) at /data/src/10.3/storage/innobase/include/trx0rec.ic:70
|
#7 trx_undo_get_undo_rec_low (roll_ptr=<optimized out>, is_temp=<optimized out>, heap=0x7f4b9402d040) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175
|
#8 0x000055819f3b2ad1 in trx_undo_get_undo_rec (undo_rec=<optimized out>, name=..., trx_id=<optimized out>, heap=<optimized out>, is_temp=<optimized out>, roll_ptr=<optimized out>) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211
|
#9 trx_undo_prev_version_build (index_rec=0x7f4a8f91c020 "", index_rec@entry=0x7f4bd851009b <error: Cannot access memory at address 0x7f4bd851009b>, index_mtr=0x7f4be0020f93, index_mtr@entry=0x7f4bf117cf80, rec=0x7f4b9402cd36 "", index=0x7f4b9416c2a0, offsets=0xffffffffffffffe0, offsets@entry=0x7f4b9402cd50, heap=0x0, old_vers=0x7f4bf117c760, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297
|
#10 0x000055819f385ca2 in row_vers_old_has_index_entry (also_curr=also_curr@entry=0, rec=0x7f4bd851009b <error: Cannot access memory at address 0x7f4bd851009b>, mtr=mtr@entry=0x7f4bf117cf80, index=index@entry=0x7f4b9416cc10, ientry=ientry@entry=0x7f4b9402c7b0, roll_ptr=roll_ptr@entry=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:1010
|
#11 0x000055819f4d2889 in row_undo_mod_del_mark_or_remove_sec_low (node=node@entry=0x7f4b9402bef0, thr=thr@entry=0x7f4b94025328, index=index@entry=0x7f4b9416cc10, entry=entry@entry=0x7f4b9402c7b0, mode=mode@entry=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:510
|
#12 0x000055819f4d30c1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f4b9402bef0, thr=0x7f4b94025328, index=0x7f4b9416cc10, entry=0x7f4b9402c7b0) at /data/src/10.3/storage/innobase/row/row0umod.cc:582
|
#13 0x000055819f4d3a50 in row_undo_mod_upd_exist_sec (thr=<optimized out>, node=<optimized out>) at /data/src/10.3/storage/innobase/row/row0umod.cc:1062
|
#14 row_undo_mod (node=0x7f4b9402bef0, thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/row/row0umod.cc:1280
|
#15 0x000055819f37b835 in row_undo (thr=0x7f4b94025328, node=0x7f4b9402bef0) at /data/src/10.3/storage/innobase/row/row0undo.cc:308
|
#16 row_undo_step (thr=thr@entry=0x7f4b94025328) at /data/src/10.3/storage/innobase/row/row0undo.cc:362
|
#17 0x000055819f3254bf in que_thr_step (thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/que/que0que.cc:1049
|
#18 que_run_threads_low (thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/que/que0que.cc:1113
|
#19 que_run_threads (thr=<optimized out>) at /data/src/10.3/storage/innobase/que/que0que.cc:1153
|
#20 0x000055819f3ba6b8 in trx_rollback_to_savepoint_low (trx=trx@entry=0x7f4bf32156e8, savept=savept@entry=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145
|
#21 0x000055819f3bac88 in trx_rollback_for_mysql_low (trx=0x7f4bf32156e8) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214
|
#22 trx_rollback_for_mysql (trx=trx@entry=0x7f4bf32156e8) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:290
|
#23 0x000055819f2966e8 in innobase_rollback (hton=<optimized out>, thd=0x7f4b940009a8, rollback_trx=<optimized out>) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4628
|
#24 0x000055819f09a491 in ha_rollback_trans (thd=thd@entry=0x7f4b940009a8, all=all@entry=true) at /data/src/10.3/sql/handler.cc:1721
|
#25 0x000055819efb15b4 in trans_rollback (thd=0x7f4b940009a8) at /data/src/10.3/sql/transaction.cc:422
|
#26 0x000055819eecf522 in mysql_execute_command (thd=0x7f4b940009a8) at /data/src/10.3/sql/sql_parse.cc:5829
|
#27 0x000055819eed5c2d in mysql_parse (thd=0x7f4b940009a8, rawbuf=<optimized out>, length=34, parser_state=0x7f4bf117f630, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:8001
|
#28 0x000055819eed853f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f4b940009a8, packet=packet@entry=0x7f4b94009319 "ROLLBACK /* QNO 16481 CON_ID 12 */ ", packet_length=packet_length@entry=35, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1846
|
#29 0x000055819eed8db6 in do_command (thd=0x7f4b940009a8) at /data/src/10.3/sql/sql_parse.cc:1391
|
#30 0x000055819efa5454 in do_handle_one_connection (connect=connect@entry=0x5581a1b58dc8) at /data/src/10.3/sql/sql_connect.cc:1402
|
#31 0x000055819efa55f4 in handle_one_connection (arg=0x5581a1b58dc8) at /data/src/10.3/sql/sql_connect.cc:1308
|
#32 0x00007f4c0145d494 in start_thread (arg=0x7f4bf1180700) at pthread_create.c:333
|
#33 0x00007f4bff84393f in clone () from /lib/x86_64-linux-gnu/libc.so.6
|
Attachments
Issue Links
- causes
-
MDEV-16713 Hangs server with repeating log entry
-
- Closed
-
- relates to
-
MDEV-15826 Purge attempts to free BLOB page after BEGIN;INSERT;UPDATE;ROLLBACK
-
- Closed
-
-
MDEV-13800 Crash during transaction rollback with thread_handling=pool-of-threads
-
- Closed
-
-
MDEV-16106 Record in index was not found on rollback, trying to insert: TUPLE
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Affects Version/s | 10.2 [ 14601 ] |
Attachment | threads_10.2_alive [ 45512 ] | |
Attachment | threads_10.3_after_crash [ 45513 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Description |
_Bugfix for {noformat:title=10.3 9d97e6010ebde} mysqld: /data/src/10.3/storage/innobase/include/trx0rec.ic:68: trx_undo_rec_t* trx_undo_rec_copy(const trx_undo_rec_t*, mem_heap_t*): Assertion `len < ((ulint) srv_page_size)' failed. 180221 15:24:43 [ERROR] mysqld got signal 6 ; #7 0x00007f17d1e20ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000055f40fa93e9e in trx_undo_rec_copy (undo_rec=0x7f17b4b29ee1 "", heap=0x7f17440ed960) at /data/src/10.3/storage/innobase/include/trx0rec.ic:68 #9 0x000055f40fa9b0a2 in trx_undo_get_undo_rec_low (roll_ptr=3377699801472737, is_temp=true, heap=0x7f17440ed960) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #10 0x000055f40fa9b19a in trx_undo_get_undo_rec (roll_ptr=3377699801472737, is_temp=true, heap=0x7f17440ed960, trx_id=960017, name=..., undo_rec=0x7f17bc0c95e0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #11 0x000055f40fa9b481 in trx_undo_prev_version_build (index_rec=0x7f17b3f73a61 "", index_mtr=0x7f17bc0c9f30, rec=0x7f17440f63be "", index=0x7f1744193198, offsets=0x7f17440f6420, heap=0x7f17440ed960, old_vers=0x7f17bc0c96d0, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #12 0x000055f40fa510de in row_vers_old_has_index_entry (also_curr=0, rec=0x7f17b3f73a61 "", mtr=0x7f17bc0c9f30, index=0x7f1744183618, ientry=0x7f1744159a68, roll_ptr=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:1010 #13 0x000055f40fc47d27 in row_undo_mod_del_mark_or_remove_sec_low (node=0x7f1744151288, thr=0x7f174406ac38, index=0x7f1744183618, entry=0x7f1744159a68, mode=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:510 #14 0x000055f40fc4807d in row_undo_mod_del_mark_or_remove_sec (node=0x7f1744151288, thr=0x7f174406ac38, index=0x7f1744183618, entry=0x7f1744159a68) at /data/src/10.3/storage/innobase/row/row0umod.cc:582 #15 0x000055f40fc494df in row_undo_mod_upd_exist_sec (node=0x7f1744151288, thr=0x7f174406ac38) at /data/src/10.3/storage/innobase/row/row0umod.cc:1062 #16 0x000055f40fc49dcb in row_undo_mod (node=0x7f1744151288, thr=0x7f174406ac38) at /data/src/10.3/storage/innobase/row/row0umod.cc:1280 #17 0x000055f40fa3aae7 in row_undo (node=0x7f1744151288, thr=0x7f174406ac38) at /data/src/10.3/storage/innobase/row/row0undo.cc:307 #18 0x000055f40fa3ac63 in row_undo_step (thr=0x7f174406ac38) at /data/src/10.3/storage/innobase/row/row0undo.cc:355 #19 0x000055f40f98dcb7 in que_thr_step (thr=0x7f174406ac38) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #20 0x000055f40f98df06 in que_run_threads_low (thr=0x7f174406ac38) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #21 0x000055f40f98e0f7 in que_run_threads (thr=0x7f174406ac38) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #22 0x000055f40fa9d934 in trx_rollback_to_savepoint_low (trx=0x7f17d018a710, savept=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:111 #23 0x000055f40fa9ddd1 in trx_rollback_for_mysql_low (trx=0x7f17d018a710) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:182 #24 0x000055f40fa9e501 in trx_rollback_low (trx=0x7f17d018a710) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:264 #25 0x000055f40fa9e64a in trx_rollback_for_mysql (trx=0x7f17d018a710) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:293 #26 0x000055f40f881ec3 in innobase_rollback (hton=0x55f4119c44b0, thd=0x7f1744000b00, rollback_trx=true) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4675 #27 0x000055f40f552ab1 in ha_rollback_trans (thd=0x7f1744000b00, all=true) at /data/src/10.3/sql/handler.cc:1719 #28 0x000055f40f3dc826 in xa_trans_force_rollback (thd=0x7f1744000b00) at /data/src/10.3/sql/transaction.cc:140 #29 0x000055f40f3dee9f in trans_xa_rollback (thd=0x7f1744000b00) at /data/src/10.3/sql/transaction.cc:1046 #30 0x000055f40f26f526 in mysql_execute_command (thd=0x7f1744000b00) at /data/src/10.3/sql/sql_parse.cc:6132 #31 0x000055f40f274834 in mysql_parse (thd=0x7f1744000b00, rawbuf=0x7f1744013958 "XA ROLLBACK 'xid59' /* QNO 9249 CON_ID 19 */", length=45, parser_state=0x7f17bc0cc630, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7980 #32 0x000055f40f261fe7 in dispatch_command (command=COM_QUERY, thd=0x7f1744000b00, packet=0x7f174400b191 "XA ROLLBACK 'xid59' /* QNO 9249 CON_ID 19 */ ", packet_length=46, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1825 #33 0x000055f40f260a26 in do_command (thd=0x7f1744000b00) at /data/src/10.3/sql/sql_parse.cc:1370 #34 0x000055f40f3c9629 in do_handle_one_connection (connect=0x55f41246d4f0) at /data/src/10.3/sql/sql_connect.cc:1402 #35 0x000055f40f3c93b6 in handle_one_connection (arg=0x55f41246d4f0) at /data/src/10.3/sql/sql_connect.cc:1308 #36 0x00007f17d3af7494 in start_thread (arg=0x7f17bc0cd700) at pthread_create.c:333 #37 0x00007f17d1edd93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} {noformat:title=experimental e0beb5824f47} perl ./runall-new.pl --duration=350 --threads=6 --seed=1519140360 --reporters=Backtrace,ErrorLog,Deadlock --validators=TransformerNoComparator --transformers=ExecuteAsCTE,ExecuteAsDeleteReturning,ExecuteAsExcept,ExecuteAsExecuteImmediate,ExecuteAsInsertSelect,ExecuteAsIntersect,ExecuteAsUnion,ExecuteAsUpdateDelete,ExecuteAsView,ExecuteAsPreparedTwice,ExecuteAsSPTwice --redefine=conf/mariadb/general-workarounds.yy --mysqld=--log_output=FILE --views --vcols --redefine=conf/mariadb/versioning.yy --redefine=conf/mariadb/alter_table.yy --redefine=conf/mariadb/bulk_insert.yy --redefine=conf/mariadb/sequences.yy --redefine=conf/mariadb/xa.yy --basedir=/data/bld/10.3 --mysqld=--log_bin_trust_function_creators=1 --mysqld=--log-bin --mysqld=--max-statement-time=30 --mysqld=--loose-debug_assert_on_not_freed_memory=0 --grammar=conf/runtime/metadata_stability.yy --gendata=conf/runtime/metadata_stability.zz --engine=InnoDB --vardir=/dev/shm/vardir5 {noformat} |
The RQG test provided below represents simple non-concurrent one-thread flow consisting of transactional updates on temporary InnoDB tables, followed by rollbacks. Very soon (for me it happens within the first minute of the test) on of ROLLBACKs causes an assertion failure on 10.3 or hangs on 10.2. For 10.3, even one table is enough, 10.2 seems to need two tables, so the grammar has two tables.
10.1 does not hang or crash. {noformat:title=10.3 fa68b88b5d415} mysqld: /data/src/10.3/storage/innobase/include/trx0rec.ic:68: trx_undo_rec_t* trx_undo_rec_copy(const trx_undo_rec_t*, mem_heap_t*): Assertion `len < ((ulint) srv_page_size)' failed. 180419 0:27:25 [ERROR] mysqld got signal 6 ; #7 0x00007f3211effee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000055bb77d5623e in trx_undo_rec_copy (undo_rec=0x7f31f072f041 "", heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/include/trx0rec.ic:68 #9 0x000055bb77d5d45b in trx_undo_get_undo_rec_low (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #10 0x000055bb77d5d54b in trx_undo_get_undo_rec (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90, trx_id=5480, name=..., undo_rec=0x7f3210185be0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #11 0x000055bb77d5d82c in trx_undo_prev_version_build (index_rec=0x7f31f052809b "", index_mtr=0x7f3210186520, rec=0x7f31a04e0b8e "", index=0x7f31a02a4f78, offsets=0x7f31a04e0bf0, heap=0x7f31a04e0e90, old_vers=0x7f3210185cd0, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #12 0x000055bb77d14702 in row_vers_old_has_index_entry (also_curr=0, rec=0x7f31f052809b "", mtr=0x7f3210186520, index=0x7f31a02a4ad8, ientry=0x7f31a04e05f8, roll_ptr=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:987 #13 0x000055bb77f03e4b in row_undo_mod_del_mark_or_remove_sec_low (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8, mode=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:544 #14 0x000055bb77f041a1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8) at /data/src/10.3/storage/innobase/row/row0umod.cc:616 #15 0x000055bb77f055f1 in row_undo_mod_upd_exist_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1096 #16 0x000055bb77f05edd in row_undo_mod (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1314 #17 0x000055bb77cfe36f in row_undo (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #18 0x000055bb77cfe551 in row_undo_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #19 0x000055bb77c4f65a in que_thr_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #20 0x000055bb77c4f8a9 in que_run_threads_low (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #21 0x000055bb77c4fa9a in que_run_threads (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #22 0x000055bb77d5ff2e in trx_rollback_to_savepoint_low (trx=0x7f3210268828, savept=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #23 0x000055bb77d6039c in trx_rollback_for_mysql_low (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #24 0x000055bb77d606db in trx_rollback_for_mysql (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:240 #25 0x000055bb77b497c3 in innobase_rollback (hton=0x55bb7af9c420, thd=0x7f31a0000b00, rollback_trx=true) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4632 #26 0x000055bb77834907 in ha_rollback_trans (thd=0x7f31a0000b00, all=true) at /data/src/10.3/sql/handler.cc:1721 #27 0x000055bb776c147d in trans_rollback (thd=0x7f31a0000b00) at /data/src/10.3/sql/transaction.cc:422 #28 0x000055bb77558739 in mysql_execute_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:5829 #29 0x000055bb7755eb06 in mysql_parse (thd=0x7f31a0000b00, rawbuf=0x7f31a0015ae8 "ROLLBACK /* QNO 22863 CON_ID 12 */", length=34, parser_state=0x7f3210188620, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8001 #30 0x000055bb7754c2e9 in dispatch_command (command=COM_QUERY, thd=0x7f31a0000b00, packet=0x7f31a04009c1 "ROLLBACK /* QNO 22863 CON_ID 12 */ ", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1846 #31 0x000055bb7754ad28 in do_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:1391 #32 0x000055bb776ad791 in do_handle_one_connection (connect=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1402 #33 0x000055bb776ad51e in handle_one_connection (arg=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1308 #34 0x00007f3213bd6494 in start_thread (arg=0x7f3210189700) at pthread_create.c:333 #35 0x00007f3211fbc93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} {noformat:title=10.2 66c14d3a8d31e while hanging} Thread 3 (Thread 0x7faef41c5700 (LWP 32647)): #0 GenericPolicy<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538878 <rw_lock_debug_mutex+56>, mutex=..., filename=0x555abd3a9670 "/data/src/10.2/storage/innobase/sync/sync0debug.cc" , line=1268) at /data/src/10.2/storage/innobase/include/sync0policy.h:349 #1 0x0000555abcd6d6b9 in PolicyMutex<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538840 <rw_lock_debug_mutex>, n_spins=30, n_delay=6, name=0x555abd3a9670 "/data/src/10.2/storage/inn obase/sync/sync0debug.cc", line=1268) at /data/src/10.2/storage/innobase/include/ib0mutex.h:635 #2 0x0000555abce74aa8 in rw_lock_debug_mutex_enter () at /data/src/10.2/storage/innobase/sync/sync0debug.cc:1268 #3 0x0000555abce6cc41 in rw_lock_own (lock=0x555abfef9780, lock_type=4) at /data/src/10.2/storage/innobase/sync/sync0rw.cc:1029 #4 0x0000555abcf2401c in buf_page_get_gen (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, file=0x555abd3b2ed0 "/data/src/10.2/storage/innobase/include/trx0undo.ic", line=180, mtr=0x7faef41c1380, err=0x0) at /data/src/10.2/storage/innobase/buf/buf0buf.cc:4829 #5 0x0000555abce972b2 in trx_undo_page_get_s_latched (page_id=..., mtr=0x7faef41c1380) at /data/src/10.2/storage/innobase/include/trx0undo.ic:179 #6 0x0000555abce9c364 in trx_undo_get_undo_rec_low (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2120 #7 0x0000555abce9c486 in trx_undo_get_undo_rec (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030, trx_id=2572, name=..., undo_rec=0x7faef41c1950) at /data/src/10.2/storage/inno base/trx/trx0rec.cc:2158 #8 0x0000555abce9c6db in trx_undo_prev_version_build (index_rec=0x7faed44fc09b "", index_mtr=0x7faef41c22a0, rec=0x7fae78057d26 "", index=0x7fae78048798, offsets=0x7fae78057d88, heap=0x7fa e78058030, old_vers=0x7faef41c1a40, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2244 #9 0x0000555abce53ad2 in row_vers_old_has_index_entry (also_curr=0, rec=0x7faed44fc09b "", mtr=0x7faef41c22a0, index=0x7fae78048368, ientry=0x7fae78057798, roll_ptr=0, trx_id=0) at /data/src/10.2/storage/innobase/row/row0vers.cc:999 #10 0x0000555abd02c8e9 in row_undo_mod_del_mark_or_remove_sec_low (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798, mode=2) at /data/src/10.2/storage/innobase/row/row0umod.cc:510 #11 0x0000555abd02cc02 in row_undo_mod_del_mark_or_remove_sec (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798) at /data/src/10.2/storage/innobase/row/row0umod.cc:582 #12 0x0000555abd02df86 in row_undo_mod_upd_exist_sec (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1063 #13 0x0000555abd02e63e in row_undo_mod (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1260 #14 0x0000555abce3e324 in row_undo (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:304 #15 0x0000555abce3e472 in row_undo_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:352 #16 0x0000555abcda1679 in que_thr_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1047 #17 0x0000555abcda1893 in que_run_threads_low (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1111 #18 0x0000555abcda1a3c in que_run_threads (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1151 #19 0x0000555abce9f233 in trx_rollback_to_savepoint_low (trx=0x7faee0b567e8, savept=0x0) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:112 #20 0x0000555abce9f59d in trx_rollback_for_mysql_low (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:174 #21 0x0000555abce9f87b in trx_rollback_for_mysql (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:202 #22 0x0000555abccb023f in innobase_rollback (hton=0x555abf7542a0, thd=0x7fae78000b00, rollback_trx=true) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:4810 #23 0x0000555abc9a4449 in ha_rollback_trans (thd=0x7fae78000b00, all=true) at /data/src/10.2/sql/handler.cc:1672 #24 0x0000555abc88e299 in trans_rollback (thd=0x7fae78000b00) at /data/src/10.2/sql/transaction.cc:415 #25 0x0000555abc736a08 in mysql_execute_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:5610 #26 0x0000555abc73d496 in mysql_parse (thd=0x7fae78000b00, rawbuf=0x7fae78013288 "ROLLBACK /* QNO 3689 CON_ID 12 */", length=33, parser_state=0x7faef41c4250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7924 #27 0x0000555abc72b32b in dispatch_command (command=COM_QUERY, thd=0x7fae78000b00, packet=0x7fae78008851 "ROLLBACK /* QNO 3689 CON_ID 12 */ ", packet_length=34, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1820 #28 0x0000555abc729c8e in do_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:1374 #29 0x0000555abc878694 in do_handle_one_connection (connect=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1335 #30 0x0000555abc878421 in handle_one_connection (arg=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1241 #31 0x00007faef81e4494 in start_thread (arg=0x7faef41c5700) at pthread_create.c:333 #32 0x00007faef65ca93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} All threads for both servers are attached. To reproduce: {noformat} git clone https://github.com/elenst/rqg --branch=mdev15374 rqg-mdev15374 cd rqg-mdev15374 {noformat} Further, if you want the test to start the server (on port 19300 by default), run the test and then stop the server if it doesn't crash before: {noformat} perl ./runall-new.pl --duration=350 --threads=1 --grammar=./mdev15374.yy --skip-gendata --vardir=/dev/shm/vardir {noformat} Or, if you already have the server running, e.g. on port 3306, then {noformat} perl ./gentest.pl --duration=350 --threads=1 --queries=100M --grammar=./mdev15374.yy --dsn="dbi:mysql:user=root:host=127.0.0.1:port=3306:database=test" {noformat} If you are running the test on 10.3, it is expected to crash very fast. If you are running it on 10.2, check the processlist, as soon as it starts saying something like {noformat} +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 | | 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 | | 16 | root | localhost:54026 | test | Query | 75 | init | ROLLBACK /* QNO 26430 CON_ID 16 */ | 0.000 | | 17 | root | localhost:53639 | NULL | Query | 0 | init | show processlist | 0.000 | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ {noformat} you have hit the problem. The test will eventually abort and complain, but it will take long time, because it optimistically waits for the server to wake up, while in this case the failure, when it happens, happens very fast. For the reference, here is the grammar: {noformat} query_init: CREATE TEMPORARY TABLE t1 (a INT, key (a)); INSERT INTO t1 VALUES (1),(2) ; CREATE TEMPORARY TABLE t2 (a INT, key (a)); INSERT INTO t2 VALUES (1),(2) ; query: transaction | UPDATE table_name SET a = _digit | ; table_name: t1 | t2 ; transaction: START TRANSACTION | ROLLBACK ; {noformat} |
Priority | Major [ 3 ] | Critical [ 2 ] |
Summary | [Draft] [#2] Assertion `len < ((ulint) srv_page_size)' failed in trx_undo_rec_copy | Server hangs or assertion `len < ((ulint) srv_page_size)' fails in trx_undo_rec_copy upon ROLLBACK on temporary table |
Component/s | Data Definition - Temporary [ 10123 ] |
Description |
The RQG test provided below represents simple non-concurrent one-thread flow consisting of transactional updates on temporary InnoDB tables, followed by rollbacks. Very soon (for me it happens within the first minute of the test) on of ROLLBACKs causes an assertion failure on 10.3 or hangs on 10.2. For 10.3, even one table is enough, 10.2 seems to need two tables, so the grammar has two tables.
10.1 does not hang or crash. {noformat:title=10.3 fa68b88b5d415} mysqld: /data/src/10.3/storage/innobase/include/trx0rec.ic:68: trx_undo_rec_t* trx_undo_rec_copy(const trx_undo_rec_t*, mem_heap_t*): Assertion `len < ((ulint) srv_page_size)' failed. 180419 0:27:25 [ERROR] mysqld got signal 6 ; #7 0x00007f3211effee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000055bb77d5623e in trx_undo_rec_copy (undo_rec=0x7f31f072f041 "", heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/include/trx0rec.ic:68 #9 0x000055bb77d5d45b in trx_undo_get_undo_rec_low (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #10 0x000055bb77d5d54b in trx_undo_get_undo_rec (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90, trx_id=5480, name=..., undo_rec=0x7f3210185be0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #11 0x000055bb77d5d82c in trx_undo_prev_version_build (index_rec=0x7f31f052809b "", index_mtr=0x7f3210186520, rec=0x7f31a04e0b8e "", index=0x7f31a02a4f78, offsets=0x7f31a04e0bf0, heap=0x7f31a04e0e90, old_vers=0x7f3210185cd0, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #12 0x000055bb77d14702 in row_vers_old_has_index_entry (also_curr=0, rec=0x7f31f052809b "", mtr=0x7f3210186520, index=0x7f31a02a4ad8, ientry=0x7f31a04e05f8, roll_ptr=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:987 #13 0x000055bb77f03e4b in row_undo_mod_del_mark_or_remove_sec_low (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8, mode=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:544 #14 0x000055bb77f041a1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8) at /data/src/10.3/storage/innobase/row/row0umod.cc:616 #15 0x000055bb77f055f1 in row_undo_mod_upd_exist_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1096 #16 0x000055bb77f05edd in row_undo_mod (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1314 #17 0x000055bb77cfe36f in row_undo (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #18 0x000055bb77cfe551 in row_undo_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #19 0x000055bb77c4f65a in que_thr_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #20 0x000055bb77c4f8a9 in que_run_threads_low (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #21 0x000055bb77c4fa9a in que_run_threads (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #22 0x000055bb77d5ff2e in trx_rollback_to_savepoint_low (trx=0x7f3210268828, savept=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #23 0x000055bb77d6039c in trx_rollback_for_mysql_low (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #24 0x000055bb77d606db in trx_rollback_for_mysql (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:240 #25 0x000055bb77b497c3 in innobase_rollback (hton=0x55bb7af9c420, thd=0x7f31a0000b00, rollback_trx=true) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4632 #26 0x000055bb77834907 in ha_rollback_trans (thd=0x7f31a0000b00, all=true) at /data/src/10.3/sql/handler.cc:1721 #27 0x000055bb776c147d in trans_rollback (thd=0x7f31a0000b00) at /data/src/10.3/sql/transaction.cc:422 #28 0x000055bb77558739 in mysql_execute_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:5829 #29 0x000055bb7755eb06 in mysql_parse (thd=0x7f31a0000b00, rawbuf=0x7f31a0015ae8 "ROLLBACK /* QNO 22863 CON_ID 12 */", length=34, parser_state=0x7f3210188620, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8001 #30 0x000055bb7754c2e9 in dispatch_command (command=COM_QUERY, thd=0x7f31a0000b00, packet=0x7f31a04009c1 "ROLLBACK /* QNO 22863 CON_ID 12 */ ", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1846 #31 0x000055bb7754ad28 in do_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:1391 #32 0x000055bb776ad791 in do_handle_one_connection (connect=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1402 #33 0x000055bb776ad51e in handle_one_connection (arg=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1308 #34 0x00007f3213bd6494 in start_thread (arg=0x7f3210189700) at pthread_create.c:333 #35 0x00007f3211fbc93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} {noformat:title=10.2 66c14d3a8d31e while hanging} Thread 3 (Thread 0x7faef41c5700 (LWP 32647)): #0 GenericPolicy<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538878 <rw_lock_debug_mutex+56>, mutex=..., filename=0x555abd3a9670 "/data/src/10.2/storage/innobase/sync/sync0debug.cc" , line=1268) at /data/src/10.2/storage/innobase/include/sync0policy.h:349 #1 0x0000555abcd6d6b9 in PolicyMutex<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538840 <rw_lock_debug_mutex>, n_spins=30, n_delay=6, name=0x555abd3a9670 "/data/src/10.2/storage/inn obase/sync/sync0debug.cc", line=1268) at /data/src/10.2/storage/innobase/include/ib0mutex.h:635 #2 0x0000555abce74aa8 in rw_lock_debug_mutex_enter () at /data/src/10.2/storage/innobase/sync/sync0debug.cc:1268 #3 0x0000555abce6cc41 in rw_lock_own (lock=0x555abfef9780, lock_type=4) at /data/src/10.2/storage/innobase/sync/sync0rw.cc:1029 #4 0x0000555abcf2401c in buf_page_get_gen (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, file=0x555abd3b2ed0 "/data/src/10.2/storage/innobase/include/trx0undo.ic", line=180, mtr=0x7faef41c1380, err=0x0) at /data/src/10.2/storage/innobase/buf/buf0buf.cc:4829 #5 0x0000555abce972b2 in trx_undo_page_get_s_latched (page_id=..., mtr=0x7faef41c1380) at /data/src/10.2/storage/innobase/include/trx0undo.ic:179 #6 0x0000555abce9c364 in trx_undo_get_undo_rec_low (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2120 #7 0x0000555abce9c486 in trx_undo_get_undo_rec (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030, trx_id=2572, name=..., undo_rec=0x7faef41c1950) at /data/src/10.2/storage/inno base/trx/trx0rec.cc:2158 #8 0x0000555abce9c6db in trx_undo_prev_version_build (index_rec=0x7faed44fc09b "", index_mtr=0x7faef41c22a0, rec=0x7fae78057d26 "", index=0x7fae78048798, offsets=0x7fae78057d88, heap=0x7fa e78058030, old_vers=0x7faef41c1a40, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2244 #9 0x0000555abce53ad2 in row_vers_old_has_index_entry (also_curr=0, rec=0x7faed44fc09b "", mtr=0x7faef41c22a0, index=0x7fae78048368, ientry=0x7fae78057798, roll_ptr=0, trx_id=0) at /data/src/10.2/storage/innobase/row/row0vers.cc:999 #10 0x0000555abd02c8e9 in row_undo_mod_del_mark_or_remove_sec_low (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798, mode=2) at /data/src/10.2/storage/innobase/row/row0umod.cc:510 #11 0x0000555abd02cc02 in row_undo_mod_del_mark_or_remove_sec (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798) at /data/src/10.2/storage/innobase/row/row0umod.cc:582 #12 0x0000555abd02df86 in row_undo_mod_upd_exist_sec (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1063 #13 0x0000555abd02e63e in row_undo_mod (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1260 #14 0x0000555abce3e324 in row_undo (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:304 #15 0x0000555abce3e472 in row_undo_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:352 #16 0x0000555abcda1679 in que_thr_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1047 #17 0x0000555abcda1893 in que_run_threads_low (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1111 #18 0x0000555abcda1a3c in que_run_threads (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1151 #19 0x0000555abce9f233 in trx_rollback_to_savepoint_low (trx=0x7faee0b567e8, savept=0x0) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:112 #20 0x0000555abce9f59d in trx_rollback_for_mysql_low (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:174 #21 0x0000555abce9f87b in trx_rollback_for_mysql (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:202 #22 0x0000555abccb023f in innobase_rollback (hton=0x555abf7542a0, thd=0x7fae78000b00, rollback_trx=true) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:4810 #23 0x0000555abc9a4449 in ha_rollback_trans (thd=0x7fae78000b00, all=true) at /data/src/10.2/sql/handler.cc:1672 #24 0x0000555abc88e299 in trans_rollback (thd=0x7fae78000b00) at /data/src/10.2/sql/transaction.cc:415 #25 0x0000555abc736a08 in mysql_execute_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:5610 #26 0x0000555abc73d496 in mysql_parse (thd=0x7fae78000b00, rawbuf=0x7fae78013288 "ROLLBACK /* QNO 3689 CON_ID 12 */", length=33, parser_state=0x7faef41c4250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7924 #27 0x0000555abc72b32b in dispatch_command (command=COM_QUERY, thd=0x7fae78000b00, packet=0x7fae78008851 "ROLLBACK /* QNO 3689 CON_ID 12 */ ", packet_length=34, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1820 #28 0x0000555abc729c8e in do_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:1374 #29 0x0000555abc878694 in do_handle_one_connection (connect=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1335 #30 0x0000555abc878421 in handle_one_connection (arg=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1241 #31 0x00007faef81e4494 in start_thread (arg=0x7faef41c5700) at pthread_create.c:333 #32 0x00007faef65ca93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} All threads for both servers are attached. To reproduce: {noformat} git clone https://github.com/elenst/rqg --branch=mdev15374 rqg-mdev15374 cd rqg-mdev15374 {noformat} Further, if you want the test to start the server (on port 19300 by default), run the test and then stop the server if it doesn't crash before: {noformat} perl ./runall-new.pl --duration=350 --threads=1 --grammar=./mdev15374.yy --skip-gendata --vardir=/dev/shm/vardir {noformat} Or, if you already have the server running, e.g. on port 3306, then {noformat} perl ./gentest.pl --duration=350 --threads=1 --queries=100M --grammar=./mdev15374.yy --dsn="dbi:mysql:user=root:host=127.0.0.1:port=3306:database=test" {noformat} If you are running the test on 10.3, it is expected to crash very fast. If you are running it on 10.2, check the processlist, as soon as it starts saying something like {noformat} +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 | | 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 | | 16 | root | localhost:54026 | test | Query | 75 | init | ROLLBACK /* QNO 26430 CON_ID 16 */ | 0.000 | | 17 | root | localhost:53639 | NULL | Query | 0 | init | show processlist | 0.000 | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ {noformat} you have hit the problem. The test will eventually abort and complain, but it will take long time, because it optimistically waits for the server to wake up, while in this case the failure, when it happens, happens very fast. For the reference, here is the grammar: {noformat} query_init: CREATE TEMPORARY TABLE t1 (a INT, key (a)); INSERT INTO t1 VALUES (1),(2) ; CREATE TEMPORARY TABLE t2 (a INT, key (a)); INSERT INTO t2 VALUES (1),(2) ; query: transaction | UPDATE table_name SET a = _digit | ; table_name: t1 | t2 ; transaction: START TRANSACTION | ROLLBACK ; {noformat} |
The RQG test provided below represents simple non-concurrent one-thread flow consisting of updates on temporary InnoDB tables, followed by rollbacks. Very soon (for me it happens within the first minute of the test) on of ROLLBACKs causes an assertion failure on 10.3 or hangs on 10.2. For 10.3, even one table is enough, 10.2 seems to need two tables, so the grammar has two tables.
10.1 does not hang or crash. {noformat:title=10.3 fa68b88b5d415} mysqld: /data/src/10.3/storage/innobase/include/trx0rec.ic:68: trx_undo_rec_t* trx_undo_rec_copy(const trx_undo_rec_t*, mem_heap_t*): Assertion `len < ((ulint) srv_page_size)' failed. 180419 0:27:25 [ERROR] mysqld got signal 6 ; #7 0x00007f3211effee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000055bb77d5623e in trx_undo_rec_copy (undo_rec=0x7f31f072f041 "", heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/include/trx0rec.ic:68 #9 0x000055bb77d5d45b in trx_undo_get_undo_rec_low (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #10 0x000055bb77d5d54b in trx_undo_get_undo_rec (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90, trx_id=5480, name=..., undo_rec=0x7f3210185be0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #11 0x000055bb77d5d82c in trx_undo_prev_version_build (index_rec=0x7f31f052809b "", index_mtr=0x7f3210186520, rec=0x7f31a04e0b8e "", index=0x7f31a02a4f78, offsets=0x7f31a04e0bf0, heap=0x7f31a04e0e90, old_vers=0x7f3210185cd0, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #12 0x000055bb77d14702 in row_vers_old_has_index_entry (also_curr=0, rec=0x7f31f052809b "", mtr=0x7f3210186520, index=0x7f31a02a4ad8, ientry=0x7f31a04e05f8, roll_ptr=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:987 #13 0x000055bb77f03e4b in row_undo_mod_del_mark_or_remove_sec_low (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8, mode=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:544 #14 0x000055bb77f041a1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8) at /data/src/10.3/storage/innobase/row/row0umod.cc:616 #15 0x000055bb77f055f1 in row_undo_mod_upd_exist_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1096 #16 0x000055bb77f05edd in row_undo_mod (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1314 #17 0x000055bb77cfe36f in row_undo (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #18 0x000055bb77cfe551 in row_undo_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #19 0x000055bb77c4f65a in que_thr_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #20 0x000055bb77c4f8a9 in que_run_threads_low (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #21 0x000055bb77c4fa9a in que_run_threads (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #22 0x000055bb77d5ff2e in trx_rollback_to_savepoint_low (trx=0x7f3210268828, savept=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #23 0x000055bb77d6039c in trx_rollback_for_mysql_low (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #24 0x000055bb77d606db in trx_rollback_for_mysql (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:240 #25 0x000055bb77b497c3 in innobase_rollback (hton=0x55bb7af9c420, thd=0x7f31a0000b00, rollback_trx=true) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4632 #26 0x000055bb77834907 in ha_rollback_trans (thd=0x7f31a0000b00, all=true) at /data/src/10.3/sql/handler.cc:1721 #27 0x000055bb776c147d in trans_rollback (thd=0x7f31a0000b00) at /data/src/10.3/sql/transaction.cc:422 #28 0x000055bb77558739 in mysql_execute_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:5829 #29 0x000055bb7755eb06 in mysql_parse (thd=0x7f31a0000b00, rawbuf=0x7f31a0015ae8 "ROLLBACK /* QNO 22863 CON_ID 12 */", length=34, parser_state=0x7f3210188620, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8001 #30 0x000055bb7754c2e9 in dispatch_command (command=COM_QUERY, thd=0x7f31a0000b00, packet=0x7f31a04009c1 "ROLLBACK /* QNO 22863 CON_ID 12 */ ", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1846 #31 0x000055bb7754ad28 in do_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:1391 #32 0x000055bb776ad791 in do_handle_one_connection (connect=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1402 #33 0x000055bb776ad51e in handle_one_connection (arg=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1308 #34 0x00007f3213bd6494 in start_thread (arg=0x7f3210189700) at pthread_create.c:333 #35 0x00007f3211fbc93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} {noformat:title=10.2 66c14d3a8d31e while hanging} Thread 3 (Thread 0x7faef41c5700 (LWP 32647)): #0 GenericPolicy<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538878 <rw_lock_debug_mutex+56>, mutex=..., filename=0x555abd3a9670 "/data/src/10.2/storage/innobase/sync/sync0debug.cc" , line=1268) at /data/src/10.2/storage/innobase/include/sync0policy.h:349 #1 0x0000555abcd6d6b9 in PolicyMutex<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538840 <rw_lock_debug_mutex>, n_spins=30, n_delay=6, name=0x555abd3a9670 "/data/src/10.2/storage/inn obase/sync/sync0debug.cc", line=1268) at /data/src/10.2/storage/innobase/include/ib0mutex.h:635 #2 0x0000555abce74aa8 in rw_lock_debug_mutex_enter () at /data/src/10.2/storage/innobase/sync/sync0debug.cc:1268 #3 0x0000555abce6cc41 in rw_lock_own (lock=0x555abfef9780, lock_type=4) at /data/src/10.2/storage/innobase/sync/sync0rw.cc:1029 #4 0x0000555abcf2401c in buf_page_get_gen (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, file=0x555abd3b2ed0 "/data/src/10.2/storage/innobase/include/trx0undo.ic", line=180, mtr=0x7faef41c1380, err=0x0) at /data/src/10.2/storage/innobase/buf/buf0buf.cc:4829 #5 0x0000555abce972b2 in trx_undo_page_get_s_latched (page_id=..., mtr=0x7faef41c1380) at /data/src/10.2/storage/innobase/include/trx0undo.ic:179 #6 0x0000555abce9c364 in trx_undo_get_undo_rec_low (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2120 #7 0x0000555abce9c486 in trx_undo_get_undo_rec (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030, trx_id=2572, name=..., undo_rec=0x7faef41c1950) at /data/src/10.2/storage/inno base/trx/trx0rec.cc:2158 #8 0x0000555abce9c6db in trx_undo_prev_version_build (index_rec=0x7faed44fc09b "", index_mtr=0x7faef41c22a0, rec=0x7fae78057d26 "", index=0x7fae78048798, offsets=0x7fae78057d88, heap=0x7fa e78058030, old_vers=0x7faef41c1a40, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2244 #9 0x0000555abce53ad2 in row_vers_old_has_index_entry (also_curr=0, rec=0x7faed44fc09b "", mtr=0x7faef41c22a0, index=0x7fae78048368, ientry=0x7fae78057798, roll_ptr=0, trx_id=0) at /data/src/10.2/storage/innobase/row/row0vers.cc:999 #10 0x0000555abd02c8e9 in row_undo_mod_del_mark_or_remove_sec_low (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798, mode=2) at /data/src/10.2/storage/innobase/row/row0umod.cc:510 #11 0x0000555abd02cc02 in row_undo_mod_del_mark_or_remove_sec (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798) at /data/src/10.2/storage/innobase/row/row0umod.cc:582 #12 0x0000555abd02df86 in row_undo_mod_upd_exist_sec (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1063 #13 0x0000555abd02e63e in row_undo_mod (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1260 #14 0x0000555abce3e324 in row_undo (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:304 #15 0x0000555abce3e472 in row_undo_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:352 #16 0x0000555abcda1679 in que_thr_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1047 #17 0x0000555abcda1893 in que_run_threads_low (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1111 #18 0x0000555abcda1a3c in que_run_threads (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1151 #19 0x0000555abce9f233 in trx_rollback_to_savepoint_low (trx=0x7faee0b567e8, savept=0x0) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:112 #20 0x0000555abce9f59d in trx_rollback_for_mysql_low (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:174 #21 0x0000555abce9f87b in trx_rollback_for_mysql (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:202 #22 0x0000555abccb023f in innobase_rollback (hton=0x555abf7542a0, thd=0x7fae78000b00, rollback_trx=true) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:4810 #23 0x0000555abc9a4449 in ha_rollback_trans (thd=0x7fae78000b00, all=true) at /data/src/10.2/sql/handler.cc:1672 #24 0x0000555abc88e299 in trans_rollback (thd=0x7fae78000b00) at /data/src/10.2/sql/transaction.cc:415 #25 0x0000555abc736a08 in mysql_execute_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:5610 #26 0x0000555abc73d496 in mysql_parse (thd=0x7fae78000b00, rawbuf=0x7fae78013288 "ROLLBACK /* QNO 3689 CON_ID 12 */", length=33, parser_state=0x7faef41c4250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7924 #27 0x0000555abc72b32b in dispatch_command (command=COM_QUERY, thd=0x7fae78000b00, packet=0x7fae78008851 "ROLLBACK /* QNO 3689 CON_ID 12 */ ", packet_length=34, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1820 #28 0x0000555abc729c8e in do_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:1374 #29 0x0000555abc878694 in do_handle_one_connection (connect=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1335 #30 0x0000555abc878421 in handle_one_connection (arg=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1241 #31 0x00007faef81e4494 in start_thread (arg=0x7faef41c5700) at pthread_create.c:333 #32 0x00007faef65ca93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} All threads for both servers are attached. To reproduce: {noformat} git clone https://github.com/elenst/rqg --branch=mdev15374 rqg-mdev15374 cd rqg-mdev15374 {noformat} Further, if you want the test to start the server (on port 19300 by default), run the test and then stop the server if it doesn't crash before: {noformat} perl ./runall-new.pl --duration=350 --threads=1 --grammar=./mdev15374.yy --skip-gendata --vardir=/dev/shm/vardir {noformat} Or, if you already have the server running, e.g. on port 3306, then {noformat} perl ./gentest.pl --duration=350 --threads=1 --queries=100M --grammar=./mdev15374.yy --dsn="dbi:mysql:user=root:host=127.0.0.1:port=3306:database=test" {noformat} If you are running the test on 10.3, it is expected to crash very fast. If you are running it on 10.2, check the processlist, as soon as it starts saying something like {noformat} +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 | | 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 | | 16 | root | localhost:54026 | test | Query | 75 | init | ROLLBACK /* QNO 26430 CON_ID 16 */ | 0.000 | | 17 | root | localhost:53639 | NULL | Query | 0 | init | show processlist | 0.000 | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ {noformat} you have hit the problem. The test will eventually abort and complain, but it will take long time, because it optimistically waits for the server to wake up, while in this case the failure, when it happens, happens very fast. For the reference, here is the grammar: {noformat} query_init: CREATE TEMPORARY TABLE t1 (a INT, key (a)); INSERT INTO t1 VALUES (1),(2) ; CREATE TEMPORARY TABLE t2 (a INT, key (a)); INSERT INTO t2 VALUES (1),(2) ; query: transaction | UPDATE table_name SET a = _digit | ; table_name: t1 | t2 ; transaction: START TRANSACTION | ROLLBACK ; {noformat} |
Description |
The RQG test provided below represents simple non-concurrent one-thread flow consisting of updates on temporary InnoDB tables, followed by rollbacks. Very soon (for me it happens within the first minute of the test) on of ROLLBACKs causes an assertion failure on 10.3 or hangs on 10.2. For 10.3, even one table is enough, 10.2 seems to need two tables, so the grammar has two tables.
10.1 does not hang or crash. {noformat:title=10.3 fa68b88b5d415} mysqld: /data/src/10.3/storage/innobase/include/trx0rec.ic:68: trx_undo_rec_t* trx_undo_rec_copy(const trx_undo_rec_t*, mem_heap_t*): Assertion `len < ((ulint) srv_page_size)' failed. 180419 0:27:25 [ERROR] mysqld got signal 6 ; #7 0x00007f3211effee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000055bb77d5623e in trx_undo_rec_copy (undo_rec=0x7f31f072f041 "", heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/include/trx0rec.ic:68 #9 0x000055bb77d5d45b in trx_undo_get_undo_rec_low (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #10 0x000055bb77d5d54b in trx_undo_get_undo_rec (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90, trx_id=5480, name=..., undo_rec=0x7f3210185be0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #11 0x000055bb77d5d82c in trx_undo_prev_version_build (index_rec=0x7f31f052809b "", index_mtr=0x7f3210186520, rec=0x7f31a04e0b8e "", index=0x7f31a02a4f78, offsets=0x7f31a04e0bf0, heap=0x7f31a04e0e90, old_vers=0x7f3210185cd0, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #12 0x000055bb77d14702 in row_vers_old_has_index_entry (also_curr=0, rec=0x7f31f052809b "", mtr=0x7f3210186520, index=0x7f31a02a4ad8, ientry=0x7f31a04e05f8, roll_ptr=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:987 #13 0x000055bb77f03e4b in row_undo_mod_del_mark_or_remove_sec_low (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8, mode=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:544 #14 0x000055bb77f041a1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8) at /data/src/10.3/storage/innobase/row/row0umod.cc:616 #15 0x000055bb77f055f1 in row_undo_mod_upd_exist_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1096 #16 0x000055bb77f05edd in row_undo_mod (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1314 #17 0x000055bb77cfe36f in row_undo (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #18 0x000055bb77cfe551 in row_undo_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #19 0x000055bb77c4f65a in que_thr_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #20 0x000055bb77c4f8a9 in que_run_threads_low (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #21 0x000055bb77c4fa9a in que_run_threads (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #22 0x000055bb77d5ff2e in trx_rollback_to_savepoint_low (trx=0x7f3210268828, savept=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #23 0x000055bb77d6039c in trx_rollback_for_mysql_low (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #24 0x000055bb77d606db in trx_rollback_for_mysql (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:240 #25 0x000055bb77b497c3 in innobase_rollback (hton=0x55bb7af9c420, thd=0x7f31a0000b00, rollback_trx=true) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4632 #26 0x000055bb77834907 in ha_rollback_trans (thd=0x7f31a0000b00, all=true) at /data/src/10.3/sql/handler.cc:1721 #27 0x000055bb776c147d in trans_rollback (thd=0x7f31a0000b00) at /data/src/10.3/sql/transaction.cc:422 #28 0x000055bb77558739 in mysql_execute_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:5829 #29 0x000055bb7755eb06 in mysql_parse (thd=0x7f31a0000b00, rawbuf=0x7f31a0015ae8 "ROLLBACK /* QNO 22863 CON_ID 12 */", length=34, parser_state=0x7f3210188620, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8001 #30 0x000055bb7754c2e9 in dispatch_command (command=COM_QUERY, thd=0x7f31a0000b00, packet=0x7f31a04009c1 "ROLLBACK /* QNO 22863 CON_ID 12 */ ", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1846 #31 0x000055bb7754ad28 in do_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:1391 #32 0x000055bb776ad791 in do_handle_one_connection (connect=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1402 #33 0x000055bb776ad51e in handle_one_connection (arg=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1308 #34 0x00007f3213bd6494 in start_thread (arg=0x7f3210189700) at pthread_create.c:333 #35 0x00007f3211fbc93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} {noformat:title=10.2 66c14d3a8d31e while hanging} Thread 3 (Thread 0x7faef41c5700 (LWP 32647)): #0 GenericPolicy<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538878 <rw_lock_debug_mutex+56>, mutex=..., filename=0x555abd3a9670 "/data/src/10.2/storage/innobase/sync/sync0debug.cc" , line=1268) at /data/src/10.2/storage/innobase/include/sync0policy.h:349 #1 0x0000555abcd6d6b9 in PolicyMutex<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538840 <rw_lock_debug_mutex>, n_spins=30, n_delay=6, name=0x555abd3a9670 "/data/src/10.2/storage/inn obase/sync/sync0debug.cc", line=1268) at /data/src/10.2/storage/innobase/include/ib0mutex.h:635 #2 0x0000555abce74aa8 in rw_lock_debug_mutex_enter () at /data/src/10.2/storage/innobase/sync/sync0debug.cc:1268 #3 0x0000555abce6cc41 in rw_lock_own (lock=0x555abfef9780, lock_type=4) at /data/src/10.2/storage/innobase/sync/sync0rw.cc:1029 #4 0x0000555abcf2401c in buf_page_get_gen (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, file=0x555abd3b2ed0 "/data/src/10.2/storage/innobase/include/trx0undo.ic", line=180, mtr=0x7faef41c1380, err=0x0) at /data/src/10.2/storage/innobase/buf/buf0buf.cc:4829 #5 0x0000555abce972b2 in trx_undo_page_get_s_latched (page_id=..., mtr=0x7faef41c1380) at /data/src/10.2/storage/innobase/include/trx0undo.ic:179 #6 0x0000555abce9c364 in trx_undo_get_undo_rec_low (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2120 #7 0x0000555abce9c486 in trx_undo_get_undo_rec (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030, trx_id=2572, name=..., undo_rec=0x7faef41c1950) at /data/src/10.2/storage/inno base/trx/trx0rec.cc:2158 #8 0x0000555abce9c6db in trx_undo_prev_version_build (index_rec=0x7faed44fc09b "", index_mtr=0x7faef41c22a0, rec=0x7fae78057d26 "", index=0x7fae78048798, offsets=0x7fae78057d88, heap=0x7fa e78058030, old_vers=0x7faef41c1a40, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2244 #9 0x0000555abce53ad2 in row_vers_old_has_index_entry (also_curr=0, rec=0x7faed44fc09b "", mtr=0x7faef41c22a0, index=0x7fae78048368, ientry=0x7fae78057798, roll_ptr=0, trx_id=0) at /data/src/10.2/storage/innobase/row/row0vers.cc:999 #10 0x0000555abd02c8e9 in row_undo_mod_del_mark_or_remove_sec_low (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798, mode=2) at /data/src/10.2/storage/innobase/row/row0umod.cc:510 #11 0x0000555abd02cc02 in row_undo_mod_del_mark_or_remove_sec (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798) at /data/src/10.2/storage/innobase/row/row0umod.cc:582 #12 0x0000555abd02df86 in row_undo_mod_upd_exist_sec (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1063 #13 0x0000555abd02e63e in row_undo_mod (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1260 #14 0x0000555abce3e324 in row_undo (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:304 #15 0x0000555abce3e472 in row_undo_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:352 #16 0x0000555abcda1679 in que_thr_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1047 #17 0x0000555abcda1893 in que_run_threads_low (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1111 #18 0x0000555abcda1a3c in que_run_threads (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1151 #19 0x0000555abce9f233 in trx_rollback_to_savepoint_low (trx=0x7faee0b567e8, savept=0x0) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:112 #20 0x0000555abce9f59d in trx_rollback_for_mysql_low (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:174 #21 0x0000555abce9f87b in trx_rollback_for_mysql (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:202 #22 0x0000555abccb023f in innobase_rollback (hton=0x555abf7542a0, thd=0x7fae78000b00, rollback_trx=true) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:4810 #23 0x0000555abc9a4449 in ha_rollback_trans (thd=0x7fae78000b00, all=true) at /data/src/10.2/sql/handler.cc:1672 #24 0x0000555abc88e299 in trans_rollback (thd=0x7fae78000b00) at /data/src/10.2/sql/transaction.cc:415 #25 0x0000555abc736a08 in mysql_execute_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:5610 #26 0x0000555abc73d496 in mysql_parse (thd=0x7fae78000b00, rawbuf=0x7fae78013288 "ROLLBACK /* QNO 3689 CON_ID 12 */", length=33, parser_state=0x7faef41c4250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7924 #27 0x0000555abc72b32b in dispatch_command (command=COM_QUERY, thd=0x7fae78000b00, packet=0x7fae78008851 "ROLLBACK /* QNO 3689 CON_ID 12 */ ", packet_length=34, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1820 #28 0x0000555abc729c8e in do_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:1374 #29 0x0000555abc878694 in do_handle_one_connection (connect=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1335 #30 0x0000555abc878421 in handle_one_connection (arg=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1241 #31 0x00007faef81e4494 in start_thread (arg=0x7faef41c5700) at pthread_create.c:333 #32 0x00007faef65ca93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} All threads for both servers are attached. To reproduce: {noformat} git clone https://github.com/elenst/rqg --branch=mdev15374 rqg-mdev15374 cd rqg-mdev15374 {noformat} Further, if you want the test to start the server (on port 19300 by default), run the test and then stop the server if it doesn't crash before: {noformat} perl ./runall-new.pl --duration=350 --threads=1 --grammar=./mdev15374.yy --skip-gendata --vardir=/dev/shm/vardir {noformat} Or, if you already have the server running, e.g. on port 3306, then {noformat} perl ./gentest.pl --duration=350 --threads=1 --queries=100M --grammar=./mdev15374.yy --dsn="dbi:mysql:user=root:host=127.0.0.1:port=3306:database=test" {noformat} If you are running the test on 10.3, it is expected to crash very fast. If you are running it on 10.2, check the processlist, as soon as it starts saying something like {noformat} +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 | | 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 | | 16 | root | localhost:54026 | test | Query | 75 | init | ROLLBACK /* QNO 26430 CON_ID 16 */ | 0.000 | | 17 | root | localhost:53639 | NULL | Query | 0 | init | show processlist | 0.000 | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ {noformat} you have hit the problem. The test will eventually abort and complain, but it will take long time, because it optimistically waits for the server to wake up, while in this case the failure, when it happens, happens very fast. For the reference, here is the grammar: {noformat} query_init: CREATE TEMPORARY TABLE t1 (a INT, key (a)); INSERT INTO t1 VALUES (1),(2) ; CREATE TEMPORARY TABLE t2 (a INT, key (a)); INSERT INTO t2 VALUES (1),(2) ; query: transaction | UPDATE table_name SET a = _digit | ; table_name: t1 | t2 ; transaction: START TRANSACTION | ROLLBACK ; {noformat} |
The RQG test provided below represents simple non-concurrent one-thread flow consisting of updates on temporary InnoDB tables, followed by rollbacks. Very soon (for me it happens within the first minute of the test) one of ROLLBACKs causes an assertion failure on 10.3 or hangs on 10.2. For 10.3, even one table is enough, 10.2 seems to need two tables, so the grammar has two tables.
10.1 does not hang or crash. {noformat:title=10.3 fa68b88b5d415} mysqld: /data/src/10.3/storage/innobase/include/trx0rec.ic:68: trx_undo_rec_t* trx_undo_rec_copy(const trx_undo_rec_t*, mem_heap_t*): Assertion `len < ((ulint) srv_page_size)' failed. 180419 0:27:25 [ERROR] mysqld got signal 6 ; #7 0x00007f3211effee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000055bb77d5623e in trx_undo_rec_copy (undo_rec=0x7f31f072f041 "", heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/include/trx0rec.ic:68 #9 0x000055bb77d5d45b in trx_undo_get_undo_rec_low (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #10 0x000055bb77d5d54b in trx_undo_get_undo_rec (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90, trx_id=5480, name=..., undo_rec=0x7f3210185be0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #11 0x000055bb77d5d82c in trx_undo_prev_version_build (index_rec=0x7f31f052809b "", index_mtr=0x7f3210186520, rec=0x7f31a04e0b8e "", index=0x7f31a02a4f78, offsets=0x7f31a04e0bf0, heap=0x7f31a04e0e90, old_vers=0x7f3210185cd0, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #12 0x000055bb77d14702 in row_vers_old_has_index_entry (also_curr=0, rec=0x7f31f052809b "", mtr=0x7f3210186520, index=0x7f31a02a4ad8, ientry=0x7f31a04e05f8, roll_ptr=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:987 #13 0x000055bb77f03e4b in row_undo_mod_del_mark_or_remove_sec_low (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8, mode=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:544 #14 0x000055bb77f041a1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8) at /data/src/10.3/storage/innobase/row/row0umod.cc:616 #15 0x000055bb77f055f1 in row_undo_mod_upd_exist_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1096 #16 0x000055bb77f05edd in row_undo_mod (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1314 #17 0x000055bb77cfe36f in row_undo (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #18 0x000055bb77cfe551 in row_undo_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #19 0x000055bb77c4f65a in que_thr_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #20 0x000055bb77c4f8a9 in que_run_threads_low (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #21 0x000055bb77c4fa9a in que_run_threads (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #22 0x000055bb77d5ff2e in trx_rollback_to_savepoint_low (trx=0x7f3210268828, savept=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #23 0x000055bb77d6039c in trx_rollback_for_mysql_low (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #24 0x000055bb77d606db in trx_rollback_for_mysql (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:240 #25 0x000055bb77b497c3 in innobase_rollback (hton=0x55bb7af9c420, thd=0x7f31a0000b00, rollback_trx=true) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4632 #26 0x000055bb77834907 in ha_rollback_trans (thd=0x7f31a0000b00, all=true) at /data/src/10.3/sql/handler.cc:1721 #27 0x000055bb776c147d in trans_rollback (thd=0x7f31a0000b00) at /data/src/10.3/sql/transaction.cc:422 #28 0x000055bb77558739 in mysql_execute_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:5829 #29 0x000055bb7755eb06 in mysql_parse (thd=0x7f31a0000b00, rawbuf=0x7f31a0015ae8 "ROLLBACK /* QNO 22863 CON_ID 12 */", length=34, parser_state=0x7f3210188620, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8001 #30 0x000055bb7754c2e9 in dispatch_command (command=COM_QUERY, thd=0x7f31a0000b00, packet=0x7f31a04009c1 "ROLLBACK /* QNO 22863 CON_ID 12 */ ", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1846 #31 0x000055bb7754ad28 in do_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:1391 #32 0x000055bb776ad791 in do_handle_one_connection (connect=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1402 #33 0x000055bb776ad51e in handle_one_connection (arg=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1308 #34 0x00007f3213bd6494 in start_thread (arg=0x7f3210189700) at pthread_create.c:333 #35 0x00007f3211fbc93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} {noformat:title=10.2 66c14d3a8d31e while hanging} Thread 3 (Thread 0x7faef41c5700 (LWP 32647)): #0 GenericPolicy<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538878 <rw_lock_debug_mutex+56>, mutex=..., filename=0x555abd3a9670 "/data/src/10.2/storage/innobase/sync/sync0debug.cc" , line=1268) at /data/src/10.2/storage/innobase/include/sync0policy.h:349 #1 0x0000555abcd6d6b9 in PolicyMutex<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538840 <rw_lock_debug_mutex>, n_spins=30, n_delay=6, name=0x555abd3a9670 "/data/src/10.2/storage/inn obase/sync/sync0debug.cc", line=1268) at /data/src/10.2/storage/innobase/include/ib0mutex.h:635 #2 0x0000555abce74aa8 in rw_lock_debug_mutex_enter () at /data/src/10.2/storage/innobase/sync/sync0debug.cc:1268 #3 0x0000555abce6cc41 in rw_lock_own (lock=0x555abfef9780, lock_type=4) at /data/src/10.2/storage/innobase/sync/sync0rw.cc:1029 #4 0x0000555abcf2401c in buf_page_get_gen (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, file=0x555abd3b2ed0 "/data/src/10.2/storage/innobase/include/trx0undo.ic", line=180, mtr=0x7faef41c1380, err=0x0) at /data/src/10.2/storage/innobase/buf/buf0buf.cc:4829 #5 0x0000555abce972b2 in trx_undo_page_get_s_latched (page_id=..., mtr=0x7faef41c1380) at /data/src/10.2/storage/innobase/include/trx0undo.ic:179 #6 0x0000555abce9c364 in trx_undo_get_undo_rec_low (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2120 #7 0x0000555abce9c486 in trx_undo_get_undo_rec (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030, trx_id=2572, name=..., undo_rec=0x7faef41c1950) at /data/src/10.2/storage/inno base/trx/trx0rec.cc:2158 #8 0x0000555abce9c6db in trx_undo_prev_version_build (index_rec=0x7faed44fc09b "", index_mtr=0x7faef41c22a0, rec=0x7fae78057d26 "", index=0x7fae78048798, offsets=0x7fae78057d88, heap=0x7fa e78058030, old_vers=0x7faef41c1a40, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2244 #9 0x0000555abce53ad2 in row_vers_old_has_index_entry (also_curr=0, rec=0x7faed44fc09b "", mtr=0x7faef41c22a0, index=0x7fae78048368, ientry=0x7fae78057798, roll_ptr=0, trx_id=0) at /data/src/10.2/storage/innobase/row/row0vers.cc:999 #10 0x0000555abd02c8e9 in row_undo_mod_del_mark_or_remove_sec_low (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798, mode=2) at /data/src/10.2/storage/innobase/row/row0umod.cc:510 #11 0x0000555abd02cc02 in row_undo_mod_del_mark_or_remove_sec (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798) at /data/src/10.2/storage/innobase/row/row0umod.cc:582 #12 0x0000555abd02df86 in row_undo_mod_upd_exist_sec (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1063 #13 0x0000555abd02e63e in row_undo_mod (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1260 #14 0x0000555abce3e324 in row_undo (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:304 #15 0x0000555abce3e472 in row_undo_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:352 #16 0x0000555abcda1679 in que_thr_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1047 #17 0x0000555abcda1893 in que_run_threads_low (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1111 #18 0x0000555abcda1a3c in que_run_threads (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1151 #19 0x0000555abce9f233 in trx_rollback_to_savepoint_low (trx=0x7faee0b567e8, savept=0x0) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:112 #20 0x0000555abce9f59d in trx_rollback_for_mysql_low (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:174 #21 0x0000555abce9f87b in trx_rollback_for_mysql (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:202 #22 0x0000555abccb023f in innobase_rollback (hton=0x555abf7542a0, thd=0x7fae78000b00, rollback_trx=true) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:4810 #23 0x0000555abc9a4449 in ha_rollback_trans (thd=0x7fae78000b00, all=true) at /data/src/10.2/sql/handler.cc:1672 #24 0x0000555abc88e299 in trans_rollback (thd=0x7fae78000b00) at /data/src/10.2/sql/transaction.cc:415 #25 0x0000555abc736a08 in mysql_execute_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:5610 #26 0x0000555abc73d496 in mysql_parse (thd=0x7fae78000b00, rawbuf=0x7fae78013288 "ROLLBACK /* QNO 3689 CON_ID 12 */", length=33, parser_state=0x7faef41c4250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7924 #27 0x0000555abc72b32b in dispatch_command (command=COM_QUERY, thd=0x7fae78000b00, packet=0x7fae78008851 "ROLLBACK /* QNO 3689 CON_ID 12 */ ", packet_length=34, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1820 #28 0x0000555abc729c8e in do_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:1374 #29 0x0000555abc878694 in do_handle_one_connection (connect=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1335 #30 0x0000555abc878421 in handle_one_connection (arg=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1241 #31 0x00007faef81e4494 in start_thread (arg=0x7faef41c5700) at pthread_create.c:333 #32 0x00007faef65ca93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} All threads for both servers are attached. To reproduce: {noformat} git clone https://github.com/elenst/rqg --branch=mdev15374 rqg-mdev15374 cd rqg-mdev15374 {noformat} Further, if you want the test to start the server (on port 19300 by default), run the test and then stop the server if it doesn't crash before: {noformat} perl ./runall-new.pl --duration=350 --threads=1 --grammar=./mdev15374.yy --skip-gendata --vardir=/dev/shm/vardir {noformat} Or, if you already have the server running, e.g. on port 3306, then {noformat} perl ./gentest.pl --duration=350 --threads=1 --queries=100M --grammar=./mdev15374.yy --dsn="dbi:mysql:user=root:host=127.0.0.1:port=3306:database=test" {noformat} If you are running the test on 10.3, it is expected to crash very fast. If you are running it on 10.2, check the processlist, as soon as it starts saying something like {noformat} +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 | | 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 | | 16 | root | localhost:54026 | test | Query | 75 | init | ROLLBACK /* QNO 26430 CON_ID 16 */ | 0.000 | | 17 | root | localhost:53639 | NULL | Query | 0 | init | show processlist | 0.000 | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ {noformat} you have hit the problem. The test will eventually abort and complain, but it will take long time, because it optimistically waits for the server to wake up, while in this case the failure, when it happens, happens very fast. For the reference, here is the grammar: {noformat} query_init: CREATE TEMPORARY TABLE t1 (a INT, key (a)); INSERT INTO t1 VALUES (1),(2) ; CREATE TEMPORARY TABLE t2 (a INT, key (a)); INSERT INTO t2 VALUES (1),(2) ; query: transaction | UPDATE table_name SET a = _digit | ; table_name: t1 | t2 ; transaction: START TRANSACTION | ROLLBACK ; {noformat} |
Attachment | mysql.log.gz [ 45251 ] |
Attachment | threads [ 45252 ] |
Comment | [ On 10.2: https://api.travis-ci.org/v3/job/344459001/log.txt ] |
Description |
The RQG test provided below represents simple non-concurrent one-thread flow consisting of updates on temporary InnoDB tables, followed by rollbacks. Very soon (for me it happens within the first minute of the test) one of ROLLBACKs causes an assertion failure on 10.3 or hangs on 10.2. For 10.3, even one table is enough, 10.2 seems to need two tables, so the grammar has two tables.
10.1 does not hang or crash. {noformat:title=10.3 fa68b88b5d415} mysqld: /data/src/10.3/storage/innobase/include/trx0rec.ic:68: trx_undo_rec_t* trx_undo_rec_copy(const trx_undo_rec_t*, mem_heap_t*): Assertion `len < ((ulint) srv_page_size)' failed. 180419 0:27:25 [ERROR] mysqld got signal 6 ; #7 0x00007f3211effee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000055bb77d5623e in trx_undo_rec_copy (undo_rec=0x7f31f072f041 "", heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/include/trx0rec.ic:68 #9 0x000055bb77d5d45b in trx_undo_get_undo_rec_low (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #10 0x000055bb77d5d54b in trx_undo_get_undo_rec (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90, trx_id=5480, name=..., undo_rec=0x7f3210185be0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #11 0x000055bb77d5d82c in trx_undo_prev_version_build (index_rec=0x7f31f052809b "", index_mtr=0x7f3210186520, rec=0x7f31a04e0b8e "", index=0x7f31a02a4f78, offsets=0x7f31a04e0bf0, heap=0x7f31a04e0e90, old_vers=0x7f3210185cd0, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #12 0x000055bb77d14702 in row_vers_old_has_index_entry (also_curr=0, rec=0x7f31f052809b "", mtr=0x7f3210186520, index=0x7f31a02a4ad8, ientry=0x7f31a04e05f8, roll_ptr=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:987 #13 0x000055bb77f03e4b in row_undo_mod_del_mark_or_remove_sec_low (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8, mode=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:544 #14 0x000055bb77f041a1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8) at /data/src/10.3/storage/innobase/row/row0umod.cc:616 #15 0x000055bb77f055f1 in row_undo_mod_upd_exist_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1096 #16 0x000055bb77f05edd in row_undo_mod (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1314 #17 0x000055bb77cfe36f in row_undo (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #18 0x000055bb77cfe551 in row_undo_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #19 0x000055bb77c4f65a in que_thr_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #20 0x000055bb77c4f8a9 in que_run_threads_low (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #21 0x000055bb77c4fa9a in que_run_threads (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #22 0x000055bb77d5ff2e in trx_rollback_to_savepoint_low (trx=0x7f3210268828, savept=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #23 0x000055bb77d6039c in trx_rollback_for_mysql_low (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #24 0x000055bb77d606db in trx_rollback_for_mysql (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:240 #25 0x000055bb77b497c3 in innobase_rollback (hton=0x55bb7af9c420, thd=0x7f31a0000b00, rollback_trx=true) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4632 #26 0x000055bb77834907 in ha_rollback_trans (thd=0x7f31a0000b00, all=true) at /data/src/10.3/sql/handler.cc:1721 #27 0x000055bb776c147d in trans_rollback (thd=0x7f31a0000b00) at /data/src/10.3/sql/transaction.cc:422 #28 0x000055bb77558739 in mysql_execute_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:5829 #29 0x000055bb7755eb06 in mysql_parse (thd=0x7f31a0000b00, rawbuf=0x7f31a0015ae8 "ROLLBACK /* QNO 22863 CON_ID 12 */", length=34, parser_state=0x7f3210188620, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8001 #30 0x000055bb7754c2e9 in dispatch_command (command=COM_QUERY, thd=0x7f31a0000b00, packet=0x7f31a04009c1 "ROLLBACK /* QNO 22863 CON_ID 12 */ ", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1846 #31 0x000055bb7754ad28 in do_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:1391 #32 0x000055bb776ad791 in do_handle_one_connection (connect=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1402 #33 0x000055bb776ad51e in handle_one_connection (arg=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1308 #34 0x00007f3213bd6494 in start_thread (arg=0x7f3210189700) at pthread_create.c:333 #35 0x00007f3211fbc93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} {noformat:title=10.2 66c14d3a8d31e while hanging} Thread 3 (Thread 0x7faef41c5700 (LWP 32647)): #0 GenericPolicy<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538878 <rw_lock_debug_mutex+56>, mutex=..., filename=0x555abd3a9670 "/data/src/10.2/storage/innobase/sync/sync0debug.cc" , line=1268) at /data/src/10.2/storage/innobase/include/sync0policy.h:349 #1 0x0000555abcd6d6b9 in PolicyMutex<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538840 <rw_lock_debug_mutex>, n_spins=30, n_delay=6, name=0x555abd3a9670 "/data/src/10.2/storage/inn obase/sync/sync0debug.cc", line=1268) at /data/src/10.2/storage/innobase/include/ib0mutex.h:635 #2 0x0000555abce74aa8 in rw_lock_debug_mutex_enter () at /data/src/10.2/storage/innobase/sync/sync0debug.cc:1268 #3 0x0000555abce6cc41 in rw_lock_own (lock=0x555abfef9780, lock_type=4) at /data/src/10.2/storage/innobase/sync/sync0rw.cc:1029 #4 0x0000555abcf2401c in buf_page_get_gen (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, file=0x555abd3b2ed0 "/data/src/10.2/storage/innobase/include/trx0undo.ic", line=180, mtr=0x7faef41c1380, err=0x0) at /data/src/10.2/storage/innobase/buf/buf0buf.cc:4829 #5 0x0000555abce972b2 in trx_undo_page_get_s_latched (page_id=..., mtr=0x7faef41c1380) at /data/src/10.2/storage/innobase/include/trx0undo.ic:179 #6 0x0000555abce9c364 in trx_undo_get_undo_rec_low (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2120 #7 0x0000555abce9c486 in trx_undo_get_undo_rec (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030, trx_id=2572, name=..., undo_rec=0x7faef41c1950) at /data/src/10.2/storage/inno base/trx/trx0rec.cc:2158 #8 0x0000555abce9c6db in trx_undo_prev_version_build (index_rec=0x7faed44fc09b "", index_mtr=0x7faef41c22a0, rec=0x7fae78057d26 "", index=0x7fae78048798, offsets=0x7fae78057d88, heap=0x7fa e78058030, old_vers=0x7faef41c1a40, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2244 #9 0x0000555abce53ad2 in row_vers_old_has_index_entry (also_curr=0, rec=0x7faed44fc09b "", mtr=0x7faef41c22a0, index=0x7fae78048368, ientry=0x7fae78057798, roll_ptr=0, trx_id=0) at /data/src/10.2/storage/innobase/row/row0vers.cc:999 #10 0x0000555abd02c8e9 in row_undo_mod_del_mark_or_remove_sec_low (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798, mode=2) at /data/src/10.2/storage/innobase/row/row0umod.cc:510 #11 0x0000555abd02cc02 in row_undo_mod_del_mark_or_remove_sec (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798) at /data/src/10.2/storage/innobase/row/row0umod.cc:582 #12 0x0000555abd02df86 in row_undo_mod_upd_exist_sec (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1063 #13 0x0000555abd02e63e in row_undo_mod (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1260 #14 0x0000555abce3e324 in row_undo (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:304 #15 0x0000555abce3e472 in row_undo_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:352 #16 0x0000555abcda1679 in que_thr_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1047 #17 0x0000555abcda1893 in que_run_threads_low (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1111 #18 0x0000555abcda1a3c in que_run_threads (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1151 #19 0x0000555abce9f233 in trx_rollback_to_savepoint_low (trx=0x7faee0b567e8, savept=0x0) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:112 #20 0x0000555abce9f59d in trx_rollback_for_mysql_low (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:174 #21 0x0000555abce9f87b in trx_rollback_for_mysql (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:202 #22 0x0000555abccb023f in innobase_rollback (hton=0x555abf7542a0, thd=0x7fae78000b00, rollback_trx=true) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:4810 #23 0x0000555abc9a4449 in ha_rollback_trans (thd=0x7fae78000b00, all=true) at /data/src/10.2/sql/handler.cc:1672 #24 0x0000555abc88e299 in trans_rollback (thd=0x7fae78000b00) at /data/src/10.2/sql/transaction.cc:415 #25 0x0000555abc736a08 in mysql_execute_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:5610 #26 0x0000555abc73d496 in mysql_parse (thd=0x7fae78000b00, rawbuf=0x7fae78013288 "ROLLBACK /* QNO 3689 CON_ID 12 */", length=33, parser_state=0x7faef41c4250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7924 #27 0x0000555abc72b32b in dispatch_command (command=COM_QUERY, thd=0x7fae78000b00, packet=0x7fae78008851 "ROLLBACK /* QNO 3689 CON_ID 12 */ ", packet_length=34, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1820 #28 0x0000555abc729c8e in do_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:1374 #29 0x0000555abc878694 in do_handle_one_connection (connect=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1335 #30 0x0000555abc878421 in handle_one_connection (arg=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1241 #31 0x00007faef81e4494 in start_thread (arg=0x7faef41c5700) at pthread_create.c:333 #32 0x00007faef65ca93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} All threads for both servers are attached. To reproduce: {noformat} git clone https://github.com/elenst/rqg --branch=mdev15374 rqg-mdev15374 cd rqg-mdev15374 {noformat} Further, if you want the test to start the server (on port 19300 by default), run the test and then stop the server if it doesn't crash before: {noformat} perl ./runall-new.pl --duration=350 --threads=1 --grammar=./mdev15374.yy --skip-gendata --vardir=/dev/shm/vardir {noformat} Or, if you already have the server running, e.g. on port 3306, then {noformat} perl ./gentest.pl --duration=350 --threads=1 --queries=100M --grammar=./mdev15374.yy --dsn="dbi:mysql:user=root:host=127.0.0.1:port=3306:database=test" {noformat} If you are running the test on 10.3, it is expected to crash very fast. If you are running it on 10.2, check the processlist, as soon as it starts saying something like {noformat} +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 | | 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 | | 16 | root | localhost:54026 | test | Query | 75 | init | ROLLBACK /* QNO 26430 CON_ID 16 */ | 0.000 | | 17 | root | localhost:53639 | NULL | Query | 0 | init | show processlist | 0.000 | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ {noformat} you have hit the problem. The test will eventually abort and complain, but it will take long time, because it optimistically waits for the server to wake up, while in this case the failure, when it happens, happens very fast. For the reference, here is the grammar: {noformat} query_init: CREATE TEMPORARY TABLE t1 (a INT, key (a)); INSERT INTO t1 VALUES (1),(2) ; CREATE TEMPORARY TABLE t2 (a INT, key (a)); INSERT INTO t2 VALUES (1),(2) ; query: transaction | UPDATE table_name SET a = _digit | ; table_name: t1 | t2 ; transaction: START TRANSACTION | ROLLBACK ; {noformat} |
The RQG test provided below represents simple non-concurrent one-thread flow consisting of updates on temporary InnoDB tables, followed by rollbacks. Very soon (for me it happens within the first minute of the test) one of ROLLBACKs causes an assertion failure on 10.3 or hangs on 10.2. For 10.3, even one table is enough, 10.2 seems to need two tables, so the grammar has two tables.
10.1 does not hang or crash. {noformat:title=10.3 fa68b88b5d415} mysqld: /data/src/10.3/storage/innobase/include/trx0rec.ic:68: trx_undo_rec_t* trx_undo_rec_copy(const trx_undo_rec_t*, mem_heap_t*): Assertion `len < ((ulint) srv_page_size)' failed. 180419 0:27:25 [ERROR] mysqld got signal 6 ; #7 0x00007f3211effee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000055bb77d5623e in trx_undo_rec_copy (undo_rec=0x7f31f072f041 "", heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/include/trx0rec.ic:68 #9 0x000055bb77d5d45b in trx_undo_get_undo_rec_low (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #10 0x000055bb77d5d54b in trx_undo_get_undo_rec (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90, trx_id=5480, name=..., undo_rec=0x7f3210185be0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #11 0x000055bb77d5d82c in trx_undo_prev_version_build (index_rec=0x7f31f052809b "", index_mtr=0x7f3210186520, rec=0x7f31a04e0b8e "", index=0x7f31a02a4f78, offsets=0x7f31a04e0bf0, heap=0x7f31a04e0e90, old_vers=0x7f3210185cd0, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #12 0x000055bb77d14702 in row_vers_old_has_index_entry (also_curr=0, rec=0x7f31f052809b "", mtr=0x7f3210186520, index=0x7f31a02a4ad8, ientry=0x7f31a04e05f8, roll_ptr=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:987 #13 0x000055bb77f03e4b in row_undo_mod_del_mark_or_remove_sec_low (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8, mode=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:544 #14 0x000055bb77f041a1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8) at /data/src/10.3/storage/innobase/row/row0umod.cc:616 #15 0x000055bb77f055f1 in row_undo_mod_upd_exist_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1096 #16 0x000055bb77f05edd in row_undo_mod (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1314 #17 0x000055bb77cfe36f in row_undo (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #18 0x000055bb77cfe551 in row_undo_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #19 0x000055bb77c4f65a in que_thr_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #20 0x000055bb77c4f8a9 in que_run_threads_low (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #21 0x000055bb77c4fa9a in que_run_threads (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #22 0x000055bb77d5ff2e in trx_rollback_to_savepoint_low (trx=0x7f3210268828, savept=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #23 0x000055bb77d6039c in trx_rollback_for_mysql_low (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #24 0x000055bb77d606db in trx_rollback_for_mysql (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:240 #25 0x000055bb77b497c3 in innobase_rollback (hton=0x55bb7af9c420, thd=0x7f31a0000b00, rollback_trx=true) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4632 #26 0x000055bb77834907 in ha_rollback_trans (thd=0x7f31a0000b00, all=true) at /data/src/10.3/sql/handler.cc:1721 #27 0x000055bb776c147d in trans_rollback (thd=0x7f31a0000b00) at /data/src/10.3/sql/transaction.cc:422 #28 0x000055bb77558739 in mysql_execute_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:5829 #29 0x000055bb7755eb06 in mysql_parse (thd=0x7f31a0000b00, rawbuf=0x7f31a0015ae8 "ROLLBACK /* QNO 22863 CON_ID 12 */", length=34, parser_state=0x7f3210188620, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8001 #30 0x000055bb7754c2e9 in dispatch_command (command=COM_QUERY, thd=0x7f31a0000b00, packet=0x7f31a04009c1 "ROLLBACK /* QNO 22863 CON_ID 12 */ ", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1846 #31 0x000055bb7754ad28 in do_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:1391 #32 0x000055bb776ad791 in do_handle_one_connection (connect=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1402 #33 0x000055bb776ad51e in handle_one_connection (arg=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1308 #34 0x00007f3213bd6494 in start_thread (arg=0x7f3210189700) at pthread_create.c:333 #35 0x00007f3211fbc93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} {noformat:title=10.2 66c14d3a8d31e while hanging} Thread 3 (Thread 0x7faef41c5700 (LWP 32647)): #0 GenericPolicy<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538878 <rw_lock_debug_mutex+56>, mutex=..., filename=0x555abd3a9670 "/data/src/10.2/storage/innobase/sync/sync0debug.cc" , line=1268) at /data/src/10.2/storage/innobase/include/sync0policy.h:349 #1 0x0000555abcd6d6b9 in PolicyMutex<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538840 <rw_lock_debug_mutex>, n_spins=30, n_delay=6, name=0x555abd3a9670 "/data/src/10.2/storage/inn obase/sync/sync0debug.cc", line=1268) at /data/src/10.2/storage/innobase/include/ib0mutex.h:635 #2 0x0000555abce74aa8 in rw_lock_debug_mutex_enter () at /data/src/10.2/storage/innobase/sync/sync0debug.cc:1268 #3 0x0000555abce6cc41 in rw_lock_own (lock=0x555abfef9780, lock_type=4) at /data/src/10.2/storage/innobase/sync/sync0rw.cc:1029 #4 0x0000555abcf2401c in buf_page_get_gen (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, file=0x555abd3b2ed0 "/data/src/10.2/storage/innobase/include/trx0undo.ic", line=180, mtr=0x7faef41c1380, err=0x0) at /data/src/10.2/storage/innobase/buf/buf0buf.cc:4829 #5 0x0000555abce972b2 in trx_undo_page_get_s_latched (page_id=..., mtr=0x7faef41c1380) at /data/src/10.2/storage/innobase/include/trx0undo.ic:179 #6 0x0000555abce9c364 in trx_undo_get_undo_rec_low (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2120 #7 0x0000555abce9c486 in trx_undo_get_undo_rec (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030, trx_id=2572, name=..., undo_rec=0x7faef41c1950) at /data/src/10.2/storage/inno base/trx/trx0rec.cc:2158 #8 0x0000555abce9c6db in trx_undo_prev_version_build (index_rec=0x7faed44fc09b "", index_mtr=0x7faef41c22a0, rec=0x7fae78057d26 "", index=0x7fae78048798, offsets=0x7fae78057d88, heap=0x7fa e78058030, old_vers=0x7faef41c1a40, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2244 #9 0x0000555abce53ad2 in row_vers_old_has_index_entry (also_curr=0, rec=0x7faed44fc09b "", mtr=0x7faef41c22a0, index=0x7fae78048368, ientry=0x7fae78057798, roll_ptr=0, trx_id=0) at /data/src/10.2/storage/innobase/row/row0vers.cc:999 #10 0x0000555abd02c8e9 in row_undo_mod_del_mark_or_remove_sec_low (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798, mode=2) at /data/src/10.2/storage/innobase/row/row0umod.cc:510 #11 0x0000555abd02cc02 in row_undo_mod_del_mark_or_remove_sec (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798) at /data/src/10.2/storage/innobase/row/row0umod.cc:582 #12 0x0000555abd02df86 in row_undo_mod_upd_exist_sec (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1063 #13 0x0000555abd02e63e in row_undo_mod (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1260 #14 0x0000555abce3e324 in row_undo (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:304 #15 0x0000555abce3e472 in row_undo_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:352 #16 0x0000555abcda1679 in que_thr_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1047 #17 0x0000555abcda1893 in que_run_threads_low (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1111 #18 0x0000555abcda1a3c in que_run_threads (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1151 #19 0x0000555abce9f233 in trx_rollback_to_savepoint_low (trx=0x7faee0b567e8, savept=0x0) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:112 #20 0x0000555abce9f59d in trx_rollback_for_mysql_low (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:174 #21 0x0000555abce9f87b in trx_rollback_for_mysql (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:202 #22 0x0000555abccb023f in innobase_rollback (hton=0x555abf7542a0, thd=0x7fae78000b00, rollback_trx=true) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:4810 #23 0x0000555abc9a4449 in ha_rollback_trans (thd=0x7fae78000b00, all=true) at /data/src/10.2/sql/handler.cc:1672 #24 0x0000555abc88e299 in trans_rollback (thd=0x7fae78000b00) at /data/src/10.2/sql/transaction.cc:415 #25 0x0000555abc736a08 in mysql_execute_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:5610 #26 0x0000555abc73d496 in mysql_parse (thd=0x7fae78000b00, rawbuf=0x7fae78013288 "ROLLBACK /* QNO 3689 CON_ID 12 */", length=33, parser_state=0x7faef41c4250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7924 #27 0x0000555abc72b32b in dispatch_command (command=COM_QUERY, thd=0x7fae78000b00, packet=0x7fae78008851 "ROLLBACK /* QNO 3689 CON_ID 12 */ ", packet_length=34, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1820 #28 0x0000555abc729c8e in do_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:1374 #29 0x0000555abc878694 in do_handle_one_connection (connect=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1335 #30 0x0000555abc878421 in handle_one_connection (arg=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1241 #31 0x00007faef81e4494 in start_thread (arg=0x7faef41c5700) at pthread_create.c:333 #32 0x00007faef65ca93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} All threads for both servers are attached. To reproduce: {noformat} git clone https://github.com/elenst/rqg --branch=mdev15374 rqg-mdev15374 cd rqg-mdev15374 {noformat} Further, if you want the test to start the server (on port 19300 by default), run the test and then stop the server if it doesn't crash before: {noformat} perl ./runall-new.pl --duration=350 --threads=1 --grammar=./mdev15374.yy --skip-gendata --vardir=/dev/shm/vardir {noformat} Or, if you already have the server running, e.g. on port 3306, then {noformat} perl ./gentest.pl --duration=350 --threads=1 --queries=100M --grammar=./mdev15374.yy --dsn="dbi:mysql:user=root:host=127.0.0.1:port=3306:database=test" {noformat} If you are running the test on 10.3, it is expected to crash very fast. If you are running it on 10.2, check the processlist, as soon as it starts saying something like {noformat} +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 | | 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 | | 16 | root | localhost:54026 | test | Query | 75 | init | ROLLBACK /* QNO 26430 CON_ID 16 */ | 0.000 | | 17 | root | localhost:53639 | NULL | Query | 0 | init | show processlist | 0.000 | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ {noformat} you have hit the problem. The test will eventually abort and complain, but it will take long time, because it optimistically waits for the server to wake up, while in this case the failure, when it happens, happens very fast. In case you don't want to clone the dedicated RQG tree, here is the grammar: {noformat} query_init: CREATE TEMPORARY TABLE t1 (a INT, key (a)); INSERT INTO t1 VALUES (1),(2) ; CREATE TEMPORARY TABLE t2 (a INT, key (a)); INSERT INTO t2 VALUES (1),(2) ; query: transaction | UPDATE table_name SET a = _digit | ; table_name: t1 | t2 ; transaction: START TRANSACTION | ROLLBACK ; {noformat} More stack traces for the reference: {noformat:title=10.3 non-debug 560743198604caf} #2 <signal handler called> #3 0x00007f4bff883f0f in __memmove_avx_unaligned_erms () from /lib/x86_64-linux-gnu/libc.so.6 #4 0x000055819f3b2726 in memcpy (__len=18446744073709539341, __src=0x7f4bd8706ff3, __dest=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string3.h:53 #5 mem_heap_dup (len=18446744073709539341, data=0x7f4bd8706ff3, heap=0x7f4b9402d040) at /data/src/10.3/storage/innobase/include/mem0mem.h:306 #6 trx_undo_rec_copy (heap=0x7f4b9402d040, undo_rec=0x7f4bd8706ff3 <error: Cannot access memory at address 0x7f4bd8706ff3>) at /data/src/10.3/storage/innobase/include/trx0rec.ic:70 #7 trx_undo_get_undo_rec_low (roll_ptr=<optimized out>, is_temp=<optimized out>, heap=0x7f4b9402d040) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #8 0x000055819f3b2ad1 in trx_undo_get_undo_rec (undo_rec=<optimized out>, name=..., trx_id=<optimized out>, heap=<optimized out>, is_temp=<optimized out>, roll_ptr=<optimized out>) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #9 trx_undo_prev_version_build (index_rec=0x7f4a8f91c020 "", index_rec@entry=0x7f4bd851009b <error: Cannot access memory at address 0x7f4bd851009b>, index_mtr=0x7f4be0020f93, index_mtr@entry=0x7f4bf117cf80, rec=0x7f4b9402cd36 "", index=0x7f4b9416c2a0, offsets=0xffffffffffffffe0, offsets@entry=0x7f4b9402cd50, heap=0x0, old_vers=0x7f4bf117c760, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #10 0x000055819f385ca2 in row_vers_old_has_index_entry (also_curr=also_curr@entry=0, rec=0x7f4bd851009b <error: Cannot access memory at address 0x7f4bd851009b>, mtr=mtr@entry=0x7f4bf117cf80, index=index@entry=0x7f4b9416cc10, ientry=ientry@entry=0x7f4b9402c7b0, roll_ptr=roll_ptr@entry=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:1010 #11 0x000055819f4d2889 in row_undo_mod_del_mark_or_remove_sec_low (node=node@entry=0x7f4b9402bef0, thr=thr@entry=0x7f4b94025328, index=index@entry=0x7f4b9416cc10, entry=entry@entry=0x7f4b9402c7b0, mode=mode@entry=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:510 #12 0x000055819f4d30c1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f4b9402bef0, thr=0x7f4b94025328, index=0x7f4b9416cc10, entry=0x7f4b9402c7b0) at /data/src/10.3/storage/innobase/row/row0umod.cc:582 #13 0x000055819f4d3a50 in row_undo_mod_upd_exist_sec (thr=<optimized out>, node=<optimized out>) at /data/src/10.3/storage/innobase/row/row0umod.cc:1062 #14 row_undo_mod (node=0x7f4b9402bef0, thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/row/row0umod.cc:1280 #15 0x000055819f37b835 in row_undo (thr=0x7f4b94025328, node=0x7f4b9402bef0) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #16 row_undo_step (thr=thr@entry=0x7f4b94025328) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #17 0x000055819f3254bf in que_thr_step (thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #18 que_run_threads_low (thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #19 que_run_threads (thr=<optimized out>) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #20 0x000055819f3ba6b8 in trx_rollback_to_savepoint_low (trx=trx@entry=0x7f4bf32156e8, savept=savept@entry=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #21 0x000055819f3bac88 in trx_rollback_for_mysql_low (trx=0x7f4bf32156e8) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #22 trx_rollback_for_mysql (trx=trx@entry=0x7f4bf32156e8) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:290 #23 0x000055819f2966e8 in innobase_rollback (hton=<optimized out>, thd=0x7f4b940009a8, rollback_trx=<optimized out>) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4628 #24 0x000055819f09a491 in ha_rollback_trans (thd=thd@entry=0x7f4b940009a8, all=all@entry=true) at /data/src/10.3/sql/handler.cc:1721 #25 0x000055819efb15b4 in trans_rollback (thd=0x7f4b940009a8) at /data/src/10.3/sql/transaction.cc:422 #26 0x000055819eecf522 in mysql_execute_command (thd=0x7f4b940009a8) at /data/src/10.3/sql/sql_parse.cc:5829 #27 0x000055819eed5c2d in mysql_parse (thd=0x7f4b940009a8, rawbuf=<optimized out>, length=34, parser_state=0x7f4bf117f630, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:8001 #28 0x000055819eed853f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f4b940009a8, packet=packet@entry=0x7f4b94009319 "ROLLBACK /* QNO 16481 CON_ID 12 */ ", packet_length=packet_length@entry=35, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1846 #29 0x000055819eed8db6 in do_command (thd=0x7f4b940009a8) at /data/src/10.3/sql/sql_parse.cc:1391 #30 0x000055819efa5454 in do_handle_one_connection (connect=connect@entry=0x5581a1b58dc8) at /data/src/10.3/sql/sql_connect.cc:1402 #31 0x000055819efa55f4 in handle_one_connection (arg=0x5581a1b58dc8) at /data/src/10.3/sql/sql_connect.cc:1308 #32 0x00007f4c0145d494 in start_thread (arg=0x7f4bf1180700) at pthread_create.c:333 #33 0x00007f4bff84393f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} |
Description |
The RQG test provided below represents simple non-concurrent one-thread flow consisting of updates on temporary InnoDB tables, followed by rollbacks. Very soon (for me it happens within the first minute of the test) one of ROLLBACKs causes an assertion failure on 10.3 or hangs on 10.2. For 10.3, even one table is enough, 10.2 seems to need two tables, so the grammar has two tables.
10.1 does not hang or crash. {noformat:title=10.3 fa68b88b5d415} mysqld: /data/src/10.3/storage/innobase/include/trx0rec.ic:68: trx_undo_rec_t* trx_undo_rec_copy(const trx_undo_rec_t*, mem_heap_t*): Assertion `len < ((ulint) srv_page_size)' failed. 180419 0:27:25 [ERROR] mysqld got signal 6 ; #7 0x00007f3211effee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000055bb77d5623e in trx_undo_rec_copy (undo_rec=0x7f31f072f041 "", heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/include/trx0rec.ic:68 #9 0x000055bb77d5d45b in trx_undo_get_undo_rec_low (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #10 0x000055bb77d5d54b in trx_undo_get_undo_rec (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90, trx_id=5480, name=..., undo_rec=0x7f3210185be0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #11 0x000055bb77d5d82c in trx_undo_prev_version_build (index_rec=0x7f31f052809b "", index_mtr=0x7f3210186520, rec=0x7f31a04e0b8e "", index=0x7f31a02a4f78, offsets=0x7f31a04e0bf0, heap=0x7f31a04e0e90, old_vers=0x7f3210185cd0, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #12 0x000055bb77d14702 in row_vers_old_has_index_entry (also_curr=0, rec=0x7f31f052809b "", mtr=0x7f3210186520, index=0x7f31a02a4ad8, ientry=0x7f31a04e05f8, roll_ptr=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:987 #13 0x000055bb77f03e4b in row_undo_mod_del_mark_or_remove_sec_low (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8, mode=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:544 #14 0x000055bb77f041a1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8) at /data/src/10.3/storage/innobase/row/row0umod.cc:616 #15 0x000055bb77f055f1 in row_undo_mod_upd_exist_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1096 #16 0x000055bb77f05edd in row_undo_mod (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1314 #17 0x000055bb77cfe36f in row_undo (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #18 0x000055bb77cfe551 in row_undo_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #19 0x000055bb77c4f65a in que_thr_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #20 0x000055bb77c4f8a9 in que_run_threads_low (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #21 0x000055bb77c4fa9a in que_run_threads (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #22 0x000055bb77d5ff2e in trx_rollback_to_savepoint_low (trx=0x7f3210268828, savept=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #23 0x000055bb77d6039c in trx_rollback_for_mysql_low (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #24 0x000055bb77d606db in trx_rollback_for_mysql (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:240 #25 0x000055bb77b497c3 in innobase_rollback (hton=0x55bb7af9c420, thd=0x7f31a0000b00, rollback_trx=true) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4632 #26 0x000055bb77834907 in ha_rollback_trans (thd=0x7f31a0000b00, all=true) at /data/src/10.3/sql/handler.cc:1721 #27 0x000055bb776c147d in trans_rollback (thd=0x7f31a0000b00) at /data/src/10.3/sql/transaction.cc:422 #28 0x000055bb77558739 in mysql_execute_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:5829 #29 0x000055bb7755eb06 in mysql_parse (thd=0x7f31a0000b00, rawbuf=0x7f31a0015ae8 "ROLLBACK /* QNO 22863 CON_ID 12 */", length=34, parser_state=0x7f3210188620, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8001 #30 0x000055bb7754c2e9 in dispatch_command (command=COM_QUERY, thd=0x7f31a0000b00, packet=0x7f31a04009c1 "ROLLBACK /* QNO 22863 CON_ID 12 */ ", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1846 #31 0x000055bb7754ad28 in do_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:1391 #32 0x000055bb776ad791 in do_handle_one_connection (connect=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1402 #33 0x000055bb776ad51e in handle_one_connection (arg=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1308 #34 0x00007f3213bd6494 in start_thread (arg=0x7f3210189700) at pthread_create.c:333 #35 0x00007f3211fbc93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} {noformat:title=10.2 66c14d3a8d31e while hanging} Thread 3 (Thread 0x7faef41c5700 (LWP 32647)): #0 GenericPolicy<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538878 <rw_lock_debug_mutex+56>, mutex=..., filename=0x555abd3a9670 "/data/src/10.2/storage/innobase/sync/sync0debug.cc" , line=1268) at /data/src/10.2/storage/innobase/include/sync0policy.h:349 #1 0x0000555abcd6d6b9 in PolicyMutex<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538840 <rw_lock_debug_mutex>, n_spins=30, n_delay=6, name=0x555abd3a9670 "/data/src/10.2/storage/inn obase/sync/sync0debug.cc", line=1268) at /data/src/10.2/storage/innobase/include/ib0mutex.h:635 #2 0x0000555abce74aa8 in rw_lock_debug_mutex_enter () at /data/src/10.2/storage/innobase/sync/sync0debug.cc:1268 #3 0x0000555abce6cc41 in rw_lock_own (lock=0x555abfef9780, lock_type=4) at /data/src/10.2/storage/innobase/sync/sync0rw.cc:1029 #4 0x0000555abcf2401c in buf_page_get_gen (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, file=0x555abd3b2ed0 "/data/src/10.2/storage/innobase/include/trx0undo.ic", line=180, mtr=0x7faef41c1380, err=0x0) at /data/src/10.2/storage/innobase/buf/buf0buf.cc:4829 #5 0x0000555abce972b2 in trx_undo_page_get_s_latched (page_id=..., mtr=0x7faef41c1380) at /data/src/10.2/storage/innobase/include/trx0undo.ic:179 #6 0x0000555abce9c364 in trx_undo_get_undo_rec_low (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2120 #7 0x0000555abce9c486 in trx_undo_get_undo_rec (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030, trx_id=2572, name=..., undo_rec=0x7faef41c1950) at /data/src/10.2/storage/inno base/trx/trx0rec.cc:2158 #8 0x0000555abce9c6db in trx_undo_prev_version_build (index_rec=0x7faed44fc09b "", index_mtr=0x7faef41c22a0, rec=0x7fae78057d26 "", index=0x7fae78048798, offsets=0x7fae78057d88, heap=0x7fa e78058030, old_vers=0x7faef41c1a40, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2244 #9 0x0000555abce53ad2 in row_vers_old_has_index_entry (also_curr=0, rec=0x7faed44fc09b "", mtr=0x7faef41c22a0, index=0x7fae78048368, ientry=0x7fae78057798, roll_ptr=0, trx_id=0) at /data/src/10.2/storage/innobase/row/row0vers.cc:999 #10 0x0000555abd02c8e9 in row_undo_mod_del_mark_or_remove_sec_low (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798, mode=2) at /data/src/10.2/storage/innobase/row/row0umod.cc:510 #11 0x0000555abd02cc02 in row_undo_mod_del_mark_or_remove_sec (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798) at /data/src/10.2/storage/innobase/row/row0umod.cc:582 #12 0x0000555abd02df86 in row_undo_mod_upd_exist_sec (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1063 #13 0x0000555abd02e63e in row_undo_mod (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1260 #14 0x0000555abce3e324 in row_undo (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:304 #15 0x0000555abce3e472 in row_undo_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:352 #16 0x0000555abcda1679 in que_thr_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1047 #17 0x0000555abcda1893 in que_run_threads_low (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1111 #18 0x0000555abcda1a3c in que_run_threads (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1151 #19 0x0000555abce9f233 in trx_rollback_to_savepoint_low (trx=0x7faee0b567e8, savept=0x0) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:112 #20 0x0000555abce9f59d in trx_rollback_for_mysql_low (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:174 #21 0x0000555abce9f87b in trx_rollback_for_mysql (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:202 #22 0x0000555abccb023f in innobase_rollback (hton=0x555abf7542a0, thd=0x7fae78000b00, rollback_trx=true) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:4810 #23 0x0000555abc9a4449 in ha_rollback_trans (thd=0x7fae78000b00, all=true) at /data/src/10.2/sql/handler.cc:1672 #24 0x0000555abc88e299 in trans_rollback (thd=0x7fae78000b00) at /data/src/10.2/sql/transaction.cc:415 #25 0x0000555abc736a08 in mysql_execute_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:5610 #26 0x0000555abc73d496 in mysql_parse (thd=0x7fae78000b00, rawbuf=0x7fae78013288 "ROLLBACK /* QNO 3689 CON_ID 12 */", length=33, parser_state=0x7faef41c4250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7924 #27 0x0000555abc72b32b in dispatch_command (command=COM_QUERY, thd=0x7fae78000b00, packet=0x7fae78008851 "ROLLBACK /* QNO 3689 CON_ID 12 */ ", packet_length=34, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1820 #28 0x0000555abc729c8e in do_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:1374 #29 0x0000555abc878694 in do_handle_one_connection (connect=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1335 #30 0x0000555abc878421 in handle_one_connection (arg=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1241 #31 0x00007faef81e4494 in start_thread (arg=0x7faef41c5700) at pthread_create.c:333 #32 0x00007faef65ca93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} All threads for both servers are attached. To reproduce: {noformat} git clone https://github.com/elenst/rqg --branch=mdev15374 rqg-mdev15374 cd rqg-mdev15374 {noformat} Further, if you want the test to start the server (on port 19300 by default), run the test and then stop the server if it doesn't crash before: {noformat} perl ./runall-new.pl --duration=350 --threads=1 --grammar=./mdev15374.yy --skip-gendata --vardir=/dev/shm/vardir {noformat} Or, if you already have the server running, e.g. on port 3306, then {noformat} perl ./gentest.pl --duration=350 --threads=1 --queries=100M --grammar=./mdev15374.yy --dsn="dbi:mysql:user=root:host=127.0.0.1:port=3306:database=test" {noformat} If you are running the test on 10.3, it is expected to crash very fast. If you are running it on 10.2, check the processlist, as soon as it starts saying something like {noformat} +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 | | 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 | | 16 | root | localhost:54026 | test | Query | 75 | init | ROLLBACK /* QNO 26430 CON_ID 16 */ | 0.000 | | 17 | root | localhost:53639 | NULL | Query | 0 | init | show processlist | 0.000 | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ {noformat} you have hit the problem. The test will eventually abort and complain, but it will take long time, because it optimistically waits for the server to wake up, while in this case the failure, when it happens, happens very fast. In case you don't want to clone the dedicated RQG tree, here is the grammar: {noformat} query_init: CREATE TEMPORARY TABLE t1 (a INT, key (a)); INSERT INTO t1 VALUES (1),(2) ; CREATE TEMPORARY TABLE t2 (a INT, key (a)); INSERT INTO t2 VALUES (1),(2) ; query: transaction | UPDATE table_name SET a = _digit | ; table_name: t1 | t2 ; transaction: START TRANSACTION | ROLLBACK ; {noformat} More stack traces for the reference: {noformat:title=10.3 non-debug 560743198604caf} #2 <signal handler called> #3 0x00007f4bff883f0f in __memmove_avx_unaligned_erms () from /lib/x86_64-linux-gnu/libc.so.6 #4 0x000055819f3b2726 in memcpy (__len=18446744073709539341, __src=0x7f4bd8706ff3, __dest=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string3.h:53 #5 mem_heap_dup (len=18446744073709539341, data=0x7f4bd8706ff3, heap=0x7f4b9402d040) at /data/src/10.3/storage/innobase/include/mem0mem.h:306 #6 trx_undo_rec_copy (heap=0x7f4b9402d040, undo_rec=0x7f4bd8706ff3 <error: Cannot access memory at address 0x7f4bd8706ff3>) at /data/src/10.3/storage/innobase/include/trx0rec.ic:70 #7 trx_undo_get_undo_rec_low (roll_ptr=<optimized out>, is_temp=<optimized out>, heap=0x7f4b9402d040) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #8 0x000055819f3b2ad1 in trx_undo_get_undo_rec (undo_rec=<optimized out>, name=..., trx_id=<optimized out>, heap=<optimized out>, is_temp=<optimized out>, roll_ptr=<optimized out>) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #9 trx_undo_prev_version_build (index_rec=0x7f4a8f91c020 "", index_rec@entry=0x7f4bd851009b <error: Cannot access memory at address 0x7f4bd851009b>, index_mtr=0x7f4be0020f93, index_mtr@entry=0x7f4bf117cf80, rec=0x7f4b9402cd36 "", index=0x7f4b9416c2a0, offsets=0xffffffffffffffe0, offsets@entry=0x7f4b9402cd50, heap=0x0, old_vers=0x7f4bf117c760, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #10 0x000055819f385ca2 in row_vers_old_has_index_entry (also_curr=also_curr@entry=0, rec=0x7f4bd851009b <error: Cannot access memory at address 0x7f4bd851009b>, mtr=mtr@entry=0x7f4bf117cf80, index=index@entry=0x7f4b9416cc10, ientry=ientry@entry=0x7f4b9402c7b0, roll_ptr=roll_ptr@entry=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:1010 #11 0x000055819f4d2889 in row_undo_mod_del_mark_or_remove_sec_low (node=node@entry=0x7f4b9402bef0, thr=thr@entry=0x7f4b94025328, index=index@entry=0x7f4b9416cc10, entry=entry@entry=0x7f4b9402c7b0, mode=mode@entry=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:510 #12 0x000055819f4d30c1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f4b9402bef0, thr=0x7f4b94025328, index=0x7f4b9416cc10, entry=0x7f4b9402c7b0) at /data/src/10.3/storage/innobase/row/row0umod.cc:582 #13 0x000055819f4d3a50 in row_undo_mod_upd_exist_sec (thr=<optimized out>, node=<optimized out>) at /data/src/10.3/storage/innobase/row/row0umod.cc:1062 #14 row_undo_mod (node=0x7f4b9402bef0, thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/row/row0umod.cc:1280 #15 0x000055819f37b835 in row_undo (thr=0x7f4b94025328, node=0x7f4b9402bef0) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #16 row_undo_step (thr=thr@entry=0x7f4b94025328) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #17 0x000055819f3254bf in que_thr_step (thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #18 que_run_threads_low (thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #19 que_run_threads (thr=<optimized out>) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #20 0x000055819f3ba6b8 in trx_rollback_to_savepoint_low (trx=trx@entry=0x7f4bf32156e8, savept=savept@entry=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #21 0x000055819f3bac88 in trx_rollback_for_mysql_low (trx=0x7f4bf32156e8) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #22 trx_rollback_for_mysql (trx=trx@entry=0x7f4bf32156e8) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:290 #23 0x000055819f2966e8 in innobase_rollback (hton=<optimized out>, thd=0x7f4b940009a8, rollback_trx=<optimized out>) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4628 #24 0x000055819f09a491 in ha_rollback_trans (thd=thd@entry=0x7f4b940009a8, all=all@entry=true) at /data/src/10.3/sql/handler.cc:1721 #25 0x000055819efb15b4 in trans_rollback (thd=0x7f4b940009a8) at /data/src/10.3/sql/transaction.cc:422 #26 0x000055819eecf522 in mysql_execute_command (thd=0x7f4b940009a8) at /data/src/10.3/sql/sql_parse.cc:5829 #27 0x000055819eed5c2d in mysql_parse (thd=0x7f4b940009a8, rawbuf=<optimized out>, length=34, parser_state=0x7f4bf117f630, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:8001 #28 0x000055819eed853f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f4b940009a8, packet=packet@entry=0x7f4b94009319 "ROLLBACK /* QNO 16481 CON_ID 12 */ ", packet_length=packet_length@entry=35, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1846 #29 0x000055819eed8db6 in do_command (thd=0x7f4b940009a8) at /data/src/10.3/sql/sql_parse.cc:1391 #30 0x000055819efa5454 in do_handle_one_connection (connect=connect@entry=0x5581a1b58dc8) at /data/src/10.3/sql/sql_connect.cc:1402 #31 0x000055819efa55f4 in handle_one_connection (arg=0x5581a1b58dc8) at /data/src/10.3/sql/sql_connect.cc:1308 #32 0x00007f4c0145d494 in start_thread (arg=0x7f4bf1180700) at pthread_create.c:333 #33 0x00007f4bff84393f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} |
The RQG test provided below represents simple non-concurrent one-thread flow consisting of updates on temporary InnoDB tables, followed by rollbacks. Very soon (for me it happens within the first minute of the test) one of ROLLBACKs causes an assertion failure on 10.3 or hangs on 10.2. For 10.3, even one table is enough, 10.2 seems to need two tables, so the grammar has two tables.
10.1 does not hang or crash. {noformat:title=10.3 fa68b88b5d415} mysqld: /data/src/10.3/storage/innobase/include/trx0rec.ic:68: trx_undo_rec_t* trx_undo_rec_copy(const trx_undo_rec_t*, mem_heap_t*): Assertion `len < ((ulint) srv_page_size)' failed. 180419 0:27:25 [ERROR] mysqld got signal 6 ; #7 0x00007f3211effee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000055bb77d5623e in trx_undo_rec_copy (undo_rec=0x7f31f072f041 "", heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/include/trx0rec.ic:68 #9 0x000055bb77d5d45b in trx_undo_get_undo_rec_low (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #10 0x000055bb77d5d54b in trx_undo_get_undo_rec (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90, trx_id=5480, name=..., undo_rec=0x7f3210185be0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #11 0x000055bb77d5d82c in trx_undo_prev_version_build (index_rec=0x7f31f052809b "", index_mtr=0x7f3210186520, rec=0x7f31a04e0b8e "", index=0x7f31a02a4f78, offsets=0x7f31a04e0bf0, heap=0x7f31a04e0e90, old_vers=0x7f3210185cd0, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #12 0x000055bb77d14702 in row_vers_old_has_index_entry (also_curr=0, rec=0x7f31f052809b "", mtr=0x7f3210186520, index=0x7f31a02a4ad8, ientry=0x7f31a04e05f8, roll_ptr=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:987 #13 0x000055bb77f03e4b in row_undo_mod_del_mark_or_remove_sec_low (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8, mode=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:544 #14 0x000055bb77f041a1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8) at /data/src/10.3/storage/innobase/row/row0umod.cc:616 #15 0x000055bb77f055f1 in row_undo_mod_upd_exist_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1096 #16 0x000055bb77f05edd in row_undo_mod (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1314 #17 0x000055bb77cfe36f in row_undo (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #18 0x000055bb77cfe551 in row_undo_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #19 0x000055bb77c4f65a in que_thr_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #20 0x000055bb77c4f8a9 in que_run_threads_low (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #21 0x000055bb77c4fa9a in que_run_threads (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #22 0x000055bb77d5ff2e in trx_rollback_to_savepoint_low (trx=0x7f3210268828, savept=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #23 0x000055bb77d6039c in trx_rollback_for_mysql_low (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #24 0x000055bb77d606db in trx_rollback_for_mysql (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:240 #25 0x000055bb77b497c3 in innobase_rollback (hton=0x55bb7af9c420, thd=0x7f31a0000b00, rollback_trx=true) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4632 #26 0x000055bb77834907 in ha_rollback_trans (thd=0x7f31a0000b00, all=true) at /data/src/10.3/sql/handler.cc:1721 #27 0x000055bb776c147d in trans_rollback (thd=0x7f31a0000b00) at /data/src/10.3/sql/transaction.cc:422 #28 0x000055bb77558739 in mysql_execute_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:5829 #29 0x000055bb7755eb06 in mysql_parse (thd=0x7f31a0000b00, rawbuf=0x7f31a0015ae8 "ROLLBACK /* QNO 22863 CON_ID 12 */", length=34, parser_state=0x7f3210188620, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8001 #30 0x000055bb7754c2e9 in dispatch_command (command=COM_QUERY, thd=0x7f31a0000b00, packet=0x7f31a04009c1 "ROLLBACK /* QNO 22863 CON_ID 12 */ ", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1846 #31 0x000055bb7754ad28 in do_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:1391 #32 0x000055bb776ad791 in do_handle_one_connection (connect=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1402 #33 0x000055bb776ad51e in handle_one_connection (arg=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1308 #34 0x00007f3213bd6494 in start_thread (arg=0x7f3210189700) at pthread_create.c:333 #35 0x00007f3211fbc93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} {noformat:title=10.2 66c14d3a8d31e while hanging} Thread 3 (Thread 0x7faef41c5700 (LWP 32647)): #0 GenericPolicy<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538878 <rw_lock_debug_mutex+56>, mutex=..., filename=0x555abd3a9670 "/data/src/10.2/storage/innobase/sync/sync0debug.cc" , line=1268) at /data/src/10.2/storage/innobase/include/sync0policy.h:349 #1 0x0000555abcd6d6b9 in PolicyMutex<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538840 <rw_lock_debug_mutex>, n_spins=30, n_delay=6, name=0x555abd3a9670 "/data/src/10.2/storage/inn obase/sync/sync0debug.cc", line=1268) at /data/src/10.2/storage/innobase/include/ib0mutex.h:635 #2 0x0000555abce74aa8 in rw_lock_debug_mutex_enter () at /data/src/10.2/storage/innobase/sync/sync0debug.cc:1268 #3 0x0000555abce6cc41 in rw_lock_own (lock=0x555abfef9780, lock_type=4) at /data/src/10.2/storage/innobase/sync/sync0rw.cc:1029 #4 0x0000555abcf2401c in buf_page_get_gen (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, file=0x555abd3b2ed0 "/data/src/10.2/storage/innobase/include/trx0undo.ic", line=180, mtr=0x7faef41c1380, err=0x0) at /data/src/10.2/storage/innobase/buf/buf0buf.cc:4829 #5 0x0000555abce972b2 in trx_undo_page_get_s_latched (page_id=..., mtr=0x7faef41c1380) at /data/src/10.2/storage/innobase/include/trx0undo.ic:179 #6 0x0000555abce9c364 in trx_undo_get_undo_rec_low (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2120 #7 0x0000555abce9c486 in trx_undo_get_undo_rec (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030, trx_id=2572, name=..., undo_rec=0x7faef41c1950) at /data/src/10.2/storage/inno base/trx/trx0rec.cc:2158 #8 0x0000555abce9c6db in trx_undo_prev_version_build (index_rec=0x7faed44fc09b "", index_mtr=0x7faef41c22a0, rec=0x7fae78057d26 "", index=0x7fae78048798, offsets=0x7fae78057d88, heap=0x7fa e78058030, old_vers=0x7faef41c1a40, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2244 #9 0x0000555abce53ad2 in row_vers_old_has_index_entry (also_curr=0, rec=0x7faed44fc09b "", mtr=0x7faef41c22a0, index=0x7fae78048368, ientry=0x7fae78057798, roll_ptr=0, trx_id=0) at /data/src/10.2/storage/innobase/row/row0vers.cc:999 #10 0x0000555abd02c8e9 in row_undo_mod_del_mark_or_remove_sec_low (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798, mode=2) at /data/src/10.2/storage/innobase/row/row0umod.cc:510 #11 0x0000555abd02cc02 in row_undo_mod_del_mark_or_remove_sec (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798) at /data/src/10.2/storage/innobase/row/row0umod.cc:582 #12 0x0000555abd02df86 in row_undo_mod_upd_exist_sec (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1063 #13 0x0000555abd02e63e in row_undo_mod (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1260 #14 0x0000555abce3e324 in row_undo (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:304 #15 0x0000555abce3e472 in row_undo_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:352 #16 0x0000555abcda1679 in que_thr_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1047 #17 0x0000555abcda1893 in que_run_threads_low (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1111 #18 0x0000555abcda1a3c in que_run_threads (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1151 #19 0x0000555abce9f233 in trx_rollback_to_savepoint_low (trx=0x7faee0b567e8, savept=0x0) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:112 #20 0x0000555abce9f59d in trx_rollback_for_mysql_low (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:174 #21 0x0000555abce9f87b in trx_rollback_for_mysql (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:202 #22 0x0000555abccb023f in innobase_rollback (hton=0x555abf7542a0, thd=0x7fae78000b00, rollback_trx=true) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:4810 #23 0x0000555abc9a4449 in ha_rollback_trans (thd=0x7fae78000b00, all=true) at /data/src/10.2/sql/handler.cc:1672 #24 0x0000555abc88e299 in trans_rollback (thd=0x7fae78000b00) at /data/src/10.2/sql/transaction.cc:415 #25 0x0000555abc736a08 in mysql_execute_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:5610 #26 0x0000555abc73d496 in mysql_parse (thd=0x7fae78000b00, rawbuf=0x7fae78013288 "ROLLBACK /* QNO 3689 CON_ID 12 */", length=33, parser_state=0x7faef41c4250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7924 #27 0x0000555abc72b32b in dispatch_command (command=COM_QUERY, thd=0x7fae78000b00, packet=0x7fae78008851 "ROLLBACK /* QNO 3689 CON_ID 12 */ ", packet_length=34, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1820 #28 0x0000555abc729c8e in do_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:1374 #29 0x0000555abc878694 in do_handle_one_connection (connect=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1335 #30 0x0000555abc878421 in handle_one_connection (arg=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1241 #31 0x00007faef81e4494 in start_thread (arg=0x7faef41c5700) at pthread_create.c:333 #32 0x00007faef65ca93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} All threads for both servers are attached. To reproduce: {noformat} git clone https://github.com/elenst/rqg --branch=mdev15374 rqg-mdev15374 cd rqg-mdev15374 {noformat} Further, if you want the test to start the server (on port 19300 by default), run the test and then stop the server if it doesn't crash before: {noformat} perl ./runall-new.pl --duration=350 --threads=1 --grammar=./mdev15374.yy --skip-gendata --vardir=/dev/shm/vardir {noformat} Or, if you already have the server running, e.g. on port 3306, then {noformat} perl ./gentest.pl --duration=350 --threads=1 --queries=100M --grammar=./mdev15374.yy --dsn="dbi:mysql:user=root:host=127.0.0.1:port=3306:database=test" {noformat} If you are running the test on 10.3, it is expected to crash very fast. If you are running it on 10.2, check the processlist, as soon as it starts saying something like {noformat} +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 | | 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 | | 16 | root | localhost:54026 | test | Query | 75 | init | ROLLBACK /* QNO 26430 CON_ID 16 */ | 0.000 | | 17 | root | localhost:53639 | NULL | Query | 0 | init | show processlist | 0.000 | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ {noformat} you have hit the problem. The test will eventually abort and complain, but it will take long time, because it optimistically waits for the server to wake up, while in this case the failure, when it happens, happens very fast. In case you don't want to clone the dedicated RQG tree, here is the grammar: {noformat} query_init: CREATE TEMPORARY TABLE t1 (a INT, key (a)); INSERT INTO t1 VALUES (1),(2) ; CREATE TEMPORARY TABLE t2 (a INT, key (a)); INSERT INTO t2 VALUES (1),(2) ; query: transaction | UPDATE table_name SET a = _digit | ; table_name: t1 | t2 ; transaction: START TRANSACTION | ROLLBACK ; {noformat} Non-debug stack trace for the reference: {noformat:title=10.3 non-debug 560743198604caf} #2 <signal handler called> #3 0x00007f4bff883f0f in __memmove_avx_unaligned_erms () from /lib/x86_64-linux-gnu/libc.so.6 #4 0x000055819f3b2726 in memcpy (__len=18446744073709539341, __src=0x7f4bd8706ff3, __dest=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string3.h:53 #5 mem_heap_dup (len=18446744073709539341, data=0x7f4bd8706ff3, heap=0x7f4b9402d040) at /data/src/10.3/storage/innobase/include/mem0mem.h:306 #6 trx_undo_rec_copy (heap=0x7f4b9402d040, undo_rec=0x7f4bd8706ff3 <error: Cannot access memory at address 0x7f4bd8706ff3>) at /data/src/10.3/storage/innobase/include/trx0rec.ic:70 #7 trx_undo_get_undo_rec_low (roll_ptr=<optimized out>, is_temp=<optimized out>, heap=0x7f4b9402d040) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #8 0x000055819f3b2ad1 in trx_undo_get_undo_rec (undo_rec=<optimized out>, name=..., trx_id=<optimized out>, heap=<optimized out>, is_temp=<optimized out>, roll_ptr=<optimized out>) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #9 trx_undo_prev_version_build (index_rec=0x7f4a8f91c020 "", index_rec@entry=0x7f4bd851009b <error: Cannot access memory at address 0x7f4bd851009b>, index_mtr=0x7f4be0020f93, index_mtr@entry=0x7f4bf117cf80, rec=0x7f4b9402cd36 "", index=0x7f4b9416c2a0, offsets=0xffffffffffffffe0, offsets@entry=0x7f4b9402cd50, heap=0x0, old_vers=0x7f4bf117c760, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #10 0x000055819f385ca2 in row_vers_old_has_index_entry (also_curr=also_curr@entry=0, rec=0x7f4bd851009b <error: Cannot access memory at address 0x7f4bd851009b>, mtr=mtr@entry=0x7f4bf117cf80, index=index@entry=0x7f4b9416cc10, ientry=ientry@entry=0x7f4b9402c7b0, roll_ptr=roll_ptr@entry=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:1010 #11 0x000055819f4d2889 in row_undo_mod_del_mark_or_remove_sec_low (node=node@entry=0x7f4b9402bef0, thr=thr@entry=0x7f4b94025328, index=index@entry=0x7f4b9416cc10, entry=entry@entry=0x7f4b9402c7b0, mode=mode@entry=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:510 #12 0x000055819f4d30c1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f4b9402bef0, thr=0x7f4b94025328, index=0x7f4b9416cc10, entry=0x7f4b9402c7b0) at /data/src/10.3/storage/innobase/row/row0umod.cc:582 #13 0x000055819f4d3a50 in row_undo_mod_upd_exist_sec (thr=<optimized out>, node=<optimized out>) at /data/src/10.3/storage/innobase/row/row0umod.cc:1062 #14 row_undo_mod (node=0x7f4b9402bef0, thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/row/row0umod.cc:1280 #15 0x000055819f37b835 in row_undo (thr=0x7f4b94025328, node=0x7f4b9402bef0) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #16 row_undo_step (thr=thr@entry=0x7f4b94025328) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #17 0x000055819f3254bf in que_thr_step (thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #18 que_run_threads_low (thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #19 que_run_threads (thr=<optimized out>) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #20 0x000055819f3ba6b8 in trx_rollback_to_savepoint_low (trx=trx@entry=0x7f4bf32156e8, savept=savept@entry=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #21 0x000055819f3bac88 in trx_rollback_for_mysql_low (trx=0x7f4bf32156e8) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #22 trx_rollback_for_mysql (trx=trx@entry=0x7f4bf32156e8) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:290 #23 0x000055819f2966e8 in innobase_rollback (hton=<optimized out>, thd=0x7f4b940009a8, rollback_trx=<optimized out>) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4628 #24 0x000055819f09a491 in ha_rollback_trans (thd=thd@entry=0x7f4b940009a8, all=all@entry=true) at /data/src/10.3/sql/handler.cc:1721 #25 0x000055819efb15b4 in trans_rollback (thd=0x7f4b940009a8) at /data/src/10.3/sql/transaction.cc:422 #26 0x000055819eecf522 in mysql_execute_command (thd=0x7f4b940009a8) at /data/src/10.3/sql/sql_parse.cc:5829 #27 0x000055819eed5c2d in mysql_parse (thd=0x7f4b940009a8, rawbuf=<optimized out>, length=34, parser_state=0x7f4bf117f630, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:8001 #28 0x000055819eed853f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f4b940009a8, packet=packet@entry=0x7f4b94009319 "ROLLBACK /* QNO 16481 CON_ID 12 */ ", packet_length=packet_length@entry=35, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1846 #29 0x000055819eed8db6 in do_command (thd=0x7f4b940009a8) at /data/src/10.3/sql/sql_parse.cc:1391 #30 0x000055819efa5454 in do_handle_one_connection (connect=connect@entry=0x5581a1b58dc8) at /data/src/10.3/sql/sql_connect.cc:1402 #31 0x000055819efa55f4 in handle_one_connection (arg=0x5581a1b58dc8) at /data/src/10.3/sql/sql_connect.cc:1308 #32 0x00007f4c0145d494 in start_thread (arg=0x7f4bf1180700) at pthread_create.c:333 #33 0x00007f4bff84393f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} |
Comment |
[ Probably same thing, but in the form of a crash on a non-debug build
{noformat} 180225 12:51:35 [ERROR] mysqld got exception 0xc0000005 ; 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. To report this bug, see https://mariadb.com/kb/en/reporting-bugs 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. Server version: 10.3.5-MariaDB-log key_buffer_size=134217728 read_buffer_size=131072 max_used_connections=7 max_threads=65537 thread_count=14 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 136160 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0xa71a5d7ca8 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... mysqld.exe!memcpy()[memcpy.asm:135] mysqld.exe!mem_heap_dup()[mem0mem.h:307] mysqld.exe!trx_undo_get_undo_rec_low()[trx0rec.cc:2175] mysqld.exe!trx_undo_get_undo_rec()[trx0rec.cc:2211] mysqld.exe!trx_undo_prev_version_build()[trx0rec.cc:2297] mysqld.exe!row_vers_old_has_index_entry()[row0vers.cc:1011] mysqld.exe!row_undo_mod_del_mark_or_remove_sec_low()[row0umod.cc:511] mysqld.exe!row_undo_mod_del_mark_or_remove_sec()[row0umod.cc:583] mysqld.exe!row_undo_mod_upd_exist_sec()[row0umod.cc:1061] mysqld.exe!row_undo_mod()[row0umod.cc:1280] mysqld.exe!row_undo()[row0undo.cc:307] mysqld.exe!row_undo_step()[row0undo.cc:355] mysqld.exe!que_thr_step()[que0que.cc:1049] mysqld.exe!que_run_threads_low()[que0que.cc:1116] mysqld.exe!que_run_threads()[que0que.cc:1155] mysqld.exe!trx_rollback_to_savepoint_low()[trx0roll.cc:114] mysqld.exe!trx_rollback_for_mysql_low()[trx0roll.cc:186] mysqld.exe!trx_rollback_low()[trx0roll.cc:264] mysqld.exe!trx_rollback_for_mysql()[trx0roll.cc:293] mysqld.exe!innobase_rollback()[ha_innodb.cc:4679] mysqld.exe!ha_rollback_trans()[handler.cc:1719] mysqld.exe!xa_trans_force_rollback()[transaction.cc:140] mysqld.exe!trans_xa_rollback()[transaction.cc:1048] mysqld.exe!mysql_execute_command()[sql_parse.cc:6132] mysqld.exe!mysql_parse()[sql_parse.cc:7985] mysqld.exe!dispatch_command()[sql_parse.cc:1827] mysqld.exe!do_command()[sql_parse.cc:1369] mysqld.exe!threadpool_process_request()[threadpool_common.cc:358] mysqld.exe!tp_callback()[threadpool_common.cc:186] KERNEL32.DLL!VirtualUnlock() ntdll.dll!RtlGetActiveActivationContext() ntdll.dll!RtlFreeUnicodeString() KERNEL32.DLL!BaseThreadInitThunk() ntdll.dll!RtlUserThreadStart() Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (0xa71a64eda0): XA ROLLBACK 'xid75' /* QNO 5714 CON_ID 17 */ Connection ID (thread ID): 17 Status: NOT_KILLED Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on {noformat} ] |
Comment | [ New occurrence: https://api.travis-ci.org/v3/job/351852206/log.txt ] |
Comment | [ New occurrence: https://api.travis-ci.org/v3/job/353483293/log.txt ] |
Comment | [ New occurrence on 10.2: https://api.travis-ci.org/v3/job/356509750/log.txt ] |
Comment | [ New occurrence on 10.3: https://api.travis-ci.org/v3/job/359141885/log.txt ] |
Assignee | Elena Stepanova [ elenst ] | Marko Mäkelä [ marko ] |
Description |
The RQG test provided below represents simple non-concurrent one-thread flow consisting of updates on temporary InnoDB tables, followed by rollbacks. Very soon (for me it happens within the first minute of the test) one of ROLLBACKs causes an assertion failure on 10.3 or hangs on 10.2. For 10.3, even one table is enough, 10.2 seems to need two tables, so the grammar has two tables.
10.1 does not hang or crash. {noformat:title=10.3 fa68b88b5d415} mysqld: /data/src/10.3/storage/innobase/include/trx0rec.ic:68: trx_undo_rec_t* trx_undo_rec_copy(const trx_undo_rec_t*, mem_heap_t*): Assertion `len < ((ulint) srv_page_size)' failed. 180419 0:27:25 [ERROR] mysqld got signal 6 ; #7 0x00007f3211effee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000055bb77d5623e in trx_undo_rec_copy (undo_rec=0x7f31f072f041 "", heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/include/trx0rec.ic:68 #9 0x000055bb77d5d45b in trx_undo_get_undo_rec_low (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #10 0x000055bb77d5d54b in trx_undo_get_undo_rec (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90, trx_id=5480, name=..., undo_rec=0x7f3210185be0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #11 0x000055bb77d5d82c in trx_undo_prev_version_build (index_rec=0x7f31f052809b "", index_mtr=0x7f3210186520, rec=0x7f31a04e0b8e "", index=0x7f31a02a4f78, offsets=0x7f31a04e0bf0, heap=0x7f31a04e0e90, old_vers=0x7f3210185cd0, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #12 0x000055bb77d14702 in row_vers_old_has_index_entry (also_curr=0, rec=0x7f31f052809b "", mtr=0x7f3210186520, index=0x7f31a02a4ad8, ientry=0x7f31a04e05f8, roll_ptr=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:987 #13 0x000055bb77f03e4b in row_undo_mod_del_mark_or_remove_sec_low (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8, mode=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:544 #14 0x000055bb77f041a1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8) at /data/src/10.3/storage/innobase/row/row0umod.cc:616 #15 0x000055bb77f055f1 in row_undo_mod_upd_exist_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1096 #16 0x000055bb77f05edd in row_undo_mod (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1314 #17 0x000055bb77cfe36f in row_undo (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #18 0x000055bb77cfe551 in row_undo_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #19 0x000055bb77c4f65a in que_thr_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #20 0x000055bb77c4f8a9 in que_run_threads_low (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #21 0x000055bb77c4fa9a in que_run_threads (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #22 0x000055bb77d5ff2e in trx_rollback_to_savepoint_low (trx=0x7f3210268828, savept=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #23 0x000055bb77d6039c in trx_rollback_for_mysql_low (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #24 0x000055bb77d606db in trx_rollback_for_mysql (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:240 #25 0x000055bb77b497c3 in innobase_rollback (hton=0x55bb7af9c420, thd=0x7f31a0000b00, rollback_trx=true) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4632 #26 0x000055bb77834907 in ha_rollback_trans (thd=0x7f31a0000b00, all=true) at /data/src/10.3/sql/handler.cc:1721 #27 0x000055bb776c147d in trans_rollback (thd=0x7f31a0000b00) at /data/src/10.3/sql/transaction.cc:422 #28 0x000055bb77558739 in mysql_execute_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:5829 #29 0x000055bb7755eb06 in mysql_parse (thd=0x7f31a0000b00, rawbuf=0x7f31a0015ae8 "ROLLBACK /* QNO 22863 CON_ID 12 */", length=34, parser_state=0x7f3210188620, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8001 #30 0x000055bb7754c2e9 in dispatch_command (command=COM_QUERY, thd=0x7f31a0000b00, packet=0x7f31a04009c1 "ROLLBACK /* QNO 22863 CON_ID 12 */ ", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1846 #31 0x000055bb7754ad28 in do_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:1391 #32 0x000055bb776ad791 in do_handle_one_connection (connect=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1402 #33 0x000055bb776ad51e in handle_one_connection (arg=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1308 #34 0x00007f3213bd6494 in start_thread (arg=0x7f3210189700) at pthread_create.c:333 #35 0x00007f3211fbc93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} {noformat:title=10.2 66c14d3a8d31e while hanging} Thread 3 (Thread 0x7faef41c5700 (LWP 32647)): #0 GenericPolicy<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538878 <rw_lock_debug_mutex+56>, mutex=..., filename=0x555abd3a9670 "/data/src/10.2/storage/innobase/sync/sync0debug.cc" , line=1268) at /data/src/10.2/storage/innobase/include/sync0policy.h:349 #1 0x0000555abcd6d6b9 in PolicyMutex<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538840 <rw_lock_debug_mutex>, n_spins=30, n_delay=6, name=0x555abd3a9670 "/data/src/10.2/storage/inn obase/sync/sync0debug.cc", line=1268) at /data/src/10.2/storage/innobase/include/ib0mutex.h:635 #2 0x0000555abce74aa8 in rw_lock_debug_mutex_enter () at /data/src/10.2/storage/innobase/sync/sync0debug.cc:1268 #3 0x0000555abce6cc41 in rw_lock_own (lock=0x555abfef9780, lock_type=4) at /data/src/10.2/storage/innobase/sync/sync0rw.cc:1029 #4 0x0000555abcf2401c in buf_page_get_gen (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, file=0x555abd3b2ed0 "/data/src/10.2/storage/innobase/include/trx0undo.ic", line=180, mtr=0x7faef41c1380, err=0x0) at /data/src/10.2/storage/innobase/buf/buf0buf.cc:4829 #5 0x0000555abce972b2 in trx_undo_page_get_s_latched (page_id=..., mtr=0x7faef41c1380) at /data/src/10.2/storage/innobase/include/trx0undo.ic:179 #6 0x0000555abce9c364 in trx_undo_get_undo_rec_low (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2120 #7 0x0000555abce9c486 in trx_undo_get_undo_rec (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030, trx_id=2572, name=..., undo_rec=0x7faef41c1950) at /data/src/10.2/storage/inno base/trx/trx0rec.cc:2158 #8 0x0000555abce9c6db in trx_undo_prev_version_build (index_rec=0x7faed44fc09b "", index_mtr=0x7faef41c22a0, rec=0x7fae78057d26 "", index=0x7fae78048798, offsets=0x7fae78057d88, heap=0x7fa e78058030, old_vers=0x7faef41c1a40, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2244 #9 0x0000555abce53ad2 in row_vers_old_has_index_entry (also_curr=0, rec=0x7faed44fc09b "", mtr=0x7faef41c22a0, index=0x7fae78048368, ientry=0x7fae78057798, roll_ptr=0, trx_id=0) at /data/src/10.2/storage/innobase/row/row0vers.cc:999 #10 0x0000555abd02c8e9 in row_undo_mod_del_mark_or_remove_sec_low (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798, mode=2) at /data/src/10.2/storage/innobase/row/row0umod.cc:510 #11 0x0000555abd02cc02 in row_undo_mod_del_mark_or_remove_sec (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798) at /data/src/10.2/storage/innobase/row/row0umod.cc:582 #12 0x0000555abd02df86 in row_undo_mod_upd_exist_sec (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1063 #13 0x0000555abd02e63e in row_undo_mod (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1260 #14 0x0000555abce3e324 in row_undo (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:304 #15 0x0000555abce3e472 in row_undo_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:352 #16 0x0000555abcda1679 in que_thr_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1047 #17 0x0000555abcda1893 in que_run_threads_low (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1111 #18 0x0000555abcda1a3c in que_run_threads (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1151 #19 0x0000555abce9f233 in trx_rollback_to_savepoint_low (trx=0x7faee0b567e8, savept=0x0) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:112 #20 0x0000555abce9f59d in trx_rollback_for_mysql_low (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:174 #21 0x0000555abce9f87b in trx_rollback_for_mysql (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:202 #22 0x0000555abccb023f in innobase_rollback (hton=0x555abf7542a0, thd=0x7fae78000b00, rollback_trx=true) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:4810 #23 0x0000555abc9a4449 in ha_rollback_trans (thd=0x7fae78000b00, all=true) at /data/src/10.2/sql/handler.cc:1672 #24 0x0000555abc88e299 in trans_rollback (thd=0x7fae78000b00) at /data/src/10.2/sql/transaction.cc:415 #25 0x0000555abc736a08 in mysql_execute_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:5610 #26 0x0000555abc73d496 in mysql_parse (thd=0x7fae78000b00, rawbuf=0x7fae78013288 "ROLLBACK /* QNO 3689 CON_ID 12 */", length=33, parser_state=0x7faef41c4250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7924 #27 0x0000555abc72b32b in dispatch_command (command=COM_QUERY, thd=0x7fae78000b00, packet=0x7fae78008851 "ROLLBACK /* QNO 3689 CON_ID 12 */ ", packet_length=34, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1820 #28 0x0000555abc729c8e in do_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:1374 #29 0x0000555abc878694 in do_handle_one_connection (connect=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1335 #30 0x0000555abc878421 in handle_one_connection (arg=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1241 #31 0x00007faef81e4494 in start_thread (arg=0x7faef41c5700) at pthread_create.c:333 #32 0x00007faef65ca93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} All threads for both servers are attached. To reproduce: {noformat} git clone https://github.com/elenst/rqg --branch=mdev15374 rqg-mdev15374 cd rqg-mdev15374 {noformat} Further, if you want the test to start the server (on port 19300 by default), run the test and then stop the server if it doesn't crash before: {noformat} perl ./runall-new.pl --duration=350 --threads=1 --grammar=./mdev15374.yy --skip-gendata --vardir=/dev/shm/vardir {noformat} Or, if you already have the server running, e.g. on port 3306, then {noformat} perl ./gentest.pl --duration=350 --threads=1 --queries=100M --grammar=./mdev15374.yy --dsn="dbi:mysql:user=root:host=127.0.0.1:port=3306:database=test" {noformat} If you are running the test on 10.3, it is expected to crash very fast. If you are running it on 10.2, check the processlist, as soon as it starts saying something like {noformat} +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 | | 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 | | 16 | root | localhost:54026 | test | Query | 75 | init | ROLLBACK /* QNO 26430 CON_ID 16 */ | 0.000 | | 17 | root | localhost:53639 | NULL | Query | 0 | init | show processlist | 0.000 | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ {noformat} you have hit the problem. The test will eventually abort and complain, but it will take long time, because it optimistically waits for the server to wake up, while in this case the failure, when it happens, happens very fast. In case you don't want to clone the dedicated RQG tree, here is the grammar: {noformat} query_init: CREATE TEMPORARY TABLE t1 (a INT, key (a)); INSERT INTO t1 VALUES (1),(2) ; CREATE TEMPORARY TABLE t2 (a INT, key (a)); INSERT INTO t2 VALUES (1),(2) ; query: transaction | UPDATE table_name SET a = _digit | ; table_name: t1 | t2 ; transaction: START TRANSACTION | ROLLBACK ; {noformat} Non-debug stack trace for the reference: {noformat:title=10.3 non-debug 560743198604caf} #2 <signal handler called> #3 0x00007f4bff883f0f in __memmove_avx_unaligned_erms () from /lib/x86_64-linux-gnu/libc.so.6 #4 0x000055819f3b2726 in memcpy (__len=18446744073709539341, __src=0x7f4bd8706ff3, __dest=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string3.h:53 #5 mem_heap_dup (len=18446744073709539341, data=0x7f4bd8706ff3, heap=0x7f4b9402d040) at /data/src/10.3/storage/innobase/include/mem0mem.h:306 #6 trx_undo_rec_copy (heap=0x7f4b9402d040, undo_rec=0x7f4bd8706ff3 <error: Cannot access memory at address 0x7f4bd8706ff3>) at /data/src/10.3/storage/innobase/include/trx0rec.ic:70 #7 trx_undo_get_undo_rec_low (roll_ptr=<optimized out>, is_temp=<optimized out>, heap=0x7f4b9402d040) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #8 0x000055819f3b2ad1 in trx_undo_get_undo_rec (undo_rec=<optimized out>, name=..., trx_id=<optimized out>, heap=<optimized out>, is_temp=<optimized out>, roll_ptr=<optimized out>) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #9 trx_undo_prev_version_build (index_rec=0x7f4a8f91c020 "", index_rec@entry=0x7f4bd851009b <error: Cannot access memory at address 0x7f4bd851009b>, index_mtr=0x7f4be0020f93, index_mtr@entry=0x7f4bf117cf80, rec=0x7f4b9402cd36 "", index=0x7f4b9416c2a0, offsets=0xffffffffffffffe0, offsets@entry=0x7f4b9402cd50, heap=0x0, old_vers=0x7f4bf117c760, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #10 0x000055819f385ca2 in row_vers_old_has_index_entry (also_curr=also_curr@entry=0, rec=0x7f4bd851009b <error: Cannot access memory at address 0x7f4bd851009b>, mtr=mtr@entry=0x7f4bf117cf80, index=index@entry=0x7f4b9416cc10, ientry=ientry@entry=0x7f4b9402c7b0, roll_ptr=roll_ptr@entry=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:1010 #11 0x000055819f4d2889 in row_undo_mod_del_mark_or_remove_sec_low (node=node@entry=0x7f4b9402bef0, thr=thr@entry=0x7f4b94025328, index=index@entry=0x7f4b9416cc10, entry=entry@entry=0x7f4b9402c7b0, mode=mode@entry=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:510 #12 0x000055819f4d30c1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f4b9402bef0, thr=0x7f4b94025328, index=0x7f4b9416cc10, entry=0x7f4b9402c7b0) at /data/src/10.3/storage/innobase/row/row0umod.cc:582 #13 0x000055819f4d3a50 in row_undo_mod_upd_exist_sec (thr=<optimized out>, node=<optimized out>) at /data/src/10.3/storage/innobase/row/row0umod.cc:1062 #14 row_undo_mod (node=0x7f4b9402bef0, thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/row/row0umod.cc:1280 #15 0x000055819f37b835 in row_undo (thr=0x7f4b94025328, node=0x7f4b9402bef0) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #16 row_undo_step (thr=thr@entry=0x7f4b94025328) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #17 0x000055819f3254bf in que_thr_step (thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #18 que_run_threads_low (thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #19 que_run_threads (thr=<optimized out>) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #20 0x000055819f3ba6b8 in trx_rollback_to_savepoint_low (trx=trx@entry=0x7f4bf32156e8, savept=savept@entry=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #21 0x000055819f3bac88 in trx_rollback_for_mysql_low (trx=0x7f4bf32156e8) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #22 trx_rollback_for_mysql (trx=trx@entry=0x7f4bf32156e8) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:290 #23 0x000055819f2966e8 in innobase_rollback (hton=<optimized out>, thd=0x7f4b940009a8, rollback_trx=<optimized out>) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4628 #24 0x000055819f09a491 in ha_rollback_trans (thd=thd@entry=0x7f4b940009a8, all=all@entry=true) at /data/src/10.3/sql/handler.cc:1721 #25 0x000055819efb15b4 in trans_rollback (thd=0x7f4b940009a8) at /data/src/10.3/sql/transaction.cc:422 #26 0x000055819eecf522 in mysql_execute_command (thd=0x7f4b940009a8) at /data/src/10.3/sql/sql_parse.cc:5829 #27 0x000055819eed5c2d in mysql_parse (thd=0x7f4b940009a8, rawbuf=<optimized out>, length=34, parser_state=0x7f4bf117f630, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:8001 #28 0x000055819eed853f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f4b940009a8, packet=packet@entry=0x7f4b94009319 "ROLLBACK /* QNO 16481 CON_ID 12 */ ", packet_length=packet_length@entry=35, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1846 #29 0x000055819eed8db6 in do_command (thd=0x7f4b940009a8) at /data/src/10.3/sql/sql_parse.cc:1391 #30 0x000055819efa5454 in do_handle_one_connection (connect=connect@entry=0x5581a1b58dc8) at /data/src/10.3/sql/sql_connect.cc:1402 #31 0x000055819efa55f4 in handle_one_connection (arg=0x5581a1b58dc8) at /data/src/10.3/sql/sql_connect.cc:1308 #32 0x00007f4c0145d494 in start_thread (arg=0x7f4bf1180700) at pthread_create.c:333 #33 0x00007f4bff84393f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} |
The RQG test provided below represents simple non-concurrent one-thread flow consisting of updates on temporary InnoDB tables, followed by rollbacks. Very soon (for me it happens within the first minute of the test) one of ROLLBACKs causes an assertion failure on 10.3 or hangs on 10.2. For 10.3, even one table is enough, 10.2 seems to need two tables, so the grammar has two tables.
10.1 does not hang or crash. {noformat:title=10.3 fa68b88b5d415} mysqld: /data/src/10.3/storage/innobase/include/trx0rec.ic:68: trx_undo_rec_t* trx_undo_rec_copy(const trx_undo_rec_t*, mem_heap_t*): Assertion `len < ((ulint) srv_page_size)' failed. 180419 0:27:25 [ERROR] mysqld got signal 6 ; #7 0x00007f3211effee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000055bb77d5623e in trx_undo_rec_copy (undo_rec=0x7f31f072f041 "", heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/include/trx0rec.ic:68 #9 0x000055bb77d5d45b in trx_undo_get_undo_rec_low (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #10 0x000055bb77d5d54b in trx_undo_get_undo_rec (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90, trx_id=5480, name=..., undo_rec=0x7f3210185be0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #11 0x000055bb77d5d82c in trx_undo_prev_version_build (index_rec=0x7f31f052809b "", index_mtr=0x7f3210186520, rec=0x7f31a04e0b8e "", index=0x7f31a02a4f78, offsets=0x7f31a04e0bf0, heap=0x7f31a04e0e90, old_vers=0x7f3210185cd0, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #12 0x000055bb77d14702 in row_vers_old_has_index_entry (also_curr=0, rec=0x7f31f052809b "", mtr=0x7f3210186520, index=0x7f31a02a4ad8, ientry=0x7f31a04e05f8, roll_ptr=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:987 #13 0x000055bb77f03e4b in row_undo_mod_del_mark_or_remove_sec_low (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8, mode=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:544 #14 0x000055bb77f041a1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8) at /data/src/10.3/storage/innobase/row/row0umod.cc:616 #15 0x000055bb77f055f1 in row_undo_mod_upd_exist_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1096 #16 0x000055bb77f05edd in row_undo_mod (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1314 #17 0x000055bb77cfe36f in row_undo (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #18 0x000055bb77cfe551 in row_undo_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #19 0x000055bb77c4f65a in que_thr_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #20 0x000055bb77c4f8a9 in que_run_threads_low (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #21 0x000055bb77c4fa9a in que_run_threads (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #22 0x000055bb77d5ff2e in trx_rollback_to_savepoint_low (trx=0x7f3210268828, savept=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #23 0x000055bb77d6039c in trx_rollback_for_mysql_low (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #24 0x000055bb77d606db in trx_rollback_for_mysql (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:240 #25 0x000055bb77b497c3 in innobase_rollback (hton=0x55bb7af9c420, thd=0x7f31a0000b00, rollback_trx=true) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4632 #26 0x000055bb77834907 in ha_rollback_trans (thd=0x7f31a0000b00, all=true) at /data/src/10.3/sql/handler.cc:1721 #27 0x000055bb776c147d in trans_rollback (thd=0x7f31a0000b00) at /data/src/10.3/sql/transaction.cc:422 #28 0x000055bb77558739 in mysql_execute_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:5829 #29 0x000055bb7755eb06 in mysql_parse (thd=0x7f31a0000b00, rawbuf=0x7f31a0015ae8 "ROLLBACK /* QNO 22863 CON_ID 12 */", length=34, parser_state=0x7f3210188620, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8001 #30 0x000055bb7754c2e9 in dispatch_command (command=COM_QUERY, thd=0x7f31a0000b00, packet=0x7f31a04009c1 "ROLLBACK /* QNO 22863 CON_ID 12 */ ", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1846 #31 0x000055bb7754ad28 in do_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:1391 #32 0x000055bb776ad791 in do_handle_one_connection (connect=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1402 #33 0x000055bb776ad51e in handle_one_connection (arg=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1308 #34 0x00007f3213bd6494 in start_thread (arg=0x7f3210189700) at pthread_create.c:333 #35 0x00007f3211fbc93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} {noformat:title=10.2 66c14d3a8d31e while hanging} Thread 3 (Thread 0x7faef41c5700 (LWP 32647)): #0 GenericPolicy<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538878 <rw_lock_debug_mutex+56>, mutex=..., filename=0x555abd3a9670 "/data/src/10.2/storage/innobase/sync/sync0debug.cc" , line=1268) at /data/src/10.2/storage/innobase/include/sync0policy.h:349 #1 0x0000555abcd6d6b9 in PolicyMutex<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538840 <rw_lock_debug_mutex>, n_spins=30, n_delay=6, name=0x555abd3a9670 "/data/src/10.2/storage/inn obase/sync/sync0debug.cc", line=1268) at /data/src/10.2/storage/innobase/include/ib0mutex.h:635 #2 0x0000555abce74aa8 in rw_lock_debug_mutex_enter () at /data/src/10.2/storage/innobase/sync/sync0debug.cc:1268 #3 0x0000555abce6cc41 in rw_lock_own (lock=0x555abfef9780, lock_type=4) at /data/src/10.2/storage/innobase/sync/sync0rw.cc:1029 #4 0x0000555abcf2401c in buf_page_get_gen (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, file=0x555abd3b2ed0 "/data/src/10.2/storage/innobase/include/trx0undo.ic", line=180, mtr=0x7faef41c1380, err=0x0) at /data/src/10.2/storage/innobase/buf/buf0buf.cc:4829 #5 0x0000555abce972b2 in trx_undo_page_get_s_latched (page_id=..., mtr=0x7faef41c1380) at /data/src/10.2/storage/innobase/include/trx0undo.ic:179 #6 0x0000555abce9c364 in trx_undo_get_undo_rec_low (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2120 #7 0x0000555abce9c486 in trx_undo_get_undo_rec (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030, trx_id=2572, name=..., undo_rec=0x7faef41c1950) at /data/src/10.2/storage/inno base/trx/trx0rec.cc:2158 #8 0x0000555abce9c6db in trx_undo_prev_version_build (index_rec=0x7faed44fc09b "", index_mtr=0x7faef41c22a0, rec=0x7fae78057d26 "", index=0x7fae78048798, offsets=0x7fae78057d88, heap=0x7fa e78058030, old_vers=0x7faef41c1a40, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2244 #9 0x0000555abce53ad2 in row_vers_old_has_index_entry (also_curr=0, rec=0x7faed44fc09b "", mtr=0x7faef41c22a0, index=0x7fae78048368, ientry=0x7fae78057798, roll_ptr=0, trx_id=0) at /data/src/10.2/storage/innobase/row/row0vers.cc:999 #10 0x0000555abd02c8e9 in row_undo_mod_del_mark_or_remove_sec_low (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798, mode=2) at /data/src/10.2/storage/innobase/row/row0umod.cc:510 #11 0x0000555abd02cc02 in row_undo_mod_del_mark_or_remove_sec (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798) at /data/src/10.2/storage/innobase/row/row0umod.cc:582 #12 0x0000555abd02df86 in row_undo_mod_upd_exist_sec (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1063 #13 0x0000555abd02e63e in row_undo_mod (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1260 #14 0x0000555abce3e324 in row_undo (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:304 #15 0x0000555abce3e472 in row_undo_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:352 #16 0x0000555abcda1679 in que_thr_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1047 #17 0x0000555abcda1893 in que_run_threads_low (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1111 #18 0x0000555abcda1a3c in que_run_threads (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1151 #19 0x0000555abce9f233 in trx_rollback_to_savepoint_low (trx=0x7faee0b567e8, savept=0x0) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:112 #20 0x0000555abce9f59d in trx_rollback_for_mysql_low (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:174 #21 0x0000555abce9f87b in trx_rollback_for_mysql (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:202 #22 0x0000555abccb023f in innobase_rollback (hton=0x555abf7542a0, thd=0x7fae78000b00, rollback_trx=true) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:4810 #23 0x0000555abc9a4449 in ha_rollback_trans (thd=0x7fae78000b00, all=true) at /data/src/10.2/sql/handler.cc:1672 #24 0x0000555abc88e299 in trans_rollback (thd=0x7fae78000b00) at /data/src/10.2/sql/transaction.cc:415 #25 0x0000555abc736a08 in mysql_execute_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:5610 #26 0x0000555abc73d496 in mysql_parse (thd=0x7fae78000b00, rawbuf=0x7fae78013288 "ROLLBACK /* QNO 3689 CON_ID 12 */", length=33, parser_state=0x7faef41c4250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7924 #27 0x0000555abc72b32b in dispatch_command (command=COM_QUERY, thd=0x7fae78000b00, packet=0x7fae78008851 "ROLLBACK /* QNO 3689 CON_ID 12 */ ", packet_length=34, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1820 #28 0x0000555abc729c8e in do_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:1374 #29 0x0000555abc878694 in do_handle_one_connection (connect=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1335 #30 0x0000555abc878421 in handle_one_connection (arg=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1241 #31 0x00007faef81e4494 in start_thread (arg=0x7faef41c5700) at pthread_create.c:333 #32 0x00007faef65ca93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} All threads for both servers are attached. For a note, I've seen the assertion failure on 10.2 before in my random tests, but it isn't happening here, the server always hangs instead. To reproduce: {noformat} git clone https://github.com/elenst/rqg --branch=mdev15374 rqg-mdev15374 cd rqg-mdev15374 {noformat} Further, if you want the test to start the server (on port 19300 by default), run the test and then stop the server if it doesn't crash before: {noformat} perl ./runall-new.pl --duration=350 --threads=1 --grammar=./mdev15374.yy --skip-gendata --vardir=/dev/shm/vardir {noformat} Or, if you already have the server running, e.g. on port 3306, then {noformat} perl ./gentest.pl --duration=350 --threads=1 --queries=100M --grammar=./mdev15374.yy --dsn="dbi:mysql:user=root:host=127.0.0.1:port=3306:database=test" {noformat} If you are running the test on 10.3, it is expected to crash very fast. If you are running it on 10.2, check the processlist, as soon as it starts saying something like {noformat} +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 | | 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 | | 16 | root | localhost:54026 | test | Query | 75 | init | ROLLBACK /* QNO 26430 CON_ID 16 */ | 0.000 | | 17 | root | localhost:53639 | NULL | Query | 0 | init | show processlist | 0.000 | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ {noformat} you have hit the problem. The test will eventually abort and complain, but it will take long time, because it optimistically waits for the server to wake up, while in this case the failure, when it happens, happens very fast. In case you don't want to clone the dedicated RQG tree, here is the grammar: {noformat} query_init: CREATE TEMPORARY TABLE t1 (a INT, key (a)); INSERT INTO t1 VALUES (1),(2) ; CREATE TEMPORARY TABLE t2 (a INT, key (a)); INSERT INTO t2 VALUES (1),(2) ; query: transaction | UPDATE table_name SET a = _digit | ; table_name: t1 | t2 ; transaction: START TRANSACTION | ROLLBACK ; {noformat} Non-debug stack trace for the reference: {noformat:title=10.3 non-debug 560743198604caf} #2 <signal handler called> #3 0x00007f4bff883f0f in __memmove_avx_unaligned_erms () from /lib/x86_64-linux-gnu/libc.so.6 #4 0x000055819f3b2726 in memcpy (__len=18446744073709539341, __src=0x7f4bd8706ff3, __dest=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string3.h:53 #5 mem_heap_dup (len=18446744073709539341, data=0x7f4bd8706ff3, heap=0x7f4b9402d040) at /data/src/10.3/storage/innobase/include/mem0mem.h:306 #6 trx_undo_rec_copy (heap=0x7f4b9402d040, undo_rec=0x7f4bd8706ff3 <error: Cannot access memory at address 0x7f4bd8706ff3>) at /data/src/10.3/storage/innobase/include/trx0rec.ic:70 #7 trx_undo_get_undo_rec_low (roll_ptr=<optimized out>, is_temp=<optimized out>, heap=0x7f4b9402d040) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #8 0x000055819f3b2ad1 in trx_undo_get_undo_rec (undo_rec=<optimized out>, name=..., trx_id=<optimized out>, heap=<optimized out>, is_temp=<optimized out>, roll_ptr=<optimized out>) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #9 trx_undo_prev_version_build (index_rec=0x7f4a8f91c020 "", index_rec@entry=0x7f4bd851009b <error: Cannot access memory at address 0x7f4bd851009b>, index_mtr=0x7f4be0020f93, index_mtr@entry=0x7f4bf117cf80, rec=0x7f4b9402cd36 "", index=0x7f4b9416c2a0, offsets=0xffffffffffffffe0, offsets@entry=0x7f4b9402cd50, heap=0x0, old_vers=0x7f4bf117c760, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #10 0x000055819f385ca2 in row_vers_old_has_index_entry (also_curr=also_curr@entry=0, rec=0x7f4bd851009b <error: Cannot access memory at address 0x7f4bd851009b>, mtr=mtr@entry=0x7f4bf117cf80, index=index@entry=0x7f4b9416cc10, ientry=ientry@entry=0x7f4b9402c7b0, roll_ptr=roll_ptr@entry=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:1010 #11 0x000055819f4d2889 in row_undo_mod_del_mark_or_remove_sec_low (node=node@entry=0x7f4b9402bef0, thr=thr@entry=0x7f4b94025328, index=index@entry=0x7f4b9416cc10, entry=entry@entry=0x7f4b9402c7b0, mode=mode@entry=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:510 #12 0x000055819f4d30c1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f4b9402bef0, thr=0x7f4b94025328, index=0x7f4b9416cc10, entry=0x7f4b9402c7b0) at /data/src/10.3/storage/innobase/row/row0umod.cc:582 #13 0x000055819f4d3a50 in row_undo_mod_upd_exist_sec (thr=<optimized out>, node=<optimized out>) at /data/src/10.3/storage/innobase/row/row0umod.cc:1062 #14 row_undo_mod (node=0x7f4b9402bef0, thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/row/row0umod.cc:1280 #15 0x000055819f37b835 in row_undo (thr=0x7f4b94025328, node=0x7f4b9402bef0) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #16 row_undo_step (thr=thr@entry=0x7f4b94025328) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #17 0x000055819f3254bf in que_thr_step (thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #18 que_run_threads_low (thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #19 que_run_threads (thr=<optimized out>) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #20 0x000055819f3ba6b8 in trx_rollback_to_savepoint_low (trx=trx@entry=0x7f4bf32156e8, savept=savept@entry=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #21 0x000055819f3bac88 in trx_rollback_for_mysql_low (trx=0x7f4bf32156e8) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #22 trx_rollback_for_mysql (trx=trx@entry=0x7f4bf32156e8) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:290 #23 0x000055819f2966e8 in innobase_rollback (hton=<optimized out>, thd=0x7f4b940009a8, rollback_trx=<optimized out>) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4628 #24 0x000055819f09a491 in ha_rollback_trans (thd=thd@entry=0x7f4b940009a8, all=all@entry=true) at /data/src/10.3/sql/handler.cc:1721 #25 0x000055819efb15b4 in trans_rollback (thd=0x7f4b940009a8) at /data/src/10.3/sql/transaction.cc:422 #26 0x000055819eecf522 in mysql_execute_command (thd=0x7f4b940009a8) at /data/src/10.3/sql/sql_parse.cc:5829 #27 0x000055819eed5c2d in mysql_parse (thd=0x7f4b940009a8, rawbuf=<optimized out>, length=34, parser_state=0x7f4bf117f630, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:8001 #28 0x000055819eed853f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f4b940009a8, packet=packet@entry=0x7f4b94009319 "ROLLBACK /* QNO 16481 CON_ID 12 */ ", packet_length=packet_length@entry=35, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1846 #29 0x000055819eed8db6 in do_command (thd=0x7f4b940009a8) at /data/src/10.3/sql/sql_parse.cc:1391 #30 0x000055819efa5454 in do_handle_one_connection (connect=connect@entry=0x5581a1b58dc8) at /data/src/10.3/sql/sql_connect.cc:1402 #31 0x000055819efa55f4 in handle_one_connection (arg=0x5581a1b58dc8) at /data/src/10.3/sql/sql_connect.cc:1308 #32 0x00007f4c0145d494 in start_thread (arg=0x7f4bf1180700) at pthread_create.c:333 #33 0x00007f4bff84393f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} |
Description |
The RQG test provided below represents simple non-concurrent one-thread flow consisting of updates on temporary InnoDB tables, followed by rollbacks. Very soon (for me it happens within the first minute of the test) one of ROLLBACKs causes an assertion failure on 10.3 or hangs on 10.2. For 10.3, even one table is enough, 10.2 seems to need two tables, so the grammar has two tables.
10.1 does not hang or crash. {noformat:title=10.3 fa68b88b5d415} mysqld: /data/src/10.3/storage/innobase/include/trx0rec.ic:68: trx_undo_rec_t* trx_undo_rec_copy(const trx_undo_rec_t*, mem_heap_t*): Assertion `len < ((ulint) srv_page_size)' failed. 180419 0:27:25 [ERROR] mysqld got signal 6 ; #7 0x00007f3211effee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000055bb77d5623e in trx_undo_rec_copy (undo_rec=0x7f31f072f041 "", heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/include/trx0rec.ic:68 #9 0x000055bb77d5d45b in trx_undo_get_undo_rec_low (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #10 0x000055bb77d5d54b in trx_undo_get_undo_rec (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90, trx_id=5480, name=..., undo_rec=0x7f3210185be0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #11 0x000055bb77d5d82c in trx_undo_prev_version_build (index_rec=0x7f31f052809b "", index_mtr=0x7f3210186520, rec=0x7f31a04e0b8e "", index=0x7f31a02a4f78, offsets=0x7f31a04e0bf0, heap=0x7f31a04e0e90, old_vers=0x7f3210185cd0, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #12 0x000055bb77d14702 in row_vers_old_has_index_entry (also_curr=0, rec=0x7f31f052809b "", mtr=0x7f3210186520, index=0x7f31a02a4ad8, ientry=0x7f31a04e05f8, roll_ptr=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:987 #13 0x000055bb77f03e4b in row_undo_mod_del_mark_or_remove_sec_low (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8, mode=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:544 #14 0x000055bb77f041a1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8) at /data/src/10.3/storage/innobase/row/row0umod.cc:616 #15 0x000055bb77f055f1 in row_undo_mod_upd_exist_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1096 #16 0x000055bb77f05edd in row_undo_mod (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1314 #17 0x000055bb77cfe36f in row_undo (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #18 0x000055bb77cfe551 in row_undo_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #19 0x000055bb77c4f65a in que_thr_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #20 0x000055bb77c4f8a9 in que_run_threads_low (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #21 0x000055bb77c4fa9a in que_run_threads (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #22 0x000055bb77d5ff2e in trx_rollback_to_savepoint_low (trx=0x7f3210268828, savept=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #23 0x000055bb77d6039c in trx_rollback_for_mysql_low (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #24 0x000055bb77d606db in trx_rollback_for_mysql (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:240 #25 0x000055bb77b497c3 in innobase_rollback (hton=0x55bb7af9c420, thd=0x7f31a0000b00, rollback_trx=true) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4632 #26 0x000055bb77834907 in ha_rollback_trans (thd=0x7f31a0000b00, all=true) at /data/src/10.3/sql/handler.cc:1721 #27 0x000055bb776c147d in trans_rollback (thd=0x7f31a0000b00) at /data/src/10.3/sql/transaction.cc:422 #28 0x000055bb77558739 in mysql_execute_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:5829 #29 0x000055bb7755eb06 in mysql_parse (thd=0x7f31a0000b00, rawbuf=0x7f31a0015ae8 "ROLLBACK /* QNO 22863 CON_ID 12 */", length=34, parser_state=0x7f3210188620, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8001 #30 0x000055bb7754c2e9 in dispatch_command (command=COM_QUERY, thd=0x7f31a0000b00, packet=0x7f31a04009c1 "ROLLBACK /* QNO 22863 CON_ID 12 */ ", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1846 #31 0x000055bb7754ad28 in do_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:1391 #32 0x000055bb776ad791 in do_handle_one_connection (connect=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1402 #33 0x000055bb776ad51e in handle_one_connection (arg=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1308 #34 0x00007f3213bd6494 in start_thread (arg=0x7f3210189700) at pthread_create.c:333 #35 0x00007f3211fbc93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} {noformat:title=10.2 66c14d3a8d31e while hanging} Thread 3 (Thread 0x7faef41c5700 (LWP 32647)): #0 GenericPolicy<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538878 <rw_lock_debug_mutex+56>, mutex=..., filename=0x555abd3a9670 "/data/src/10.2/storage/innobase/sync/sync0debug.cc" , line=1268) at /data/src/10.2/storage/innobase/include/sync0policy.h:349 #1 0x0000555abcd6d6b9 in PolicyMutex<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538840 <rw_lock_debug_mutex>, n_spins=30, n_delay=6, name=0x555abd3a9670 "/data/src/10.2/storage/inn obase/sync/sync0debug.cc", line=1268) at /data/src/10.2/storage/innobase/include/ib0mutex.h:635 #2 0x0000555abce74aa8 in rw_lock_debug_mutex_enter () at /data/src/10.2/storage/innobase/sync/sync0debug.cc:1268 #3 0x0000555abce6cc41 in rw_lock_own (lock=0x555abfef9780, lock_type=4) at /data/src/10.2/storage/innobase/sync/sync0rw.cc:1029 #4 0x0000555abcf2401c in buf_page_get_gen (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, file=0x555abd3b2ed0 "/data/src/10.2/storage/innobase/include/trx0undo.ic", line=180, mtr=0x7faef41c1380, err=0x0) at /data/src/10.2/storage/innobase/buf/buf0buf.cc:4829 #5 0x0000555abce972b2 in trx_undo_page_get_s_latched (page_id=..., mtr=0x7faef41c1380) at /data/src/10.2/storage/innobase/include/trx0undo.ic:179 #6 0x0000555abce9c364 in trx_undo_get_undo_rec_low (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2120 #7 0x0000555abce9c486 in trx_undo_get_undo_rec (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030, trx_id=2572, name=..., undo_rec=0x7faef41c1950) at /data/src/10.2/storage/inno base/trx/trx0rec.cc:2158 #8 0x0000555abce9c6db in trx_undo_prev_version_build (index_rec=0x7faed44fc09b "", index_mtr=0x7faef41c22a0, rec=0x7fae78057d26 "", index=0x7fae78048798, offsets=0x7fae78057d88, heap=0x7fa e78058030, old_vers=0x7faef41c1a40, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2244 #9 0x0000555abce53ad2 in row_vers_old_has_index_entry (also_curr=0, rec=0x7faed44fc09b "", mtr=0x7faef41c22a0, index=0x7fae78048368, ientry=0x7fae78057798, roll_ptr=0, trx_id=0) at /data/src/10.2/storage/innobase/row/row0vers.cc:999 #10 0x0000555abd02c8e9 in row_undo_mod_del_mark_or_remove_sec_low (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798, mode=2) at /data/src/10.2/storage/innobase/row/row0umod.cc:510 #11 0x0000555abd02cc02 in row_undo_mod_del_mark_or_remove_sec (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798) at /data/src/10.2/storage/innobase/row/row0umod.cc:582 #12 0x0000555abd02df86 in row_undo_mod_upd_exist_sec (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1063 #13 0x0000555abd02e63e in row_undo_mod (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1260 #14 0x0000555abce3e324 in row_undo (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:304 #15 0x0000555abce3e472 in row_undo_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:352 #16 0x0000555abcda1679 in que_thr_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1047 #17 0x0000555abcda1893 in que_run_threads_low (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1111 #18 0x0000555abcda1a3c in que_run_threads (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1151 #19 0x0000555abce9f233 in trx_rollback_to_savepoint_low (trx=0x7faee0b567e8, savept=0x0) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:112 #20 0x0000555abce9f59d in trx_rollback_for_mysql_low (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:174 #21 0x0000555abce9f87b in trx_rollback_for_mysql (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:202 #22 0x0000555abccb023f in innobase_rollback (hton=0x555abf7542a0, thd=0x7fae78000b00, rollback_trx=true) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:4810 #23 0x0000555abc9a4449 in ha_rollback_trans (thd=0x7fae78000b00, all=true) at /data/src/10.2/sql/handler.cc:1672 #24 0x0000555abc88e299 in trans_rollback (thd=0x7fae78000b00) at /data/src/10.2/sql/transaction.cc:415 #25 0x0000555abc736a08 in mysql_execute_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:5610 #26 0x0000555abc73d496 in mysql_parse (thd=0x7fae78000b00, rawbuf=0x7fae78013288 "ROLLBACK /* QNO 3689 CON_ID 12 */", length=33, parser_state=0x7faef41c4250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7924 #27 0x0000555abc72b32b in dispatch_command (command=COM_QUERY, thd=0x7fae78000b00, packet=0x7fae78008851 "ROLLBACK /* QNO 3689 CON_ID 12 */ ", packet_length=34, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1820 #28 0x0000555abc729c8e in do_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:1374 #29 0x0000555abc878694 in do_handle_one_connection (connect=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1335 #30 0x0000555abc878421 in handle_one_connection (arg=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1241 #31 0x00007faef81e4494 in start_thread (arg=0x7faef41c5700) at pthread_create.c:333 #32 0x00007faef65ca93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} All threads for both servers are attached. For a note, I've seen the assertion failure on 10.2 before in my random tests, but it isn't happening here, the server always hangs instead. To reproduce: {noformat} git clone https://github.com/elenst/rqg --branch=mdev15374 rqg-mdev15374 cd rqg-mdev15374 {noformat} Further, if you want the test to start the server (on port 19300 by default), run the test and then stop the server if it doesn't crash before: {noformat} perl ./runall-new.pl --duration=350 --threads=1 --grammar=./mdev15374.yy --skip-gendata --vardir=/dev/shm/vardir {noformat} Or, if you already have the server running, e.g. on port 3306, then {noformat} perl ./gentest.pl --duration=350 --threads=1 --queries=100M --grammar=./mdev15374.yy --dsn="dbi:mysql:user=root:host=127.0.0.1:port=3306:database=test" {noformat} If you are running the test on 10.3, it is expected to crash very fast. If you are running it on 10.2, check the processlist, as soon as it starts saying something like {noformat} +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 | | 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 | | 16 | root | localhost:54026 | test | Query | 75 | init | ROLLBACK /* QNO 26430 CON_ID 16 */ | 0.000 | | 17 | root | localhost:53639 | NULL | Query | 0 | init | show processlist | 0.000 | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ {noformat} you have hit the problem. The test will eventually abort and complain, but it will take long time, because it optimistically waits for the server to wake up, while in this case the failure, when it happens, happens very fast. In case you don't want to clone the dedicated RQG tree, here is the grammar: {noformat} query_init: CREATE TEMPORARY TABLE t1 (a INT, key (a)); INSERT INTO t1 VALUES (1),(2) ; CREATE TEMPORARY TABLE t2 (a INT, key (a)); INSERT INTO t2 VALUES (1),(2) ; query: transaction | UPDATE table_name SET a = _digit | ; table_name: t1 | t2 ; transaction: START TRANSACTION | ROLLBACK ; {noformat} Non-debug stack trace for the reference: {noformat:title=10.3 non-debug 560743198604caf} #2 <signal handler called> #3 0x00007f4bff883f0f in __memmove_avx_unaligned_erms () from /lib/x86_64-linux-gnu/libc.so.6 #4 0x000055819f3b2726 in memcpy (__len=18446744073709539341, __src=0x7f4bd8706ff3, __dest=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string3.h:53 #5 mem_heap_dup (len=18446744073709539341, data=0x7f4bd8706ff3, heap=0x7f4b9402d040) at /data/src/10.3/storage/innobase/include/mem0mem.h:306 #6 trx_undo_rec_copy (heap=0x7f4b9402d040, undo_rec=0x7f4bd8706ff3 <error: Cannot access memory at address 0x7f4bd8706ff3>) at /data/src/10.3/storage/innobase/include/trx0rec.ic:70 #7 trx_undo_get_undo_rec_low (roll_ptr=<optimized out>, is_temp=<optimized out>, heap=0x7f4b9402d040) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #8 0x000055819f3b2ad1 in trx_undo_get_undo_rec (undo_rec=<optimized out>, name=..., trx_id=<optimized out>, heap=<optimized out>, is_temp=<optimized out>, roll_ptr=<optimized out>) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #9 trx_undo_prev_version_build (index_rec=0x7f4a8f91c020 "", index_rec@entry=0x7f4bd851009b <error: Cannot access memory at address 0x7f4bd851009b>, index_mtr=0x7f4be0020f93, index_mtr@entry=0x7f4bf117cf80, rec=0x7f4b9402cd36 "", index=0x7f4b9416c2a0, offsets=0xffffffffffffffe0, offsets@entry=0x7f4b9402cd50, heap=0x0, old_vers=0x7f4bf117c760, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #10 0x000055819f385ca2 in row_vers_old_has_index_entry (also_curr=also_curr@entry=0, rec=0x7f4bd851009b <error: Cannot access memory at address 0x7f4bd851009b>, mtr=mtr@entry=0x7f4bf117cf80, index=index@entry=0x7f4b9416cc10, ientry=ientry@entry=0x7f4b9402c7b0, roll_ptr=roll_ptr@entry=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:1010 #11 0x000055819f4d2889 in row_undo_mod_del_mark_or_remove_sec_low (node=node@entry=0x7f4b9402bef0, thr=thr@entry=0x7f4b94025328, index=index@entry=0x7f4b9416cc10, entry=entry@entry=0x7f4b9402c7b0, mode=mode@entry=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:510 #12 0x000055819f4d30c1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f4b9402bef0, thr=0x7f4b94025328, index=0x7f4b9416cc10, entry=0x7f4b9402c7b0) at /data/src/10.3/storage/innobase/row/row0umod.cc:582 #13 0x000055819f4d3a50 in row_undo_mod_upd_exist_sec (thr=<optimized out>, node=<optimized out>) at /data/src/10.3/storage/innobase/row/row0umod.cc:1062 #14 row_undo_mod (node=0x7f4b9402bef0, thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/row/row0umod.cc:1280 #15 0x000055819f37b835 in row_undo (thr=0x7f4b94025328, node=0x7f4b9402bef0) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #16 row_undo_step (thr=thr@entry=0x7f4b94025328) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #17 0x000055819f3254bf in que_thr_step (thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #18 que_run_threads_low (thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #19 que_run_threads (thr=<optimized out>) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #20 0x000055819f3ba6b8 in trx_rollback_to_savepoint_low (trx=trx@entry=0x7f4bf32156e8, savept=savept@entry=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #21 0x000055819f3bac88 in trx_rollback_for_mysql_low (trx=0x7f4bf32156e8) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #22 trx_rollback_for_mysql (trx=trx@entry=0x7f4bf32156e8) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:290 #23 0x000055819f2966e8 in innobase_rollback (hton=<optimized out>, thd=0x7f4b940009a8, rollback_trx=<optimized out>) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4628 #24 0x000055819f09a491 in ha_rollback_trans (thd=thd@entry=0x7f4b940009a8, all=all@entry=true) at /data/src/10.3/sql/handler.cc:1721 #25 0x000055819efb15b4 in trans_rollback (thd=0x7f4b940009a8) at /data/src/10.3/sql/transaction.cc:422 #26 0x000055819eecf522 in mysql_execute_command (thd=0x7f4b940009a8) at /data/src/10.3/sql/sql_parse.cc:5829 #27 0x000055819eed5c2d in mysql_parse (thd=0x7f4b940009a8, rawbuf=<optimized out>, length=34, parser_state=0x7f4bf117f630, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:8001 #28 0x000055819eed853f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f4b940009a8, packet=packet@entry=0x7f4b94009319 "ROLLBACK /* QNO 16481 CON_ID 12 */ ", packet_length=packet_length@entry=35, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1846 #29 0x000055819eed8db6 in do_command (thd=0x7f4b940009a8) at /data/src/10.3/sql/sql_parse.cc:1391 #30 0x000055819efa5454 in do_handle_one_connection (connect=connect@entry=0x5581a1b58dc8) at /data/src/10.3/sql/sql_connect.cc:1402 #31 0x000055819efa55f4 in handle_one_connection (arg=0x5581a1b58dc8) at /data/src/10.3/sql/sql_connect.cc:1308 #32 0x00007f4c0145d494 in start_thread (arg=0x7f4bf1180700) at pthread_create.c:333 #33 0x00007f4bff84393f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} |
The RQG test provided below represents simple non-concurrent one-thread flow consisting of updates on temporary InnoDB tables, followed by rollbacks. Very soon (for me it happens within the first minute of the test) one of ROLLBACKs causes an assertion failure on 10.3 or hangs on 10.2. For 10.3, even one table is enough, 10.2 seems to need two tables, so the grammar has two tables.
10.1 does not hang or crash. {noformat:title=10.3 fa68b88b5d415} mysqld: /data/src/10.3/storage/innobase/include/trx0rec.ic:68: trx_undo_rec_t* trx_undo_rec_copy(const trx_undo_rec_t*, mem_heap_t*): Assertion `len < ((ulint) srv_page_size)' failed. 180419 0:27:25 [ERROR] mysqld got signal 6 ; #7 0x00007f3211effee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x000055bb77d5623e in trx_undo_rec_copy (undo_rec=0x7f31f072f041 "", heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/include/trx0rec.ic:68 #9 0x000055bb77d5d45b in trx_undo_get_undo_rec_low (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #10 0x000055bb77d5d54b in trx_undo_get_undo_rec (roll_ptr=35184372105949249, is_temp=true, heap=0x7f31a04e0e90, trx_id=5480, name=..., undo_rec=0x7f3210185be0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #11 0x000055bb77d5d82c in trx_undo_prev_version_build (index_rec=0x7f31f052809b "", index_mtr=0x7f3210186520, rec=0x7f31a04e0b8e "", index=0x7f31a02a4f78, offsets=0x7f31a04e0bf0, heap=0x7f31a04e0e90, old_vers=0x7f3210185cd0, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #12 0x000055bb77d14702 in row_vers_old_has_index_entry (also_curr=0, rec=0x7f31f052809b "", mtr=0x7f3210186520, index=0x7f31a02a4ad8, ientry=0x7f31a04e05f8, roll_ptr=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:987 #13 0x000055bb77f03e4b in row_undo_mod_del_mark_or_remove_sec_low (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8, mode=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:544 #14 0x000055bb77f041a1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958, index=0x7f31a02a4ad8, entry=0x7f31a04e05f8) at /data/src/10.3/storage/innobase/row/row0umod.cc:616 #15 0x000055bb77f055f1 in row_undo_mod_upd_exist_sec (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1096 #16 0x000055bb77f05edd in row_undo_mod (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0umod.cc:1314 #17 0x000055bb77cfe36f in row_undo (node=0x7f31a04dfb28, thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #18 0x000055bb77cfe551 in row_undo_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #19 0x000055bb77c4f65a in que_thr_step (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #20 0x000055bb77c4f8a9 in que_run_threads_low (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #21 0x000055bb77c4fa9a in que_run_threads (thr=0x7f31a04df958) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #22 0x000055bb77d5ff2e in trx_rollback_to_savepoint_low (trx=0x7f3210268828, savept=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #23 0x000055bb77d6039c in trx_rollback_for_mysql_low (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #24 0x000055bb77d606db in trx_rollback_for_mysql (trx=0x7f3210268828) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:240 #25 0x000055bb77b497c3 in innobase_rollback (hton=0x55bb7af9c420, thd=0x7f31a0000b00, rollback_trx=true) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4632 #26 0x000055bb77834907 in ha_rollback_trans (thd=0x7f31a0000b00, all=true) at /data/src/10.3/sql/handler.cc:1721 #27 0x000055bb776c147d in trans_rollback (thd=0x7f31a0000b00) at /data/src/10.3/sql/transaction.cc:422 #28 0x000055bb77558739 in mysql_execute_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:5829 #29 0x000055bb7755eb06 in mysql_parse (thd=0x7f31a0000b00, rawbuf=0x7f31a0015ae8 "ROLLBACK /* QNO 22863 CON_ID 12 */", length=34, parser_state=0x7f3210188620, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8001 #30 0x000055bb7754c2e9 in dispatch_command (command=COM_QUERY, thd=0x7f31a0000b00, packet=0x7f31a04009c1 "ROLLBACK /* QNO 22863 CON_ID 12 */ ", packet_length=35, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1846 #31 0x000055bb7754ad28 in do_command (thd=0x7f31a0000b00) at /data/src/10.3/sql/sql_parse.cc:1391 #32 0x000055bb776ad791 in do_handle_one_connection (connect=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1402 #33 0x000055bb776ad51e in handle_one_connection (arg=0x55bb7bb65860) at /data/src/10.3/sql/sql_connect.cc:1308 #34 0x00007f3213bd6494 in start_thread (arg=0x7f3210189700) at pthread_create.c:333 #35 0x00007f3211fbc93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} {noformat:title=10.2 66c14d3a8d31e while hanging} Thread 3 (Thread 0x7faef41c5700 (LWP 32647)): #0 GenericPolicy<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538878 <rw_lock_debug_mutex+56>, mutex=..., filename=0x555abd3a9670 "/data/src/10.2/storage/innobase/sync/sync0debug.cc" , line=1268) at /data/src/10.2/storage/innobase/include/sync0policy.h:349 #1 0x0000555abcd6d6b9 in PolicyMutex<OSTrackMutex<GenericPolicy> >::enter (this=0x555abe538840 <rw_lock_debug_mutex>, n_spins=30, n_delay=6, name=0x555abd3a9670 "/data/src/10.2/storage/inn obase/sync/sync0debug.cc", line=1268) at /data/src/10.2/storage/innobase/include/ib0mutex.h:635 #2 0x0000555abce74aa8 in rw_lock_debug_mutex_enter () at /data/src/10.2/storage/innobase/sync/sync0debug.cc:1268 #3 0x0000555abce6cc41 in rw_lock_own (lock=0x555abfef9780, lock_type=4) at /data/src/10.2/storage/innobase/sync/sync0rw.cc:1029 #4 0x0000555abcf2401c in buf_page_get_gen (page_id=..., page_size=..., rw_latch=1, guess=0x0, mode=10, file=0x555abd3b2ed0 "/data/src/10.2/storage/innobase/include/trx0undo.ic", line=180, mtr=0x7faef41c1380, err=0x0) at /data/src/10.2/storage/innobase/buf/buf0buf.cc:4829 #5 0x0000555abce972b2 in trx_undo_page_get_s_latched (page_id=..., mtr=0x7faef41c1380) at /data/src/10.2/storage/innobase/include/trx0undo.ic:179 #6 0x0000555abce9c364 in trx_undo_get_undo_rec_low (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2120 #7 0x0000555abce9c486 in trx_undo_get_undo_rec (roll_ptr=1970324846346556, is_temp=true, heap=0x7fae78058030, trx_id=2572, name=..., undo_rec=0x7faef41c1950) at /data/src/10.2/storage/inno base/trx/trx0rec.cc:2158 #8 0x0000555abce9c6db in trx_undo_prev_version_build (index_rec=0x7faed44fc09b "", index_mtr=0x7faef41c22a0, rec=0x7fae78057d26 "", index=0x7fae78048798, offsets=0x7fae78057d88, heap=0x7fa e78058030, old_vers=0x7faef41c1a40, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.2/storage/innobase/trx/trx0rec.cc:2244 #9 0x0000555abce53ad2 in row_vers_old_has_index_entry (also_curr=0, rec=0x7faed44fc09b "", mtr=0x7faef41c22a0, index=0x7fae78048368, ientry=0x7fae78057798, roll_ptr=0, trx_id=0) at /data/src/10.2/storage/innobase/row/row0vers.cc:999 #10 0x0000555abd02c8e9 in row_undo_mod_del_mark_or_remove_sec_low (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798, mode=2) at /data/src/10.2/storage/innobase/row/row0umod.cc:510 #11 0x0000555abd02cc02 in row_undo_mod_del_mark_or_remove_sec (node=0x7fae78056ca8, thr=0x7fae78056af0, index=0x7fae78048368, entry=0x7fae78057798) at /data/src/10.2/storage/innobase/row/row0umod.cc:582 #12 0x0000555abd02df86 in row_undo_mod_upd_exist_sec (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1063 #13 0x0000555abd02e63e in row_undo_mod (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0umod.cc:1260 #14 0x0000555abce3e324 in row_undo (node=0x7fae78056ca8, thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:304 #15 0x0000555abce3e472 in row_undo_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/row/row0undo.cc:352 #16 0x0000555abcda1679 in que_thr_step (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1047 #17 0x0000555abcda1893 in que_run_threads_low (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1111 #18 0x0000555abcda1a3c in que_run_threads (thr=0x7fae78056af0) at /data/src/10.2/storage/innobase/que/que0que.cc:1151 #19 0x0000555abce9f233 in trx_rollback_to_savepoint_low (trx=0x7faee0b567e8, savept=0x0) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:112 #20 0x0000555abce9f59d in trx_rollback_for_mysql_low (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:174 #21 0x0000555abce9f87b in trx_rollback_for_mysql (trx=0x7faee0b567e8) at /data/src/10.2/storage/innobase/trx/trx0roll.cc:202 #22 0x0000555abccb023f in innobase_rollback (hton=0x555abf7542a0, thd=0x7fae78000b00, rollback_trx=true) at /data/src/10.2/storage/innobase/handler/ha_innodb.cc:4810 #23 0x0000555abc9a4449 in ha_rollback_trans (thd=0x7fae78000b00, all=true) at /data/src/10.2/sql/handler.cc:1672 #24 0x0000555abc88e299 in trans_rollback (thd=0x7fae78000b00) at /data/src/10.2/sql/transaction.cc:415 #25 0x0000555abc736a08 in mysql_execute_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:5610 #26 0x0000555abc73d496 in mysql_parse (thd=0x7fae78000b00, rawbuf=0x7fae78013288 "ROLLBACK /* QNO 3689 CON_ID 12 */", length=33, parser_state=0x7faef41c4250, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7924 #27 0x0000555abc72b32b in dispatch_command (command=COM_QUERY, thd=0x7fae78000b00, packet=0x7fae78008851 "ROLLBACK /* QNO 3689 CON_ID 12 */ ", packet_length=34, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1820 #28 0x0000555abc729c8e in do_command (thd=0x7fae78000b00) at /data/src/10.2/sql/sql_parse.cc:1374 #29 0x0000555abc878694 in do_handle_one_connection (connect=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1335 #30 0x0000555abc878421 in handle_one_connection (arg=0x555ac0245720) at /data/src/10.2/sql/sql_connect.cc:1241 #31 0x00007faef81e4494 in start_thread (arg=0x7faef41c5700) at pthread_create.c:333 #32 0x00007faef65ca93f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} All threads for both servers are attached. For a note, I've seen the assertion failure on 10.2 before in my random tests, but it isn't happening here, the server always hangs instead. To reproduce: {noformat} git clone https://github.com/elenst/rqg --branch=mdev15374 rqg-mdev15374 cd rqg-mdev15374 {noformat} Further, if you want the test to start the server (on port 19300 by default), run the test and then stop the server if it doesn't crash before: {noformat} perl ./runall-new.pl --duration=350 --threads=1 --grammar=./mdev15374.yy --skip-gendata --vardir=/dev/shm/vardir {noformat} Or, if you already have the server running, e.g. on port 3306, then {noformat} perl ./gentest.pl --duration=350 --threads=1 --queries=100M --grammar=./mdev15374.yy --dsn="dbi:mysql:user=root:host=127.0.0.1:port=3306:database=test" {noformat} If you are running the test on 10.3, it is expected to crash very fast. If you are running it on 10.2, check the processlist, as soon as it starts saying something like {noformat} +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ | 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 4 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 | | 1 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 | | 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 | | 16 | root | localhost:54026 | test | Query | 75 | init | ROLLBACK /* QNO 26430 CON_ID 16 */ | 0.000 | | 17 | root | localhost:53639 | NULL | Query | 0 | init | show processlist | 0.000 | +----+-------------+-----------------+------+---------+------+--------------------------+------------------------------------+----------+ {noformat} you have hit the problem. InnoDB will eventually abort with long semaphore wait and the test will complain, but it will take long time, because it optimistically waits for the server to wake up, while in this case the failure, when it happens, happens very fast. In case you don't want to clone the dedicated RQG tree, here is the grammar: {noformat} query_init: CREATE TEMPORARY TABLE t1 (a INT, key (a)); INSERT INTO t1 VALUES (1),(2) ; CREATE TEMPORARY TABLE t2 (a INT, key (a)); INSERT INTO t2 VALUES (1),(2) ; query: transaction | UPDATE table_name SET a = _digit | ; table_name: t1 | t2 ; transaction: START TRANSACTION | ROLLBACK ; {noformat} Non-debug stack trace for the reference: {noformat:title=10.3 non-debug 560743198604caf} #2 <signal handler called> #3 0x00007f4bff883f0f in __memmove_avx_unaligned_erms () from /lib/x86_64-linux-gnu/libc.so.6 #4 0x000055819f3b2726 in memcpy (__len=18446744073709539341, __src=0x7f4bd8706ff3, __dest=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string3.h:53 #5 mem_heap_dup (len=18446744073709539341, data=0x7f4bd8706ff3, heap=0x7f4b9402d040) at /data/src/10.3/storage/innobase/include/mem0mem.h:306 #6 trx_undo_rec_copy (heap=0x7f4b9402d040, undo_rec=0x7f4bd8706ff3 <error: Cannot access memory at address 0x7f4bd8706ff3>) at /data/src/10.3/storage/innobase/include/trx0rec.ic:70 #7 trx_undo_get_undo_rec_low (roll_ptr=<optimized out>, is_temp=<optimized out>, heap=0x7f4b9402d040) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2175 #8 0x000055819f3b2ad1 in trx_undo_get_undo_rec (undo_rec=<optimized out>, name=..., trx_id=<optimized out>, heap=<optimized out>, is_temp=<optimized out>, roll_ptr=<optimized out>) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2211 #9 trx_undo_prev_version_build (index_rec=0x7f4a8f91c020 "", index_rec@entry=0x7f4bd851009b <error: Cannot access memory at address 0x7f4bd851009b>, index_mtr=0x7f4be0020f93, index_mtr@entry=0x7f4bf117cf80, rec=0x7f4b9402cd36 "", index=0x7f4b9416c2a0, offsets=0xffffffffffffffe0, offsets@entry=0x7f4b9402cd50, heap=0x0, old_vers=0x7f4bf117c760, v_heap=0x0, vrow=0x0, v_status=0) at /data/src/10.3/storage/innobase/trx/trx0rec.cc:2297 #10 0x000055819f385ca2 in row_vers_old_has_index_entry (also_curr=also_curr@entry=0, rec=0x7f4bd851009b <error: Cannot access memory at address 0x7f4bd851009b>, mtr=mtr@entry=0x7f4bf117cf80, index=index@entry=0x7f4b9416cc10, ientry=ientry@entry=0x7f4b9402c7b0, roll_ptr=roll_ptr@entry=0, trx_id=0) at /data/src/10.3/storage/innobase/row/row0vers.cc:1010 #11 0x000055819f4d2889 in row_undo_mod_del_mark_or_remove_sec_low (node=node@entry=0x7f4b9402bef0, thr=thr@entry=0x7f4b94025328, index=index@entry=0x7f4b9416cc10, entry=entry@entry=0x7f4b9402c7b0, mode=mode@entry=2) at /data/src/10.3/storage/innobase/row/row0umod.cc:510 #12 0x000055819f4d30c1 in row_undo_mod_del_mark_or_remove_sec (node=0x7f4b9402bef0, thr=0x7f4b94025328, index=0x7f4b9416cc10, entry=0x7f4b9402c7b0) at /data/src/10.3/storage/innobase/row/row0umod.cc:582 #13 0x000055819f4d3a50 in row_undo_mod_upd_exist_sec (thr=<optimized out>, node=<optimized out>) at /data/src/10.3/storage/innobase/row/row0umod.cc:1062 #14 row_undo_mod (node=0x7f4b9402bef0, thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/row/row0umod.cc:1280 #15 0x000055819f37b835 in row_undo (thr=0x7f4b94025328, node=0x7f4b9402bef0) at /data/src/10.3/storage/innobase/row/row0undo.cc:308 #16 row_undo_step (thr=thr@entry=0x7f4b94025328) at /data/src/10.3/storage/innobase/row/row0undo.cc:362 #17 0x000055819f3254bf in que_thr_step (thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/que/que0que.cc:1049 #18 que_run_threads_low (thr=0x7f4b94025328) at /data/src/10.3/storage/innobase/que/que0que.cc:1113 #19 que_run_threads (thr=<optimized out>) at /data/src/10.3/storage/innobase/que/que0que.cc:1153 #20 0x000055819f3ba6b8 in trx_rollback_to_savepoint_low (trx=trx@entry=0x7f4bf32156e8, savept=savept@entry=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:145 #21 0x000055819f3bac88 in trx_rollback_for_mysql_low (trx=0x7f4bf32156e8) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:214 #22 trx_rollback_for_mysql (trx=trx@entry=0x7f4bf32156e8) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:290 #23 0x000055819f2966e8 in innobase_rollback (hton=<optimized out>, thd=0x7f4b940009a8, rollback_trx=<optimized out>) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4628 #24 0x000055819f09a491 in ha_rollback_trans (thd=thd@entry=0x7f4b940009a8, all=all@entry=true) at /data/src/10.3/sql/handler.cc:1721 #25 0x000055819efb15b4 in trans_rollback (thd=0x7f4b940009a8) at /data/src/10.3/sql/transaction.cc:422 #26 0x000055819eecf522 in mysql_execute_command (thd=0x7f4b940009a8) at /data/src/10.3/sql/sql_parse.cc:5829 #27 0x000055819eed5c2d in mysql_parse (thd=0x7f4b940009a8, rawbuf=<optimized out>, length=34, parser_state=0x7f4bf117f630, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:8001 #28 0x000055819eed853f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f4b940009a8, packet=packet@entry=0x7f4b94009319 "ROLLBACK /* QNO 16481 CON_ID 12 */ ", packet_length=packet_length@entry=35, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1846 #29 0x000055819eed8db6 in do_command (thd=0x7f4b940009a8) at /data/src/10.3/sql/sql_parse.cc:1391 #30 0x000055819efa5454 in do_handle_one_connection (connect=connect@entry=0x5581a1b58dc8) at /data/src/10.3/sql/sql_connect.cc:1402 #31 0x000055819efa55f4 in handle_one_connection (arg=0x5581a1b58dc8) at /data/src/10.3/sql/sql_connect.cc:1308 #32 0x00007f4c0145d494 in start_thread (arg=0x7f4bf1180700) at pthread_create.c:333 #33 0x00007f4bff84393f in clone () from /lib/x86_64-linux-gnu/libc.so.6 {noformat} |
Summary | Server hangs or assertion `len < ((ulint) srv_page_size)' fails in trx_undo_rec_copy upon ROLLBACK on temporary table | Server hangs and aborts with long semaphore wait or assertion `len < ((ulint) srv_page_size)' fails in trx_undo_rec_copy upon ROLLBACK on temporary table |
Labels | affects-tests |
Assignee | Marko Mäkelä [ marko ] | Jan Lindström [ jplindst ] |
Link |
This issue relates to |
Assignee | Jan Lindström [ jplindst ] | Thirunarayanan B [ thiru ] |
Fix Version/s | 10.2.15 [ 23006 ] | |
Fix Version/s | 10.3.7 [ 23005 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Link |
This issue relates to |
Link |
This issue relates to |
Link |
This issue causes |
Workflow | MariaDB v3 [ 85683 ] | MariaDB v4 [ 153839 ] |
MDEV-15826recently fixed a problem with temporary tables. Can this bug be reproduced with that fix present?