Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-22537

Crash when deleting the database

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Major
    • None
    • 4.5.1
    • forestdb
    • None

    Description

      Refiled from: https://github.com/couchbase/couchbase-lite-ios/issues/1550

      While debugging my code, I experienced a crash when deleting the database. I should also add that I wasn't able to reproduce it.

      The incriminated code is the following:

      couchbaseQueue.async { do { _ = try self.database.delete() } catch ...

      This code should not crash and instead it should raise an exception (or in the Obj-C world, it should "return" an NSError).

      This is the stack trace:

      #7 0x0000000105f11953 in cbforest::error::throw(fdb_status) at CBForest/Error.cc:24 #8 0x0000000105f138f8 in cbforest::check(fdb_status) [inlined] at CBForest/Error.hh:59 #9 0x0000000105f138f1 in cbforest::Database::getKeyStore(std::1::basic_string<char, std::1::char_traits<char>, std::_1::allocator<char> >) const at CBForest/Database.cc:161 #10 0x0000000105f13c23 in cbforest::Database::updatePurgeCount() at CBForest/Database.cc:227 #11 0x0000000105f1355c in cbforest::Database::onCompact(unsigned int, char const*, fdb_doc_struct*, unsigned long long, unsigned long long) [inlined] at CBForest/Database.cc:405 #12 0x0000000105f1352a in cbforest::Database::compactionCallback(_fdb_file_handle*, unsigned int, char const*, fdb_doc_struct*, unsigned long long, unsigned long long, void*) at CBForest/Database.cc:385

      And this is what I see in the console:

      [FDB ERR] Error in UNLINK on a database file '.../couchbase.cblite2/db.forest.0', errno = 2: 'No such file or directory' 13:47:09.094‖ WARNING: ForestDB error: ForestDB handle is invalid (-30) {at FDBLogCallback:68} libc++abi.dylib: terminating with uncaught exception of type cbforest::error

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tai.tran Tai Tran (Inactive)
            daniel.petersen Daniel Petersen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty