Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-5756

Crash in RocksDB during bulk data insertion / table alter

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Incomplete
    • Affects Version/s: 8.0.15-6
    • Fix Version/s: None
    • Component/s: MyRocks
    • Labels:
      None
    • Environment:

      ubuntu Bionic x64 18.04.2

      8GB RAM (tried 32GB, same fault)

      Vmware workstation (and ESXi 6.7) for testing purposes.

       

      Description

      Converting or creating a table/inserting from innoDB to RocksDB faults MySQL

       

      CREATE TABLE `evidence` (
      {{ `id` int(11) NOT NULL AUTO_INCREMENT,}}
      {{ `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,}}
      {{ `username` varchar(255) CHARACTER SET utf8 DEFAULT NULL,}}
      {{ `email` varchar(255) CHARACTER SET utf8 DEFAULT NULL,}}
      {{ `ip_addr` char(50) NOT NULL DEFAULT '',}}
      {{ `submitter_id` int(10) unsigned DEFAULT '0',}}
      {{ `post` blob,}}
      {{ PRIMARY KEY (`id`),}}
      {{ KEY `timestamp` (`timestamp`)}}
      ) ENGINE=InnoDB AUTO_INCREMENT=186263694 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT

      and then

      alter table evidence engine=RocksDB;

      will then cause this.... 

      (it does the same for a create table like / insert into select * from)

       

       

      [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.15-6' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Percona Server (GPL), Release '6', Revision '63abd08'.
      [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060

      terminate called after throwing an instance of 'std::bad_alloc'
      {{ what(): std::bad_alloc}}
      23:46:22 UTC - mysqld got signal 6 ;
      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.
      Attempting to collect some information that could help diagnose the problem.
      As this is a crash and something is definitely wrong, the information
      collection process might fail.
      Please help us make Percona Server better by reporting any
      bugs at https://bugs.percona.com/key_buffer_size=8388608
      read_buffer_size=131072
      max_used_connections=1
      max_threads=151
      thread_count=2
      connection_count=1
      {{It is possible that mysqld could use up to }}
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 67949 K bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.Thread pointer: 0x7f82a0005e60
      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 = 7f82cc106d50 thread_stack 0x46000
      /usr/sbin/mysqld(my_print_stacktrace(unsigned char*, unsigned long)+0x3d) [0x55b41f6c551d]
      /usr/sbin/mysqld(handle_fatal_signal+0x423) [0x55b41e9b8653]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890) [0x7f82e21ad890]
      /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7) [0x7f82e00e8e97]
      /lib/x86_64-linux-gnu/libc.so.6(abort+0x141) [0x7f82e00ea801]
      /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8c957) [0x7f82e0add957]
      /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x92ab6) [0x7f82e0ae3ab6]
      /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x92af1) [0x7f82e0ae3af1]
      /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x92d24) [0x7f82e0ae3d24]
      /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x9329c) [0x7f82e0ae429c]
      /usr/lib/x86_64-linux-gnu/libstdc++.so.6(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_mutate(unsigned long, unsigned long, char const*, unsigned long)+0x6b) [0x7f82e0b75c8b]
      /usr/lib/x86_64-linux-gnu/libstdc++.so.6(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)+0x63) [0x7f82e0b77233]
      /usr/lib/mysql/plugin/ha_rocksdb.so(rocksdb::WriteBatchInternal::Put(rocksdb::WriteBatch*, unsigned int, rocksdb::Slice const&, rocksdb::Slice const&)+0x1eb) [0x7f82abaaa1db]
      /usr/lib/mysql/plugin/ha_rocksdb.so(rocksdb::WriteBatch::Put(rocksdb::ColumnFamilyHandle*, rocksdb::Slice const&, rocksdb::Slice const&)+0x45) [0x7f82abaaa395]
      /usr/lib/mysql/plugin/ha_rocksdb.so(rocksdb::WriteBatchWithIndex::Put(rocksdb::ColumnFamilyHandle*, rocksdb::Slice const&, rocksdb::Slice const&)+0x45) [0x7f82abc8e5e5]
      /usr/lib/mysql/plugin/ha_rocksdb.so(myrocks::ha_rocksdb::update_pk(myrocks::Rdb_key_def const&, myrocks::ha_rocksdb::update_row_info const&, bool const&)+0x23a) [0x7f82ab8e884a]
      /usr/lib/mysql/plugin/ha_rocksdb.so(myrocks::ha_rocksdb::update_indexes(myrocks::ha_rocksdb::update_row_info const&, bool const&)+0x29) [0x7f82ab8e8c99]
      /usr/lib/mysql/plugin/ha_rocksdb.so(myrocks::ha_rocksdb::update_write_row(unsigned char const*, unsigned char const*, bool)+0xfa) [0x7f82ab8e8e6a]
      /usr/lib/mysql/plugin/ha_rocksdb.so(myrocks::ha_rocksdb::write_row(unsigned char*)+0x56) [0x7f82ab8e7656]
      /usr/sbin/mysqld(handler::ha_write_row(unsigned char*)+0x1a4) [0x55b41e6381b4]
      /usr/sbin/mysqld(mysql_alter_table(THD*, char const*, char const*, HA_CREATE_INFO*, TABLE_LIST*, Alter_info*)+0x7a58) [0x55b41e923918]
      /usr/sbin/mysqld(Sql_cmd_alter_table::execute(THD*)+0xa01) [0x55b41e80c761]
      /usr/sbin/mysqld(mysql_execute_command(THD*, bool)+0x27eb) [0x55b41e88b94b]
      /usr/sbin/mysqld(mysql_parse(THD*, Parser_state*, bool, bool)+0x40b) [0x55b41e88debb]
      /usr/sbin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x2fc6) [0x55b41e891316]
      /usr/sbin/mysqld(do_command(THD*)+0x1f9) [0x55b41e891e69]
      /usr/sbin/mysqld(+0x1060ab0) [0x55b41e9a9ab0]
      /usr/sbin/mysqld(+0x1e27bbf) [0x55b41f770bbf]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7f82e21a26db]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f82e01cb88f]Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (7f82a15222d8): alter table evidence engine=rocksdb
      Connection ID (thread ID): 9
      Status: NOT_KILLED

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  SFS Paul
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: