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

InnoDB fails to apply the redo log to page_compressed tablespace

    XMLWordPrintable

Details

    Description

      Alter table rebuild fails when it fails to read the externally stored colum
      for the compressed tablespace. Before alter operation, InnoDB just started
      after crash recovery. This could lead some issue in crash recovery.

      While analysing the recovery, InnoDB fails to apply the redo log for compressed tablespace.
      The reason is that InnoDB assumes that pages has been freed while applying
      the redo log for it. Problematic page has been freed and reinitialize multiple
      times. InnoDB needs to do multiple scan due to small buffer pool size.
      InnoDB stores the freed page information only when we don't run out
      of buffer pool. But InnoDB assigns the freed page ranges even though
      we don't have complete freed range information.

      This issue should persist from 10.5 onwards.

      Crash happens due to skip of redo log apply:

      #3  0x00007ffff7842476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #4  0x00007ffff78287f3 in __GI_abort () at ./stdlib/abort.c:79
      #5  0x0000555556a600b9 in ut_dbg_assertion_failed (expr=0x5555572ef4a9 "buf != field_ref_zero", 
          file=0x5555572eef38 "/home/thiru/mariadb_parent/server/11.0/storage/innobase/row/row0merge.cc", line=781)
          at /home/thiru/mariadb_parent/server/11.0/storage/innobase/ut/ut0dbg.cc:60
      #6  0x000055555698586d in row_merge_buf_add (buf=0x7fffa001f638, fts_index=0x0, old_table=0x5555588e7df8, new_table=0x7fffa002f798, 
          psort_info=0x0, row=0x7fffa00ae778, ext=0x7fffa00ae888, doc_id=0x7ffff40745a8, conv_heap=0x0, err=0x7ffff4074590, 
          v_heap=0x7ffff40745a0, my_table=0x7ffff4075dc0, trx=0x7ffff4bc7b80, col_collate=0x0)
          at /home/thiru/mariadb_parent/server/11.0/storage/innobase/row/row0merge.cc:781
      #7  0x000055555698d19f in row_merge_read_clustered_index (trx=0x7ffff4bc7b80, table=0x7ffff4075dc0, old_table=0x5555588e7df8, 
          new_table=0x7fffa002f798, online=true, index=0x7fffa002f4d8, fts_sort_idx=0x0, psort_info=0x0, files=0x7fffa00315b8, 
          key_numbers=0x7fffa002f4e0, n_index=1, defaults=0x0, add_v=0x0, col_map=0x7fffa002f640, add_autoinc=18446744073709551615, sequence=..., 
          block=0x7fffe0149000 "", skip_pk_sort=true, tmpfd=0x7ffff4074ef0, stage=0x7fffa0025498, pct_cost=50, crypt_block=0x0, 
          eval_table=0x7ffff4075dc0, allow_not_null=false, col_collate=0x0)
          at /home/thiru/mariadb_parent/server/11.0/storage/innobase/row/row0merge.cc:2567
      #8  0x0000555556994cc8 in row_merge_build_indexes (trx=0x7ffff4bc7b80, old_table=0x5555588e7df8, new_table=0x7fffa002f798, online=true, 
          indexes=0x7fffa002f4d8, key_numbers=0x7fffa002f4e0, n_indexes=1, table=0x7ffff4075dc0, defaults=0x0, col_map=0x7fffa002f640, 
          add_autoinc=18446744073709551615, sequence=..., skip_pk_sort=true, stage=0x7fffa0025498, add_v=0x0, eval_table=0x7ffff4075dc0, 
          allow_not_null=false, col_collate=0x0) at /home/thiru/mariadb_parent/server/11.0/storage/innobase/row/row0merge.cc:4777
      #9  0x000055555682a4c4 in ha_innobase::inplace_alter_table (this=0x7fffa001d4f0, altered_table=0x7ffff4075dc0, ha_alter_info=0x7ffff4075d00)
          at /home/thiru/mariadb_parent/server/11.0/storage/innobase/handler/handler0alter.cc:8827
      #10 0x00005555560ee9c1 in handler::ha_inplace_alter_table (this=0x7fffa001d4f0, altered_table=0x7ffff4075dc0, ha_alter_info=0x7ffff4075d00)
          at /home/thiru/mariadb_parent/server/11.0/sql/handler.h:4879
      #11 0x00005555560ddab1 in mysql_inplace_alter_table (thd=0x7fffa0000d58, table_list=0x7fffa0013570, table=0x7fffa001a148, 
          altered_table=0x7ffff4075dc0, ha_alter_info=0x7ffff4075d00, target_mdl_request=0x7ffff4076620, ddl_log_state=0x7ffff4075ca0, 
          trigger_param=0x7ffff40761c0, alter_ctx=0x7ffff4077250, partial_alter=@0x7ffff4075ba6: false, start_alter_id=@0x7ffff4075be0: 0, 
          if_exists=false) at /home/thiru/mariadb_parent/server/11.0/sql/sql_table.cc:7871
      #12 0x00005555560e7d58 in mysql_alter_table (thd=0x7fffa0000d58, new_db=0x7fffa0005ad0, new_name=0x7fffa0005f30, 
          create_info=0x7ffff4078100, table_list=0x7fffa0013570, recreate_info=0x7ffff4077f50, alter_info=0x7ffff4077f90, order_num=0, order=0x0, 
          ignore=false, if_exists=false) at /home/thiru/mariadb_parent/server/11.0/sql/sql_table.cc:11076
      #13 0x00005555561a4f88 in Sql_cmd_alter_table::execute (this=0x7fffa0013c88, thd=0x7fffa0000d58)
          at /home/thiru/mariadb_parent/server/11.0/sql/sql_alter.cc:688
      #14 0x0000555555fb8543 in mysql_execute_command (thd=0x7fffa0000d58, is_called_from_prepared_stmt=false)
          at /home/thiru/mariadb_parent/server/11.0/sql/sql_parse.cc:6125
      --Type <RET> for more, q to quit, c to continue without paging--
      #15 0x0000555555fbe5b8 in mysql_parse (thd=0x7fffa0000d58, rawbuf=0x7fffa0013490 "alter table test.t6 force", length=25, 
          parser_state=0x7ffff40792b0) at /home/thiru/mariadb_parent/server/11.0/sql/sql_parse.cc:8123
      #16 0x0000555555faa4cd in dispatch_command (command=COM_QUERY, thd=0x7fffa0000d58, packet=0x7fffa000b159 "alter table test.t6 force", 
          packet_length=25, blocking=true) at /home/thiru/mariadb_parent/server/11.0/sql/sql_parse.cc:1894
      #17 0x0000555555fa8e83 in do_command (thd=0x7fffa0000d58, blocking=true) at /home/thiru/mariadb_parent/server/11.0/sql/sql_parse.cc:1407
      #18 0x0000555556198fb5 in do_handle_one_connection (connect=0x555558b78608, put_in_cache=true)
          at /home/thiru/mariadb_parent/server/11.0/sql/sql_connect.cc:1415
      #19 0x0000555556198d16 in handle_one_connection (arg=0x555558b78608) at /home/thiru/mariadb_parent/server/11.0/sql/sql_connect.cc:1317
      #20 0x00005555566eea67 in pfs_spawn_thread (arg=0x555558ad6f48) at /home/thiru/mariadb_parent/server/11.0/storage/perfschema/pfs.cc:2201
      #21 0x00007ffff7894ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #22 0x00007ffff7926a40 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attachments

        1. CR-2098.yy
          0.6 kB
        2. CR-2098--MDEV-34156.cfg
          47 kB
        3. data_1.tar.gz
          2.54 MB
        4. encryption_keys.txt
          0.4 kB

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              thiru Thirunarayanan Balathandayuthapani
              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.