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

InnoDB: Error: trying to access tablespace 11262 page no. 7, InnoDB: but the tablespace does not exist or is just being dropped.

Details

    Description

      Use one of the below test cases few times:

      2015-05-20 20:36:29 7ffa58ff9700  InnoDB: Error: trying to access tablespace 11262 page no. 7,
      InnoDB: but the tablespace does not exist or is just being dropped.
      InnoDB: Error: Unable to read tablespace 11262 page no 7 into the buffer pool after 100 attempts
      InnoDB: The most probable cause of this error may be that the table has been corrupted.
      InnoDB: You can try to fix this problem by using innodb_force_recovery.
      InnoDB: Please see reference manual for more details.
      InnoDB: Aborting...
      2015-05-20 20:36:29 7ffa58ff9700  InnoDB: Assertion failure in thread 140713211696896 in file buf0buf.cc line 2817
       
      #0  0x00007ffa93329621 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
      #1  0x00007ffa95b6909a in my_write_core (sig=6) at /home/jan/mysql/10.1-encryption/mysys/stacktrace.c:456
      #2  0x00007ffa9551609e in handle_fatal_signal (sig=6) at /home/jan/mysql/10.1-encryption/sql/signal_handler.cc:266
      #3  <signal handler called>
      #4  0x00007ffa92983cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
      #5  0x00007ffa929870d8 in __GI_abort () at abort.c:89
      #6  0x00007ffa95a43058 in buf_page_get_gen (space=11262, zip_size=0, offset=7, rw_latch=2, guess=0x0, mode=16, file=0x7ffa95de4180 "/home/jan/mysql/10.1-encryption/storage/xtradb/fil/fil0crypt.cc", line=1812, mtr=0x7ffa58ff88b0) at /home/jan/mysql/10.1-encryption/storage/xtradb/buf/buf0buf.cc:2817
      #7  0x00007ffa95ac2d2d in fil_crypt_get_page_throttle_func (state=0x7ffa58ff8e10, space=11262, zip_size=0, offset=7, mtr=0x7ffa58ff88b0, sleeptime_ms=0x7ffa58ff8868, file=0x7ffa95de4180 "/home/jan/mysql/10.1-encryption/storage/xtradb/fil/fil0crypt.cc", line=1812) at /home/jan/mysql/10.1-encryption/storage/xtradb/fil/fil0crypt.cc:1697
      #8  0x00007ffa95ac309a in fil_crypt_rotate_page (key_state=0x7ffa58ff8e00, state=0x7ffa58ff8e10) at /home/jan/mysql/10.1-encryption/storage/xtradb/fil/fil0crypt.cc:1809
      #9  0x00007ffa95ac35f2 in fil_crypt_rotate_pages (key_state=0x7ffa58ff8e00, state=0x7ffa58ff8e10) at /home/jan/mysql/10.1-encryption/storage/xtradb/fil/fil0crypt.cc:1970
      #10 0x00007ffa95ac3d09 in fil_crypt_thread (arg=0x0) at /home/jan/mysql/10.1-encryption/storage/xtradb/fil/fil0crypt.cc:2193
      #11 0x00007ffa93324182 in start_thread (arg=0x7ffa58ff9700) at pthread_create.c:312
      #12 0x00007ffa92a4747d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
       

      query:
              INSERT IGNORE INTO _table ( _field ) VALUES ( _digit ), ( _digit ), ( _digit ), ( _digit ) |
              DELETE FROM _table WHERE `pk` > _digit LIMIT 4 ;
       
      thread2:
              set_encrypt_option |
              create_or_replace;
       
      set_encrypt_option:
              SET GLOBAL innodb_encrypt_tables = enc_tables |
              SET GLOBAL innodb_encryption_threads = _digit |
              SET GLOBAL innodb_scrub_log_speed = _smallint_unsigned 
      ;
       
      encrypt_on_off:
              ON | OFF ;
       
      enc_tables:
              ON | OFF | 'FORCE' ;
       
      create_or_replace:
              CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM _table ;

      RQG data template enc2.zz

      $tables = {
      	rows => [0, 1, 10 ],
      	pk => [ 'int auto_increment' ]
      };
       
      $fields = {
      	types => [ 'int' ],
      	indexes => [ 'key', undef ]
      };
       
      $data = {
      	numbers => [ 'digit', 'null', undef ],
      	strings => [ 'letter', 'english' ],
      	blobs => [ 'data' ],
      	temporals => ['date', 'year', 'null', undef ]
      }

      RQG command line (use lp:~elenst/randgen/mariadb-patches):

      perl ./runall-new.pl --threads=2 --duration=400 --queries=100M --mysqld=--plugin-load-add=file_key_management.so --mysqld=--file_key_management_filename=<your basedir>/mysql-test/std_data/keys.txt --grammar=enc2.yy --gendata=enc2.zz --mtr-build-thread=73 --basedir1=<your basedir> --vardir1=<your vardir>

      See MDEV-8171 for instructions how to run the same test several times.

      Attachments

        Activity

          jplindst Jan Lindström (Inactive) created issue -
          jplindst Jan Lindström (Inactive) made changes -
          Field Original Value New Value
          Description Use one of the below test cases few times:

          {noformat}
          Thread 1 (Thread 0x7f00a8ff9700 (LWP 9273)):
          #0 0x00007f00ce79c621 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
          #1 0x00007f00d0fd949a in my_write_core (sig=6) at /home/jan/mysql/10.1-encryption/mysys/stacktrace.c:456
          #2 0x00007f00d0986390 in handle_fatal_signal (sig=6) at /home/jan/mysql/10.1-encryption/sql/signal_handler.cc:266
          #3 <signal handler called>
          #4 0x00007f00cddf6cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
          #5 0x00007f00cddfa0d8 in __GI_abort () at abort.c:89
          #6 0x00007f00d0f21a55 in fil_space_get_space (id=2441) at /home/jan/mysql/10.1-encryption/storage/xtradb/fil/fil0fil.cc:1449
          #7 0x00007f00d0f21ca0 in fil_space_get_flags (id=2441) at /home/jan/mysql/10.1-encryption/storage/xtradb/fil/fil0fil.cc:1554
          #8 0x00007f00d0f21cfc in fil_space_get_zip_size (id=2441) at /home/jan/mysql/10.1-encryption/storage/xtradb/fil/fil0fil.cc:1581
          #9 0x00007f00d0e98ab8 in btr_scrub_start_space (space=2441, scrub_data=0x7f00a8ff8e78) at /home/jan/mysql/10.1-encryption/storage/xtradb/btr/btr0scrub.cc:826
          #10 0x00007f00d0f3262d in fil_crypt_space_needs_rotation (state=0x7f00a8ff8e10, key_state=0x7f00a8ff8e00, recheck=0x7f00a8ff8deb) at /home/jan/mysql/10.1-encryption/storage/xtradb/fil/fil0crypt.cc:1347
          #11 0x00007f00d0f32c4f in fil_crypt_find_space_to_rotate (key_state=0x7f00a8ff8e00, state=0x7f00a8ff8e10, recheck=0x7f00a8ff8deb) at /home/jan/mysql/10.1-encryption/storage/xtradb/fil/fil0crypt.cc:1584
          #12 0x00007f00d0f341bf in fil_crypt_thread (arg=0x0) at /home/jan/mysql/10.1-encryption/storage/xtradb/fil/fil0crypt.cc:2239
          #13 0x00007f00ce797182 in start_thread (arg=0x7f00a8ff9700) at pthread_create.c:312
          #14 0x00007f00cdeba47d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
          {noformat}

          {noformat:RQG grammar enc2.yy}
          query:
                  INSERT IGNORE INTO _table ( _field ) VALUES ( _digit ), ( _digit ), ( _digit ), ( _digit ) |
                  DELETE FROM _table WHERE `pk` > _digit LIMIT 4 ;

          thread2:
                  set_encrypt_option |
                  create_or_replace;

          set_encrypt_option:
                  SET GLOBAL innodb_encrypt_tables = enc_tables |
                  SET GLOBAL innodb_encryption_threads = _digit |
                  SET GLOBAL innodb_scrub_log_speed = _smallint_unsigned
          ;

          encrypt_on_off:
                  ON | OFF ;

          enc_tables:
                  ON | OFF | 'FORCE' ;

          create_or_replace:
                  CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM _table ;
          {noformat}

          {noformat:title=RQG data template enc2.zz}
          $tables = {
          rows => [0, 1, 10 ],
          pk => [ 'int auto_increment' ]
          };

          $fields = {
          types => [ 'int' ],
          indexes => [ 'key', undef ]
          };

          $data = {
          numbers => [ 'digit', 'null', undef ],
          strings => [ 'letter', 'english' ],
          blobs => [ 'data' ],
          temporals => ['date', 'year', 'null', undef ]
          }
          {noformat}

          RQG command line (use lp:~elenst/randgen/mariadb-patches):

          {noformat}
          perl ./runall-new.pl --threads=2 --duration=400 --queries=100M --mysqld=--plugin-load-add=file_key_management.so --mysqld=--file_key_management_filename=<your basedir>/mysql-test/std_data/keys.txt --grammar=enc2.yy --gendata=enc2.zz --mtr-build-thread=73 --basedir1=<your basedir> --vardir1=<your vardir>
          {noformat}

          See MDEV-8171 for instructions how to run the same test several times.
          Use one of the below test cases few times:

          {noformat}
          2015-05-20 20:36:29 7ffa58ff9700 InnoDB: Error: trying to access tablespace 11262 page no. 7,
          InnoDB: but the tablespace does not exist or is just being dropped.
          InnoDB: Error: Unable to read tablespace 11262 page no 7 into the buffer pool after 100 attempts
          InnoDB: The most probable cause of this error may be that the table has been corrupted.
          InnoDB: You can try to fix this problem by using innodb_force_recovery.
          InnoDB: Please see reference manual for more details.
          InnoDB: Aborting...
          2015-05-20 20:36:29 7ffa58ff9700 InnoDB: Assertion failure in thread 140713211696896 in file buf0buf.cc line 2817

          #0 0x00007ffa93329621 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
          #1 0x00007ffa95b6909a in my_write_core (sig=6) at /home/jan/mysql/10.1-encryption/mysys/stacktrace.c:456
          #2 0x00007ffa9551609e in handle_fatal_signal (sig=6) at /home/jan/mysql/10.1-encryption/sql/signal_handler.cc:266
          #3 <signal handler called>
          #4 0x00007ffa92983cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
          #5 0x00007ffa929870d8 in __GI_abort () at abort.c:89
          #6 0x00007ffa95a43058 in buf_page_get_gen (space=11262, zip_size=0, offset=7, rw_latch=2, guess=0x0, mode=16, file=0x7ffa95de4180 "/home/jan/mysql/10.1-encryption/storage/xtradb/fil/fil0crypt.cc", line=1812, mtr=0x7ffa58ff88b0) at /home/jan/mysql/10.1-encryption/storage/xtradb/buf/buf0buf.cc:2817
          #7 0x00007ffa95ac2d2d in fil_crypt_get_page_throttle_func (state=0x7ffa58ff8e10, space=11262, zip_size=0, offset=7, mtr=0x7ffa58ff88b0, sleeptime_ms=0x7ffa58ff8868, file=0x7ffa95de4180 "/home/jan/mysql/10.1-encryption/storage/xtradb/fil/fil0crypt.cc", line=1812) at /home/jan/mysql/10.1-encryption/storage/xtradb/fil/fil0crypt.cc:1697
          #8 0x00007ffa95ac309a in fil_crypt_rotate_page (key_state=0x7ffa58ff8e00, state=0x7ffa58ff8e10) at /home/jan/mysql/10.1-encryption/storage/xtradb/fil/fil0crypt.cc:1809
          #9 0x00007ffa95ac35f2 in fil_crypt_rotate_pages (key_state=0x7ffa58ff8e00, state=0x7ffa58ff8e10) at /home/jan/mysql/10.1-encryption/storage/xtradb/fil/fil0crypt.cc:1970
          #10 0x00007ffa95ac3d09 in fil_crypt_thread (arg=0x0) at /home/jan/mysql/10.1-encryption/storage/xtradb/fil/fil0crypt.cc:2193
          #11 0x00007ffa93324182 in start_thread (arg=0x7ffa58ff9700) at pthread_create.c:312
          #12 0x00007ffa92a4747d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

          {noformat}

          {noformat:RQG grammar enc2.yy}
          query:
                  INSERT IGNORE INTO _table ( _field ) VALUES ( _digit ), ( _digit ), ( _digit ), ( _digit ) |
                  DELETE FROM _table WHERE `pk` > _digit LIMIT 4 ;

          thread2:
                  set_encrypt_option |
                  create_or_replace;

          set_encrypt_option:
                  SET GLOBAL innodb_encrypt_tables = enc_tables |
                  SET GLOBAL innodb_encryption_threads = _digit |
                  SET GLOBAL innodb_scrub_log_speed = _smallint_unsigned
          ;

          encrypt_on_off:
                  ON | OFF ;

          enc_tables:
                  ON | OFF | 'FORCE' ;

          create_or_replace:
                  CREATE OR REPLACE TABLE `create_or_replace_t` AS SELECT * FROM _table ;
          {noformat}

          {noformat:title=RQG data template enc2.zz}
          $tables = {
          rows => [0, 1, 10 ],
          pk => [ 'int auto_increment' ]
          };

          $fields = {
          types => [ 'int' ],
          indexes => [ 'key', undef ]
          };

          $data = {
          numbers => [ 'digit', 'null', undef ],
          strings => [ 'letter', 'english' ],
          blobs => [ 'data' ],
          temporals => ['date', 'year', 'null', undef ]
          }
          {noformat}

          RQG command line (use lp:~elenst/randgen/mariadb-patches):

          {noformat}
          perl ./runall-new.pl --threads=2 --duration=400 --queries=100M --mysqld=--plugin-load-add=file_key_management.so --mysqld=--file_key_management_filename=<your basedir>/mysql-test/std_data/keys.txt --grammar=enc2.yy --gendata=enc2.zz --mtr-build-thread=73 --basedir1=<your basedir> --vardir1=<your vardir>
          {noformat}

          See MDEV-8171 for instructions how to run the same test several times.
          jplindst Jan Lindström (Inactive) made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          jplindst Jan Lindström (Inactive) made changes -
          Summary 2015-05-20 20:36:29 7ffa58ff9700 InnoDB: Error: trying to access tablespace 11262 page no. 7, InnoDB: but the tablespace does not exist or is just being dropped. InnoDB: Error: trying to access tablespace 11262 page no. 7, InnoDB: but the tablespace does not exist or is just being dropped.

          commit 536112dd30bbe68e1b0624ed68fbf96e333d9f80
          Author: Jan Lindström <jan.lindstrom@mariadb.com>
          Date: Thu May 21 15:07:19 2015 +0300

          MDEV-8195: InnoDB: Error: trying to access tablespace 11262 page no. 7, InnoDB: but the tablespace does not exist or is just being dropped.

          Analysis: Problem was that we did try to read from tablespace
          that was being dropped.

          Fixed by introducing a new function to find a tablespace only
          if it is not being dropped currently and adding this check
          before trying to read pages from tablespace.

          jplindst Jan Lindström (Inactive) added a comment - commit 536112dd30bbe68e1b0624ed68fbf96e333d9f80 Author: Jan Lindström <jan.lindstrom@mariadb.com> Date: Thu May 21 15:07:19 2015 +0300 MDEV-8195 : InnoDB: Error: trying to access tablespace 11262 page no. 7, InnoDB: but the tablespace does not exist or is just being dropped. Analysis: Problem was that we did try to read from tablespace that was being dropped. Fixed by introducing a new function to find a tablespace only if it is not being dropped currently and adding this check before trying to read pages from tablespace.
          jplindst Jan Lindström (Inactive) made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 67583 ] MariaDB v4 [ 149193 ]

          People

            jplindst Jan Lindström (Inactive)
            jplindst Jan Lindström (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.