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

MariaDB Server SEGV crash when importing tablespace for a large table (4GB)




      I'm trying to import a database by bringing over the .ibd files from another server (which were saved after tables were flushed and locked), running the "alter table X discard tablespace" for each table and then copying the file over and running "alter table X import tablespace". I disable foreign key checks prior to importing each table.

      the sequence of import statements works correctly for most tables. When it reaches a table that is about 4GB large, but with large records, I get a SEGV crash. This happens consistently for the same table. Weird thing is that a 6GB table (but "thin") works OK.

      Error in log is:

      2017-03-29 9:25:56 139871748651776 [Note] InnoDB: Sync to disk
      2017-03-29 9:26:00 139871748651776 [Note] InnoDB: Sync to disk - done!
      2017-03-29 9:26:00 139871748651776 [Note] InnoDB: Phase I - Update all pages
      2017-03-29 9:27:18 139871748651776 [Note] InnoDB: Sync to disk
      2017-03-29 9:27:21 139871748651776 [Note] InnoDB: Sync to disk - done!
      2017-03-29 9:27:22 139871748651776 [Note] InnoDB: Phase III - Flush changes to disk
      2017-03-29 9:27:22 139871748651776 [Note] InnoDB: Phase IV - Flush complete
      170329 9:27:22 [ERROR] mysqld got signal 11 ;
      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.22-MariaDB
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1233714 K bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.

      Thread pointer: 0x7f3622a42008
      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...
      stack_bottom = 0x7f366de47110 thread_stack 0x48400

      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f364a42c020): is an invalid pointer
      Connection ID (thread ID): 230
      Status: NOT_KILLED

      Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off

      The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
      information that should help you find out what is causing the crash.

      We think the query pointer is invalid, but we will try to print it anyway.

      170329 09:27:22 mysqld_safe Number of processes running now: 0
      170329 09:27:22 mysqld_safe mysqld restarted

      From the output it would seem like the calculation of memory usage says that MariaDB could use up to a little bit more than 1GB of memory, which should be OK since this server has 8GB of memory.

      Am I doing something wrong? I tried searching for this kind of crash but couldn't find much.


        Issue Links



              marko Marko Mäkelä
              rgallastpsi Rafael Gallastegui
              1 Vote for this issue
              5 Start watching this issue



                Git Integration

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