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

RocksDB my.ini: Produces Server Crash - Conflict between "rocksdb_allow_mmap_reads" and "rocksdb_use_direct_io_for_flush_and_compaction". Both cannot be enabled at the same time.

    XMLWordPrintable

Details

    Description

      When you launch MariaDB with ROCKSDB Engine and the both of following two options enabled:

      • rocksdb_allow_mmap_reads = 1 # Default: 0 # Useful for SSD Disks.
      • rocksdb_use_direct_reads=1 # Default: 0 # Useful for Spinning Disks
      • rocksdb_use_direct_io_for_flush_and_compaction=1 # Default: 0 # Useful for Spinning Disks
      1. NOTE: * "allow_mmap_reads" cannot be used with "use_direct_reads" or "use_direct_io_for_flush_and_compaction"
      2. * "allow_mmap_writes" cannot be used with "use_direct_io_for_flush_and_compaction", i.e., they cannot be set to true at
      3. the same time.

      YOU CAN ONLY ENABLE rocksdb_allow_mmap_reads OR rocksdb_use_direct_io_for_flush_and_compaction, NOT BOTH at the same time. Otherwise, a Server Crash Occurs. By being aware of this restriction, Server Crash is avoided!!!!

      The Server Crashes. Here is the Error Log:

      2018-07-30 14:39:34 0 [Note] RocksDB: 2 column families found
      2018-07-30 14:39:34 0 [Note] RocksDB: Column Families at start:
      2018-07-30 14:39:34 0 [Note] cf=default
      2018-07-30 14:39:34 0 [Note] write_buffer_size=536870912
      2018-07-30 14:39:34 0 [Note] target_file_size_base=134217728
      2018-07-30 14:39:34 0 [Note] cf=_system_
      2018-07-30 14:39:34 0 [Note] write_buffer_size=536870912
      2018-07-30 14:39:34 0 [Note] target_file_size_base=134217728
      2018-07-30 14:39:35 0 [Note] RocksDB: Table_store: loaded DDL data for 0 tables
      2018-07-30 14:39:35 0 [Note] RocksDB: global statistics using thread_id_indexer_t indexer
      2018-07-30 14:39:35 0 [Note] MyRocks storage engine plugin has been successfully initialized.
      2018-07-30 14:39:35 0 [Note] Plugin 'InnoDB' is disabled.
      2018-07-30 14:39:35 0 [Note] Plugin 'FEEDBACK' is disabled.
      2018-07-30 14:39:35 0 [Note] Server socket created on IP: '::'.
      2018-07-30 14:39:35 1 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1286: Unknown storage engine 'InnoDB'
      2018-07-30 14:39:35 0 [Note] Reading of all Master_info entries succeded
      2018-07-30 14:39:35 0 [Note] Added new Master_info '' to hash table
      2018-07-30 14:39:35 0 [Note] C:\Program Files\MariaDB 10.3\bin\mysqld.exe: ready for connections.
      Version: '10.3.8-MariaDB' socket: '' port: 3306 mariadb.org binary distribution
      2018-07-30 14:42:27 0 [Note] C:\Program Files\MariaDB 10.3\bin\mysqld.exe (initiated by: unknown): Normal shutdown
      2018-07-30 14:42:27 0 [Note] Event Scheduler: Purging the queue. 0 events
      2018-07-30 14:42:27 0 [ERROR] RocksDB: Error detected in background, Status Code: 2, Status: Corruption: Bad table magic number: expected 9863518390377041911, found 0 in ./#rocksdb/000045.sst
      2018-07-30 14:42:27 0 [ERROR] RocksDB: BackgroundErrorReason: 1
      2018-07-30 14:42:27 0 [Note] RocksDB: Creating the file ./#rocksdb/ROCKSDB_CORRUPTED to abort mysqld restarts. Remove this file from the data directory after fixing the corruption to recover.
      180730 14:42:27 [ERROR] mysqld got exception 0xc0000005 ;
      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.3.8-MariaDB
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=0
      max_threads=65537
      thread_count=0
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 136181 K bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.

      Thread pointer: 0x0
      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_sync()[my_sync.c:114]
      ha_rocksdb.dll!???
      ha_rocksdb.dll!???
      ha_rocksdb.dll!???
      ha_rocksdb.dll!???
      ha_rocksdb.dll!???
      ha_rocksdb.dll!???
      ha_rocksdb.dll!???
      ha_rocksdb.dll!???
      ha_rocksdb.dll!???
      ha_rocksdb.dll!???
      KERNEL32.DLL!BaseThreadInitThunk()
      ntdll.dll!RtlUserThreadStart()
      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.
      2018-07-30 14:42:29 0 [ERROR] RocksDB: There was a corruption detected in RockDB files. Check error log emitted earlier for more details.
      2018-07-30 14:42:29 0 [ERROR] RocksDB: The server will exit normally and stop restart attempts. Remove ./#rocksdb/ROCKSDB_CORRUPTED file from data directory and start mysqld manually.
      2018-07-30 14:48:11 0 [Note] RocksDB: 2 column families found
      2018-07-30 14:48:11 0 [Note] RocksDB: Column Families at start:
      2018-07-30 14:48:11 0 [Note] cf=default
      2018-07-30 14:48:11 0 [Note] write_buffer_size=536870912
      2018-07-30 14:48:11 0 [Note] target_file_size_base=134217728
      2018-07-30 14:48:11 0 [Note] cf=_system_
      2018-07-30 14:48:11 0 [Note] write_buffer_size=536870912
      2018-07-30 14:48:11 0 [Note] target_file_size_base=134217728
      2018-07-30 14:48:11 0 [Note] RocksDB: Table_store: loaded DDL data for 0 tables
      2018-07-30 14:48:11 0 [ERROR] RocksDB: Error detected in background, Status Code: 2, Status: Corruption: Bad table magic number: expected 9863518390377041911, found 0 in ./#rocksdb/000045.sst
      2018-07-30 14:48:11 0 [ERROR] RocksDB: BackgroundErrorReason: 1
      2018-07-30 14:48:11 0 [Note] RocksDB: Creating the file ./#rocksdb/ROCKSDB_CORRUPTED to abort mysqld restarts. Remove this file from the data directory after fixing the corruption to recover.
      180730 14:48:11 [ERROR] mysqld got exception 0xc0000005 ;
      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

      Attachments

        1. my v2.ini
          10 kB
        2. my ok.ini
          12 kB
        3. my.ini
          10 kB

        Activity

          People

            psergei Sergei Petrunia
            Juan Juan Telleria
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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