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

RocksDB: Error opening instance, Status Code: 9, Status: Operation timed out: Timeout waiting to lock key

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Won't Fix
    • Affects Version/s: 5.7.22-22
    • Fix Version/s: None
    • Component/s: MyRocks
    • Labels:

      Description

      After disk went full, RockDB crashed, but when disk space was added later (no data removed), it refuses to start. Using rocksdb_wal_recovery_mode from 0 to 3 does not help. I am unable to start the engine, so all data is unusable. 

      The disk ran out of space during generic sysbench oltp_write_only test with 65 threads. Binlog was enabled.

      It crashed with:

      2018-05-24T23:53:49.337970Z 385 [ERROR] Disk is full writing './bm-support01-bin.000131' (Errcode: 15275360 - No space left on device). Waiting for someone to free space...
      2018-05-24T23:53:49.337994Z 385 [ERROR] Retry in 60 secs. Message reprinted in 600 secs
      
      2018-05-24T23:59:15.082518Z 474 [ERROR] Disk is full writing './bm-support01-bin.000135' (Errcode: 15275360 - No space left on device). Waiting for someone to free space...
      2018-05-24T23:59:15.082550Z 474 [ERROR] Retry in 60 secs. Message reprinted in 600 secs
      2018-05-24T23:59:15.780519Z 0 [ERROR] RocksDB: Error detected in background, Status Code: 5, Status: IO error: No space left on deviceWhile pwrite to file at offset 7016448: ./.rocksdb/041841.sst: No space left on device
      2018-05-24T23:59:15.780544Z 0 [ERROR] RocksDB: BackgroundErrorReason: 0
      2018-05-24T23:59:15.780566Z 0 [ERROR] LibRocksDB:[/mnt/workspace/percona-server-5.7-binaries-release-rocks/label_exp/min-jessie-x64/percona-server-5.7.21-21/storage/rocksdb/rocksdb/db/db_impl_compaction_flush.cc:1293] Waiting after background flush error: IO error: No space left on deviceWhile pwrite to file at offset 7016448: ./.rocksdb/041841.sst: No space left on deviceAccumulated background error counts: 1
      2018-05-25T00:00:15.082820Z 474 [ERROR] RocksDB: failed to write to WAL, Status Code: 5, Status: IO error: No space left on deviceWhile pwrite to file at offset 7016448: ./.rocksdb/041841.sst: No space left on device
      2018-05-25T00:00:15.082843Z 474 [ERROR] MyRocks: aborting on WAL write error.
      00:00:15 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 http://bugs.percona.com/
      
      key_buffer_size=8388608
      read_buffer_size=131072
      max_used_connections=70
      max_threads=16385
      thread_count=70
      connection_count=69
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 6531214 K bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
      
      Thread pointer: 0x7f522b052000
      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 = 7f523ef7be00 thread_stack 0x40000
      /home/przemek/sandboxes/tarballs/percona5.7.21/bin/mysqld(my_print_stacktrace+0x2c)[0xe92d3c]
      /home/przemek/sandboxes/tarballs/percona5.7.21/bin/mysqld(handle_fatal_signal+0x479)[0x7938e9]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x7f527e0e7330]
      /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37)[0x7f527c26ec37]
      /lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7f527c272028]
      /home/przemek/sandboxes/tarballs/percona5.7.21/lib/mysql/plugin/ha_rocksdb.so(_ZN7myrocks19rdb_handle_io_errorEN7rocksdb6StatusENS_17RDB_IO_ERROR_TYPEE+0x66)[0x7f5236d80ae6]
      /home/przemek/sandboxes/tarballs/percona5.7.21/lib/mysql/plugin/ha_rocksdb.so(_ZN7myrocks20Rdb_transaction_impl16commit_no_binlogEv+0x151)[0x7f5236d9daf1]
      /home/przemek/sandboxes/tarballs/percona5.7.21/lib/mysql/plugin/ha_rocksdb.so(+0x2cc7bc)[0x7f5236d7a7bc]
      /home/przemek/sandboxes/tarballs/percona5.7.21/bin/mysqld(_Z13ha_commit_lowP3THDbb+0x87)[0x7f5577]
      /home/przemek/sandboxes/tarballs/percona5.7.21/bin/mysqld(_ZN13MYSQL_BIN_LOG26process_commit_stage_queueEP3THDS1_+0x71)[0xe20061]
      /home/przemek/sandboxes/tarballs/percona5.7.21/bin/mysqld(_ZN13MYSQL_BIN_LOG14ordered_commitEP3THDbb+0x432)[0xe2ab72]
      /home/przemek/sandboxes/tarballs/percona5.7.21/bin/mysqld(_ZN13MYSQL_BIN_LOG6commitEP3THDb+0xb0f)[0xe2c29f]
      /home/przemek/sandboxes/tarballs/percona5.7.21/bin/mysqld(_Z15ha_commit_transP3THDbb+0x1d2)[0x7f5fb2]
      /home/przemek/sandboxes/tarballs/percona5.7.21/bin/mysqld(_Z12trans_commitP3THD+0x39)[0xd116f9]
      /home/przemek/sandboxes/tarballs/percona5.7.21/bin/mysqld(_Z21mysql_execute_commandP3THDb+0x20f8)[0xc61f68]
      /home/przemek/sandboxes/tarballs/percona5.7.21/bin/mysqld(_ZN18Prepared_statement7executeEP6Stringb+0x356)[0xc91ed6]
      /home/przemek/sandboxes/tarballs/percona5.7.21/bin/mysqld(_ZN18Prepared_statement12execute_loopEP6StringbPhS2_+0xc2)[0xc95052]
      /home/przemek/sandboxes/tarballs/percona5.7.21/bin/mysqld(_Z19mysqld_stmt_executeP3THDmmPhm+0x150)[0xc95390]
      /home/przemek/sandboxes/tarballs/percona5.7.21/bin/mysqld(_Z16dispatch_commandP3THDPK8COM_DATA19enum_server_command+0x1382)[0xc67b22]
      /home/przemek/sandboxes/tarballs/percona5.7.21/bin/mysqld(_Z10do_commandP3THD+0x1b7)[0xc68787]
      /home/przemek/sandboxes/tarballs/percona5.7.21/bin/mysqld(handle_connection+0x2a0)[0xd2fe20]
      /home/przemek/sandboxes/tarballs/percona5.7.21/bin/mysqld(pfs_spawn_thread+0x1b4)[0xeaaa24]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x8184)[0x7f527e0df184]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f527c33603d]
      
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (7f506d242aa0): COMMIT
      Connection ID (thread ID): 474
      Status: NOT_KILLED
      
      You may download the Percona Server operations manual by visiting
      http://www.percona.com/software/percona-server/. You may find information
      in the manual which will help you identify the cause of the crash.
      

      Upon restart, it is refusing to start with:

      2018-05-25T07:10:58.369413Z 0 [Note] RocksDB: rocksdb_max_open_files should not be greater than the open_files_limit, effective value of rocksdb_max_open_files is being set to open_files_limit / 2.
      2018-05-25T07:10:58.378884Z 0 [Note] RocksDB: 2 column families found
      2018-05-25T07:10:58.379063Z 0 [Note] RocksDB: Column Families at start:
      2018-05-25T07:10:58.379124Z 0 [Note] cf=default
      2018-05-25T07:10:58.379133Z 0 [Note] write_buffer_size=268435456
      2018-05-25T07:10:58.379140Z 0 [Note] target_file_size_base=134217728
      2018-05-25T07:10:58.379181Z 0 [Note] cf=__system__
      2018-05-25T07:10:58.379187Z 0 [Note] write_buffer_size=268435456
      2018-05-25T07:10:58.379191Z 0 [Note] target_file_size_base=134217728
      2018-05-25T07:11:20.915328Z 0 [ERROR] RocksDB: Error opening instance, Status Code: 9, Status: Operation timed out: Timeout waiting to lock key
      2018-05-25T07:11:20.915364Z 0 [ERROR] Plugin 'ROCKSDB' init function returned error.
      2018-05-25T07:11:20.915372Z 0 [ERROR] Plugin 'ROCKSDB' registration as a STORAGE ENGINE failed.
      2018-05-25T07:11:20.915687Z 0 [ERROR] Unknown/unsupported storage engine: ROCKSDB
      2018-05-25T07:11:20.915694Z 0 [ERROR] Aborting
      
      2018-05-25T07:11:20.915707Z 0 [Note] Binlog end
      2018-05-25T07:11:20.915790Z 0 [Note] Shutting down plugin 'ROCKSDB_TRX'
      2018-05-25T07:11:20.915796Z 0 [Note] Shutting down plugin 'ROCKSDB_PERF_CONTEXT_GLOBAL'
      2018-05-25T07:11:20.915800Z 0 [Note] Shutting down plugin 'ROCKSDB_PERF_CONTEXT'
      2018-05-25T07:11:20.915803Z 0 [Note] Shutting down plugin 'ROCKSDB_LOCKS'
      2018-05-25T07:11:20.915807Z 0 [Note] Shutting down plugin 'ROCKSDB_INDEX_FILE_MAP'
      

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                przemyslaw.malkowski@percona.com Przemyslaw Malkowski
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: