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

InnoDB: Assertion failure in file ha_innodb.cc line 21974 upon startup with page_size > 16K and small log_file_size

    XMLWordPrintable

Details

    Description

      With innodb_page_size above default and with a very small value of innodb_log_file_size, InnoDB throws an assertion failure on startup (both in debug and release builds).

      Examples of failing configurations:
      --innodb_page_size=32K --innodb_log_file_size=1M
      --innodb_page_size=64K --innodb_log_file_size=3M

      The failure happens immediately on bootstrap, if it's run with such parameters, other options can be default, e.g.

      scripts/mysql_install_db --innodb-log-file-size=1M --innodb-page-size=32K
      

      However, it's not specific to bootstrap – the server can be bootstrapped successfully with a required value of innodb_page_size (but big enough innodb_log_file_size), and when it is later started with the small innodb_page_size, it will crash then.

      10.1 112b21da37dad0fbb28bc65f9ab5a3ba6c0c2186

      2017-06-02 13:27:38 140400827072640 [ERROR] InnoDB: The combined size of ib_logfiles should be bigger than
      InnoDB: 200 kB * innodb_thread_concurrency.
      2017-06-02 13:27:38 7fb19d6c8080  InnoDB: Assertion failure in thread 140400827072640 in file ha_innodb.cc line 21974
      InnoDB: We intentionally generate a memory trap.
      InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
      InnoDB: If you get repeated assertion failures or crashes, even
      InnoDB: immediately after the mysqld startup, there may be
      InnoDB: corruption in the InnoDB tablespace. Please refer to
      InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
      InnoDB: about forcing recovery.
      170602 13:27:38 [ERROR] mysqld got signal 6 ;
       
      #5  0x00007fb199e9c3fa in abort () from /lib/x86_64-linux-gnu/libc.so.6
      #6  0x00007fb19cc9b2af in ib_logf (level=IB_LOG_LEVEL_FATAL, format=0x7fb19d1855c0 "The combined size of ib_logfiles should be bigger than\nInnoDB: 200 kB * innodb_thread_concurrency.") at /data/src/10.1/storage/xtradb/handler/ha_innodb.cc:21974
      #7  0x00007fb19ccf4f38 in log_calc_max_ages () at /data/src/10.1/storage/xtradb/log/log0log.cc:942
      #8  0x00007fb19ccf5bc6 in log_group_init (id=0, n_files=2, file_size=1048576, space_id=4294967280, archive_space_id=4294967281) at /data/src/10.1/storage/xtradb/log/log0log.cc:1166
      #9  0x00007fb19cde8523 in create_log_files (create_new_db=false, logfilename=0x7ffc0b3f5fa0 "./ib_logfile1", dirnamelen=2, lsn=3099277, logfile0=@0x7ffc0b3f4ed0: 0x7fb1994b5f98 "./ib_logfile101") at /data/src/10.1/storage/xtradb/srv/srv0start.cc:761
      #10 0x00007fb19cdec304 in innobase_start_or_create_for_mysql () at /data/src/10.1/storage/xtradb/srv/srv0start.cc:2849
      #11 0x00007fb19cc7cde0 in innobase_init (p=0x7fb199436a70) at /data/src/10.1/storage/xtradb/handler/ha_innodb.cc:4454
      #12 0x00007fb19c94aff1 in ha_initialize_handlerton (plugin=0x7fb199724880) at /data/src/10.1/sql/handler.cc:513
      #13 0x00007fb19c727cb9 in plugin_initialize (tmp_root=0x7ffc0b3f8b40, plugin=0x7fb199724880, argc=0x7fb19d9a4770 <remaining_argc>, argv=0x7fb199433428, options_only=false) at /data/src/10.1/sql/sql_plugin.cc:1400
      #14 0x00007fb19c7288a2 in plugin_init (argc=0x7fb19d9a4770 <remaining_argc>, argv=0x7fb199433428, flags=2) at /data/src/10.1/sql/sql_plugin.cc:1678
      #15 0x00007fb19c647b95 in init_server_components () at /data/src/10.1/sql/mysqld.cc:5149
      #16 0x00007fb19c648c00 in mysqld_main (argc=13, argv=0x7fb199433428) at /data/src/10.1/sql/mysqld.cc:5736
      #17 0x00007fb19c63e350 in main (argc=13, argv=0x7ffc0b3f98d8) at /data/src/10.1/sql/main.cc:25
      

      It's not a new failure, reproducible on previous 10.1 versions as well (tried 10.1.21), but I'm not getting it on 10.0 or 10.2. If you choose not to fix it but document as a limitation, I'm okay with that.

      On a separate but related note, even though before crashing InnoDB writes in the error log

      2017-06-02 13:27:38 140400827072640 [ERROR] InnoDB: The combined size of ib_logfiles should be bigger than
      InnoDB: 200 kB * innodb_thread_concurrency.
      

      setting innodb_thread_concurrency even to 1 does not seem to change anything – the crash still happens and even the same error is still produced. Either the message text is wrong, or something isn't right with the calculation.

      Attachments

        Activity

          People

            marko Marko Mäkelä
            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.