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

Crash when accessing large (>4G) InnoDB table on MariaDB 10.1.x 32-bit binaries

    XMLWordPrintable

Details

    • 10.1.14

    Description

      I've installed32-bit Windows binaries of MariaDB 10.1.13 on my 64-bit Windows XP from this URL:

      http://mariadb.mirror.serveriai.lt//mariadb-10.1.13/win32-packages/mariadb-10.1.13-win32.msi

      Installation was without problems, I've used all defaults but 512M of buffer pool, my.ini is the following:

      [mysqld]
      datadir=C:/Program Files (x86)/MariaDB 10.1/data
      port=3316
      sql_mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
      default_storage_engine=innodb
      innodb_buffer_pool_size=512M
      innodb_log_file_size=50M
      [client]
      port=3316
      

      Then I've created InnoDB table tinno in the test database like this:

      create table tinno(id int auto_increment primary key, c1 varchar(2000)) engine=InnoDB;
      

      Note that latin1 character set was used by default. I've inserted one row into the table:

      insert into tinno(c1) values(repeat('a',2000));
      

      and then executed the following many times:

      insert into tinno(c1) select repeat('b',2000) from tinno;
      

      until the table .ibd file on disk became larger than 4G:

      C:\...les (x86)\MariaDB 10.1\data\test>dir
       Volume in drive C has no label.
       Volume Serial Number is 98B6-4277
       
       Directory of C:\Program Files (x86)\MariaDB 10.1\data\test
       
      22.04.2016  15:00    <DIR>          .
      22.04.2016  15:00    <DIR>          ..
      22.04.2016  15:00             2 944 tinno.frm
      22.04.2016  15:23     4 991 221 760 tinno.ibd
                     2 File(s)  4 991 224 704 bytes
                     2 Dir(s)  59 627 225 088 bytes free
      

      Then I checked that I can select some rows from the table (with select * from tinno limit 100 etc), can apply SHOW CREATE TABLE and SHOW TABLE STATUS - everything worked well. I shut the box down cleanly and then started it today and tried to execture the following:

      C:\Program Files (x86)\MariaDB 10.1\bin>mysql -uroot -proot -P3316 test
      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 2
      Server version: 10.1.13-MariaDB mariadb.org binary distribution
       
      Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
       
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
       
      MariaDB [test]> show tables;
      +----------------+
      | Tables_in_test |
      +----------------+
      | tinno          |
      +----------------+
      1 row in set (0.05 sec)
       
      MariaDB [test]> show table status like 'tinno'\G
      ERROR 2013 (HY000): Lost connection to MySQL server during query
      MariaDB [test]> exit
      

      Server crashed and this is what I had in the error log:

      ...
      2016-04-22 14:57:54 4084 [Note] C:\Program Files (x86)\MariaDB 10.1\bin\mysqld.exe: ready for connections.
      Version: '10.1.13-MariaDB'  socket: ''  port: 3316  mariadb.org binary distribution
      2016-04-22 15:28:27 3428 [Note] C:\Program Files (x86)\MariaDB 10.1\bin\mysqld.exe: Normal shutdown
       
      2016-04-22 15:28:28 3428 [Note] Event Scheduler: Purging the queue. 0 events
      2016-04-22 15:28:28 2252 [Note] InnoDB: FTS optimize thread exiting.
      2016-04-22 15:28:28 3428 [Note] InnoDB: Starting shutdown...
      2016-04-22 15:28:32 3428 [Note] InnoDB: Shutdown completed; log sequence number 4486310509
      2016-04-22 15:28:32 3428 [Note] C:\Program Files (x86)\MariaDB 10.1\bin\mysqld.exe: Shutdown complete
       
      2016-04-25 10:32:09 1856 [Note] InnoDB: Using mutexes to ref count buffer pool pages
      2016-04-25 10:32:09 1856 [Note] InnoDB: The InnoDB memory heap is disabled
      2016-04-25 10:32:09 1856 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
      2016-04-25 10:32:09 1856 [Note] InnoDB: Memory barrier is not used
      2016-04-25 10:32:09 1856 [Note] InnoDB: Compressed tables use zlib 1.2.3
      2016-04-25 10:32:11 1856 [Note] InnoDB: Using generic crc32 instructions
      2016-04-25 10:32:11 1856 [Note] InnoDB: Initializing buffer pool, size = 512.0M
      2016-04-25 10:32:12 1856 [Note] InnoDB: Completed initialization of buffer pool
      2016-04-25 10:32:19 1856 [Note] InnoDB: Highest supported file format is Barracuda.
      2016-04-25 10:32:27 1856 [Note] InnoDB: 128 rollback segment(s) are active.
      2016-04-25 10:32:27 1856 [Note] InnoDB: Waiting for purge to start
      2016-04-25 10:32:27 1856 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.28-76.1 started; log sequence number 4486310509
      2016-04-25 10:32:28 2516 [Note] InnoDB: Dumping buffer pool(s) not yet started
      2016-04-25 10:32:30 1856 [Note] Plugin 'FEEDBACK' is disabled.
      2016-04-25 10:32:32 1856 [Note] Server socket created on IP: '0.0.0.0'.
      2016-04-25 10:32:38 1856 [Note] C:\Program Files (x86)\MariaDB 10.1\bin\mysqld.exe: ready for connections.
      Version: '10.1.13-MariaDB'  socket: ''  port: 3316  mariadb.org binary distribution
      InnoDB: Error: trying to access page number 207980 in space 4,
      InnoDB: space name test/tinno,
      InnoDB: which is outside the tablespace bounds.
      InnoDB: Byte offset 0, len 16384, i/o type 10.
      InnoDB: If you get this error at mysqld startup, please check that
      InnoDB: your my.cnf matches the ibdata files that you have in the
      InnoDB: MySQL server.
      2016-04-25 12:33:44 1278  InnoDB: Assertion failure in thread 4728 in file fil0fil.cc line 5866
      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.
      160425 12:33:44 [ERROR] mysqld got exception 0x80000003 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
       
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed, 
      something is definitely wrong and this may fail.
       
      Server version: 10.1.13-MariaDB
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=1
      max_threads=153
      thread_count=1
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 465948 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x0x2b867010
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      mysqld.exe!my_parameter_handler()[my_init.c:256]
      mysqld.exe!raise()[winsig.c:586]
      mysqld.exe!abort()[abort.c:74]
      mysqld.exe!_fil_io()[fil0fil.cc:5866]
      mysqld.exe!buf_read_page_low()[buf0rea.cc:243]
      mysqld.exe!buf_read_page()[buf0rea.cc:474]
      mysqld.exe!buf_page_get_gen()[buf0buf.cc:2942]
      mysqld.exe!btr_cur_open_at_index_side_func()[btr0cur.cc:991]
      mysqld.exe!row_search_get_max_rec()[row0sel.cc:5442]
      mysqld.exe!row_search_max_autoinc()[row0sel.cc:5487]
      mysqld.exe!ha_innobase::innobase_initialize_autoinc()[ha_innodb.cc:5916]
      mysqld.exe!ha_innobase::open()[ha_innodb.cc:6406]
      mysqld.exe!handler::ha_open()[handler.cc:2500]
      mysqld.exe!open_table_from_share()[table.cc:2927]
      mysqld.exe!open_table()[sql_base.cc:2563]
      mysqld.exe!open_and_process_table()[sql_base.cc:4073]
      mysqld.exe!open_tables()[sql_base.cc:4584]
      mysqld.exe!open_normal_and_derived_tables()[sql_base.cc:5310]
      mysqld.exe!fill_schema_table_by_open()[sql_show.cc:4156]
      mysqld.exe!get_all_tables()[sql_show.cc:4785]
      mysqld.exe!get_schema_tables_result()[sql_show.cc:8114]
      mysqld.exe!JOIN::exec_inner()[sql_select.cc:2670]
      mysqld.exe!JOIN::exec()[sql_select.cc:2519]
      mysqld.exe!mysql_select()[sql_select.cc:3453]
      mysqld.exe!handle_select()[sql_select.cc:384]
      mysqld.exe!execute_sqlcom_select()[sql_parse.cc:5904]
      mysqld.exe!mysql_execute_command()[sql_parse.cc:2960]
      mysqld.exe!mysql_parse()[sql_parse.cc:7304]
      mysqld.exe!dispatch_command()[sql_parse.cc:1489]
      mysqld.exe!do_command()[sql_parse.cc:1141]
      mysqld.exe!do_handle_one_connection()[sql_connect.cc:1349]
      mysqld.exe!handle_one_connection()[sql_connect.cc:1261]
      mysqld.exe!pthread_start()[my_winthread.c:60]
      mysqld.exe!_callthreadstartex()[threadex.c:314]
      mysqld.exe!_threadstartex()[threadex.c:292]
      kernel32.dll!FlsSetValue()
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x2b873180): show table status like 'tinno'
      Connection ID (thread ID): 2
      Status: NOT_KILLED
      ...
      

      Same crash happened when I executed SHOW CREATE TABLE after restart:

      ...
      2016-04-25 12:47:29 5104 [Note] InnoDB: from the doublewrite buffer...
      2016-04-25 12:47:30 5104 [Warning] InnoDB: A page in the doublewrite buffer is not within space bounds; space id 4 page number 301007, page 1 in doublewrite buf.
      2016-04-25 12:47:30 5104 [Warning] InnoDB: A page in the doublewrite buffer is not within space bounds; space id 4 page number 301008, page 2 in doublewrite buf.
      ...
      2016-04-25 12:47:30 5104 [Warning] InnoDB: A page in the doublewrite buffer is not within space bounds; space id 4 page number 250463, page 100 in doublewrite buf.
      2016-04-25 12:47:31 5104 [Note] InnoDB: 128 rollback segment(s) are active.
      2016-04-25 12:47:31 5104 [Note] InnoDB: Waiting for purge to start
      2016-04-25 12:47:31 5104 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.28-76.1 started; log sequence number 4486310519
      2016-04-25 12:47:31 2244 [Note] InnoDB: Dumping buffer pool(s) not yet started
      2016-04-25 12:47:31 5104 [Note] Plugin 'FEEDBACK' is disabled.
      2016-04-25 12:47:31 5104 [Note] Server socket created on IP: '0.0.0.0'.
      2016-04-25 12:47:31 5104 [Note] C:\Program Files (x86)\MariaDB 10.1\bin\mysqld.exe: ready for connections.
      Version: '10.1.13-MariaDB'  socket: ''  port: 3316  mariadb.org binary distribution
      InnoDB: Error: trying to access page number 207980 in space 4,
      InnoDB: space name test/tinno,
      InnoDB: which is outside the tablespace bounds.
      InnoDB: Byte offset 0, len 16384, i/o type 10.
      InnoDB: If you get this error at mysqld startup, please check that
      InnoDB: your my.cnf matches the ibdata files that you have in the
      InnoDB: MySQL server.
      2016-04-25 12:47:52 55c  InnoDB: Assertion failure in thread 1372 in file fil0fil.cc line 5866
      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.
      160425 12:47:52 [ERROR] mysqld got exception 0x80000003 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
       
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed, 
      something is definitely wrong and this may fail.
       
      Server version: 10.1.13-MariaDB
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=1
      max_threads=153
      thread_count=1
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 465948 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x0x2b724ff8
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      mysqld.exe!my_parameter_handler()[my_init.c:256]
      mysqld.exe!raise()[winsig.c:586]
      mysqld.exe!abort()[abort.c:74]
      mysqld.exe!_fil_io()[fil0fil.cc:5866]
      mysqld.exe!buf_read_page_low()[buf0rea.cc:243]
      mysqld.exe!buf_read_page()[buf0rea.cc:474]
      mysqld.exe!buf_page_get_gen()[buf0buf.cc:2942]
      mysqld.exe!btr_cur_open_at_index_side_func()[btr0cur.cc:991]
      mysqld.exe!row_search_get_max_rec()[row0sel.cc:5442]
      mysqld.exe!row_search_max_autoinc()[row0sel.cc:5487]
      mysqld.exe!ha_innobase::innobase_initialize_autoinc()[ha_innodb.cc:5916]
      mysqld.exe!ha_innobase::open()[ha_innodb.cc:6406]
      mysqld.exe!handler::ha_open()[handler.cc:2500]
      mysqld.exe!open_table_from_share()[table.cc:2927]
      mysqld.exe!open_table()[sql_base.cc:2563]
      mysqld.exe!open_and_process_table()[sql_base.cc:4073]
      mysqld.exe!open_tables()[sql_base.cc:4584]
      mysqld.exe!mysqld_show_create_get_fields()[sql_show.cc:1134]
      mysqld.exe!mysqld_show_create()[sql_show.cc:1228]
      mysqld.exe!mysql_execute_command()[sql_parse.cc:3699]
      mysqld.exe!mysql_parse()[sql_parse.cc:7304]
      mysqld.exe!dispatch_command()[sql_parse.cc:1489]
      mysqld.exe!do_command()[sql_parse.cc:1141]
      mysqld.exe!do_handle_one_connection()[sql_connect.cc:1349]
      mysqld.exe!handle_one_connection()[sql_connect.cc:1261]
      mysqld.exe!pthread_start()[my_winthread.c:60]
      mysqld.exe!_callthreadstartex()[threadex.c:314]
      mysqld.exe!_threadstartex()[threadex.c:292]
      kernel32.dll!FlsSetValue()
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x2b827030): show create table tinno
      Connection ID (thread ID): 2
      Status: NOT_KILLED
      

      According to other rteporters this happened with 10.1.10 as well, but never with older 5.5.x or 10.0.x and never with 64-bit MariaDB.

      Attachments

        Issue Links

          Activity

            People

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