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

Local reference table overflow

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Declined
    • 2.6.0, 2.7.0
    • 2.7.0
    • Java-Android
    • Security Level: Public
    • None
    • 8

    Description

      07-01 08:52:39.739 xxx.yyy.zzzA/art: vendor/intel/art-extension/runtime/indirect_reference_table.cc:115] JNI ERROR (app bug): local reference table overflow (max=512)
      07-01 08:52:39.739 xxx.yyy.zzzA/art: vendor/intel/art-extension/runtime/indirect_reference_table.cc:115] local reference table dump:
      07-01 08:52:39.739 xxx.yyy.zzzA/art: vendor/intel/art-extension/runtime/indirect_reference_table.cc:115] Last 10 entries (of 512):
      07-01 08:52:39.739 xxx.yyy.zzzA/art: vendor/intel/art-extension/runtime/indirect_reference_table.cc:115] 511: 0x14c63670 com.couchbase.litecore.C4DocumentEnded
      07-01 08:52:39.739 xxx.yyy.zzzA/art: vendor/intel/art-extension/runtime/indirect_reference_table.cc:115] 510: 0x135a2dd0 java.lang.String "1-0eb679257d1cca... (42 chars)
      07-01 08:52:39.739 xxx.yyy.zzzA/art: vendor/intel/art-extension/runtime/indirect_reference_table.cc:115] 509: 0x144ef500 java.lang.String "mst_c9cc36e2-fab... (81 chars)
      07-01 08:52:39.739 xxx.yyy.zzzA/art: vendor/intel/art-extension/runtime/indirect_reference_table.cc:115] 508: 0x14c636a0 com.couchbase.litecore.C4DocumentEnded
      07-01 08:52:39.739 xxx.yyy.zzzA/art: vendor/intel/art-extension/runtime/indirect_reference_table.cc:115] 507: 0x135a2eb0 java.lang.String "1-8aa87dac5541a2... (42 chars)
      07-01 08:52:39.739 xxx.yyy.zzzA/art: vendor/intel/art-extension/runtime/indirect_reference_table.cc:115] 506: 0x144ef5c0 java.lang.String "mst_7df37243-04d... (81 chars)
      07-01 08:52:39.739 xxx.yyy.zzzA/art: vendor/intel/art-extension/runtime/indirect_reference_table.cc:115] 505: 0x14c636d0 com.couchbase.litecore.C4DocumentEnded
      07-01 08:52:39.739 xxx.yyy.zzzA/art: vendor/intel/art-extension/runtime/indirect_reference_table.cc:115] 504: 0x135a2f90 java.lang.String "1-89b70d91218a04... (42 chars)
      07-01 08:52:39.739 xxx.yyy.zzzA/art: vendor/intel/art-extension/runtime/indirect_reference_table.cc:115] 503: 0x144ef680 java.lang.String "mst_db1043c6-e98... (81 chars)
      07-01 08:52:39.739 xxx.yyy.zzzA/art: vendor/intel/art-extension/runtime/indirect_reference_table.cc:115] 502: 0x14c63700 com.couchbase.litecore.C4DocumentEnded

      Attachments

        Issue Links

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

          Activity

            blake.meike Blake Meike added a comment - Origin issue is Github: https://github.com/couchbase/couchbase-lite-android-ce/issues/15  
            blake.meike Blake Meike added a comment - @Pasin points to the code causing this problem, here: https://github.com/couchbase/couchbase-lite-java/blob/release/cobalt/src/main/cpp/native_c4replicator.cc#L137-L181
            blake.meike Blake Meike added a comment -

            I'm seeing a lot of evidence to support the idea that this has something to do with the debugger.  Apparently the debugger promotes local references to global, to hang on to them across breakpoints.

            I note, further, the following (assuming that this has something to do with an extraordinary number of global refs to C4DocumentEnded objects):

            1) Our code explicitly creates only a single Global reference to a C4DocumentEnded.  I can't rule out that they are being created, implicitly, somewhere, but I have no evidence for that either.

            2) The actual failure is not taking place anywhere near the code that creates a C4Document.  That could be because the failure takes places when attempting to create something other than a C4DcoumentEnded

            3) The actual failure, in both this and in CBL-292, is near logging.  If this turns out to have nothing to do with a debugger, it might be worth finding out if the Android logger creates GlobalRefs.

             

            blake.meike Blake Meike added a comment - I'm seeing a lot of evidence to support the idea that this has something to do with the debugger.  Apparently the debugger promotes local references to global, to hang on to them across breakpoints. I note, further, the following (assuming that this has something to do with an extraordinary number of global refs to C4DocumentEnded objects): 1) Our code explicitly creates only a single Global reference to a C4DocumentEnded.  I can't rule out that they are being created, implicitly, somewhere, but I have no evidence for that either. 2) The actual failure is not taking place anywhere near the code that creates a C4Document.  That could be because the failure takes places when attempting to create something other than a C4DcoumentEnded 3) The actual failure, in both this and in CBL-292 , is near logging.  If this turns out to have nothing to do with a debugger, it might be worth finding out if the Android logger creates GlobalRefs.  
            blake.meike Blake Meike added a comment -

            QE has recently seen a bug like this, so I would like this one out of the way. This instance, and the related instance have bothe been root-caused: an attached debugger causes JNI to hold references, overflowing the table.

            blake.meike Blake Meike added a comment - QE has recently seen a bug like this, so I would like this one out of the way. This instance, and the related instance have bothe been root-caused: an attached debugger causes JNI to hold references, overflowing the table.

            People

              The Lite The Lite
              blake.meike Blake Meike
              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