Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-21137

Assertion `mode == 16 || mode == 12 || !fix_block->page.file_page_was_freed' failed in buf_page_get_gen

    XMLWordPrintable

Details

    Description

      Note: The assertion is the same as in MDEV-14711, but the stack trace is completely different, so I don't have enough evidence to assume it's the same problem.

      Note: The test case uses versioning, so it's not applicable to 10.2. Possibly the underlying problem exists in 10.2 as well.

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (f1 INT, f2 TEXT, f3 INT, FULLTEXT ftidx(f2), KEY idx (f1), FOREIGN KEY (f3) REFERENCES t1 (f1) ON DELETE SET NULL) WITH SYSTEM VERSIONING ENGINE=InnoDB;
      SET system_versioning_alter_history= KEEP;
      ALTER TABLE t1 DROP KEY ftidx;
      INSERT INTO t1 VALUES (1,REPEAT('a',8193),1), (1,REPEAT('b',8193),1);
      --error ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO
      DELETE FROM t1;
      ALTER TABLE t1 ADD FULLTEXT ftidx(f2);
       
      # Cleanup
      DROP TABLE t1;
      

      10.4 f9528821

      mysqld: /data/src/10.4/storage/innobase/buf/buf0buf.cc:4861: buf_block_t* buf_page_get_gen(page_id_t, ulint, ulint, buf_block_t*, ulint, const char*, unsigned int, mtr_t*, dberr_t*): Assertion `mode == 16 || mode == 12 || !fix_block->page.file_page_was_freed' failed.
      191123 22:02:27 [ERROR] mysqld got signal 6 ;
       
      #6  0x00007f1a8d952e67 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x5557f644ccc8 "mode == 16 || mode == 12 || !fix_block->page.file_page_was_freed", file=file@entry=0x5557f644acb0 "/data/src/10.4/storage/innobase/buf/buf0buf.cc", line=line@entry=4861, function=function@entry=0x5557f6450340 <buf_page_get_gen(page_id_t, unsigned long, unsigned long, buf_block_t*, unsigned long, char const*, unsigned int, mtr_t*, dberr_t*)::__PRETTY_FUNCTION__> "buf_block_t* buf_page_get_gen(page_id_t, ulint, ulint, buf_block_t*, ulint, const char*, unsigned int, mtr_t*, dberr_t*)") at assert.c:92
      #7  0x00007f1a8d952f12 in __GI___assert_fail (assertion=0x5557f644ccc8 "mode == 16 || mode == 12 || !fix_block->page.file_page_was_freed", file=0x5557f644acb0 "/data/src/10.4/storage/innobase/buf/buf0buf.cc", line=4861, function=0x5557f6450340 <buf_page_get_gen(page_id_t, unsigned long, unsigned long, buf_block_t*, unsigned long, char const*, unsigned int, mtr_t*, dberr_t*)::__PRETTY_FUNCTION__> "buf_block_t* buf_page_get_gen(page_id_t, ulint, ulint, buf_block_t*, ulint, const char*, unsigned int, mtr_t*, dberr_t*)") at assert.c:101
      #8  0x00005557f5d23413 in buf_page_get_gen (page_id=..., zip_size=0, rw_latch=1, guess=0x0, mode=10, file=0x5557f6435b50 "/data/src/10.4/storage/innobase/btr/btr0cur.cc", line=8350, mtr=0x7f1a62ffc570, err=0x0) at /data/src/10.4/storage/innobase/buf/buf0buf.cc:4861
      #9  0x00005557f5ced739 in btr_copy_blob_prefix (buf=0x7f1a2c000bd8 "", len=8193, space_id=5, page_no=8, offset=38) at /data/src/10.4/storage/innobase/btr/btr0cur.cc:8350
      #10 0x00005557f5cee229 in btr_copy_externally_stored_field_prefix_low (buf=0x7f1a2c000bd8 "", len=8193, zip_size=0, space_id=5, page_no=8, offset=38) at /data/src/10.4/storage/innobase/btr/btr0cur.cc:8559
      #11 0x00005557f5cee4be in btr_copy_externally_stored_field (len=0x7f1a62ffcc18, data=0x7f1a38152cf0 "", zip_size=0, local_len=0, heap=0x7f1a2c0008c0) at /data/src/10.4/storage/innobase/btr/btr0cur.cc:8665
      #12 0x00005557f5b70e61 in fts_parallel_tokenization (arg=0x7f1a38150130) at /data/src/10.4/storage/innobase/row/row0ftsort.cc:837
      #13 0x00007f1a8f4c84a4 in start_thread (arg=0x7f1a62ffd700) at pthread_create.c:456
      #14 0x00007f1a8da0fd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible on 10.3-10.5.
      No crash on a non-debug build, instead it fails with

      DROP TABLE t1;
      bug.buf1 'innodb'                        [ fail ]  Found warnings/errors in server log file!
              Test ended at 2019-11-23 22:05:09
      line
      2019-11-23 22:05:09 9 [ERROR] InnoDB: Duplicate FTS_DOC_ID value on table `test`.`t1`
      ^ Found warnings in /data/bld/10.4-rel-nightly/mysql-test/var/log/mysqld.1.err
      ok
      

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.