[MDEV-14067] Assertion `node->pcur.btr_cur.low_match == node->ref->n_fields' failed Created: 2017-10-14  Updated: 2018-01-18  Resolved: 2018-01-15

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.3
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Elena Stepanova
Resolution: Cannot Reproduce Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-11369 Instant add column for InnoDB Closed

 Description   

10.3 3722372ae56b

mysqld: /data/src/10.3/storage/innobase/row/row0umod.cc:1206: void row_undo_mod_parse_undo_rec(undo_node_t*, ulint): Assertion `node->pcur.btr_cur.low_match == node->ref->n_fields' failed.
171025  3:27:18 [ERROR] mysqld got signal 6 ;
 
#7  0x00007fdee6d44ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x000055d77138cfb3 in row_undo_mod_parse_undo_rec (node=0x7fde8c153058, dict_locked=0) at /data/src/10.3/storage/innobase/row/row0umod.cc:1206
#9  0x000055d77138d212 in row_undo_mod (node=0x7fde8c153058, thr=0x7fde8c038240) at /data/src/10.3/storage/innobase/row/row0umod.cc:1241
#10 0x000055d771172096 in row_undo (node=0x7fde8c153058, thr=0x7fde8c038240) at /data/src/10.3/storage/innobase/row/row0undo.cc:305
#11 0x000055d7711721c2 in row_undo_step (thr=0x7fde8c038240) at /data/src/10.3/storage/innobase/row/row0undo.cc:346
#12 0x000055d7710c27b4 in que_thr_step (thr=0x7fde8c038240) at /data/src/10.3/storage/innobase/que/que0que.cc:1052
#13 0x000055d7710c29fb in que_run_threads_low (thr=0x7fde8c038240) at /data/src/10.3/storage/innobase/que/que0que.cc:1116
#14 0x000055d7710c2bdd in que_run_threads (thr=0x7fde8c038240) at /data/src/10.3/storage/innobase/que/que0que.cc:1156
#15 0x000055d7711d7983 in trx_rollback_to_savepoint_low (trx=0x7fdee0c70878, savept=0x0) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:118
#16 0x000055d7711d7d02 in trx_rollback_for_mysql_low (trx=0x7fdee0c70878) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:180
#17 0x000055d7711d80cd in trx_rollback_low (trx=0x7fdee0c70878) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:212
#18 0x000055d7711d85c3 in trx_rollback_for_mysql (trx=0x7fdee0c70878) at /data/src/10.3/storage/innobase/trx/trx0roll.cc:291
#19 0x000055d770fb6304 in innobase_rollback (hton=0x55d7748bf750, thd=0x7fde8c000b00, rollback_trx=true) at /data/src/10.3/storage/innobase/handler/ha_innodb.cc:4651
#20 0x000055d770c955b2 in ha_rollback_trans (thd=0x7fde8c000b00, all=true) at /data/src/10.3/sql/handler.cc:1679
#21 0x000055d770b38817 in trans_rollback (thd=0x7fde8c000b00) at /data/src/10.3/sql/transaction.cc:415
#22 0x000055d7709d96a1 in mysql_execute_command (thd=0x7fde8c000b00) at /data/src/10.3/sql/sql_parse.cc:5790
#23 0x000055d7709dfa1c in mysql_parse (thd=0x7fde8c000b00, rawbuf=0x7fde8c0149f8 "ROLLBACK", length=8, parser_state=0x7fdee016d610, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7921
#24 0x000055d7709cd1bd in dispatch_command (command=COM_QUERY, thd=0x7fde8c000b00, packet=0x7fde8c08f6d1 "ROLLBACK", packet_length=8, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1819
#25 0x000055d7709cbc1b in do_command (thd=0x7fde8c000b00) at /data/src/10.3/sql/sql_parse.cc:1370
#26 0x000055d770b229f4 in do_handle_one_connection (connect=0x55d774eca040) at /data/src/10.3/sql/sql_connect.cc:1418
#27 0x000055d770b22781 in handle_one_connection (arg=0x55d774eca040) at /data/src/10.3/sql/sql_connect.cc:1324
#28 0x000055d770f9cf4c in pfs_spawn_thread (arg=0x55d774ed2980) at /data/src/10.3/storage/perfschema/pfs.cc:1862
#29 0x00007fdee8c89494 in start_thread (arg=0x7fdee016e700) at pthread_create.c:333
#30 0x00007fdee6e0193f in clone () from /lib/x86_64-linux-gnu/libc.so.6

--source include/have_innodb.inc
 
SET AUTOCOMMIT = 0;
CREATE TABLE IF NOT EXISTS t1 (c VARCHAR(16), PRIMARY KEY (c)) ENGINE = InnoDB;
INSERT INTO t1 VALUES ('foo');
ALTER TABLE t1 ADD COLUMN extra INT;
UPDATE t1 SET extra = 1;
ROLLBACK;
 
# Cleanup
DROP TABLE t1;

Does not fail on 10.2.
No visible effect on non-debug build.



 Comments   
Comment by Marko Mäkelä [ 2018-01-15 ]

I cannot repeat this even after reverting the MDEV-14837 fix. Maybe I fixed this earlier?

Comment by Elena Stepanova [ 2018-01-18 ]

It was fixed by this merge:

commit 866ccc8890a3932e260e43fa5fc7ab8170e6cc3d 159a6c2e608d04732cb678c7691345b9b1dc69b1 1b5f0cbd465f92ffc278a924e765e41413d97420
Merge: 159a6c2 1b5f0cb
Author: Marko Mäkelä <marko.makela@mariadb.com>
Date:   Thu Dec 14 11:34:30 2017 +0200
 
    Merge bb-10.2-ext into 10.3

However, I couldn't narrow down further, because it apparently never failed on bb-10.2-ext, even before these changes, and the patches merged from previous versions don't apply smoothly, so I couldn't roll them back one by one on 10.3 to see which one fixed it. It can be done with some extra effort, but I don't think it's so important, the failure is clearly gone.

Generated at Thu Feb 08 08:10:40 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.