Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-5259

Crash in setting Housekeeper::_doExpiration()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 3.1.6
    • 3.1.1
    • LiteCore
    • Security Level: Public
    • None
    • LiteCore 125
    • 8

    Description

      This is reported in the forum when using CBL Android 3.1.1.

      https://www.couchbase.com/forums/t/facing-a-crash-when-using-collection-setdocumentexpiration-over-multiple-documents-in-a-loop/37334/12

      Crash :

      signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0000000000000048
      Cause: null pointer dereference
      .
      .
      .
      #00 pc 00000000000b7278 /apex/com.android.runtime/lib64/bionic/libc.so (pthread_mutex_lock+12) (BuildId: 01331f74b0bb2cb958bdc15282b8ec7b)
      #01 libLiteCore.so (std::__ndk1::recursive_mutex::lock()+12) (BuildId: ee0c202701aa67ffcdc739dea1e8911592e589ba)(litecore::Housekeeper::_doExpiration()+52) 

      Scenario:

      Step:1 - First fetching 500 documents
      Step:2 - Performing some operations
      Step:3 - Setting expiration for those 500 records to expire immediately (Now - 100000 ms)
      Step:4 - Repeat until collection is empty

      Code that set the expiration

      private fun Database.setDocumentExpiration(id: String) {
          this.setDocumentExpiration(
              id,
              Date(System.currentTimeMillis() - 100000)
          )
      } 

      Attachments

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

        Activity

          People

            jianmin.zhao Jianmin Zhao
            pasin Pasin Suriyentrakorn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty