We are encountering a native crash after using the app for a while

We are facing below issue in our application. Please find the details below

Couchbase Server Community Edition 6.6.0
Couchbase Sync Gateway/2.8

Couchbase lite: com.couchbase.lite:couchbase-lite-android-ee:3.1.3

Device: Galaxy Tab A7.

Uploading two different bucket logs please find below.

Please do help us for resolving this issue.

Cmdline: xxx.xxx.xx.xx.xx
2024-06-25 12:05:14.305  3420-3420  DEBUG                   crash_dump64                         A  pid: 2970, tid: 3006, name: DefaultDispatch  >>> *****.***.***.*** <<<
2024-06-25 12:05:14.305  3420-3420  DEBUG                   crash_dump64                         A        #01 pc 0000000000268e04  /data/app/~~twH24Kj8BuC4gzoc49YFag==/*****.***.***.***-6X3NDSJKtK9fUgJEuZCcGA==/base.apk!libLiteCore.so (BuildId: 7f9cabd96d8f470aa0dde31660413da4fd7e34c0)
2024-06-25 12:05:14.305  3420-3420  DEBUG                   crash_dump64                         A        #02 pc 0000000000191b5c  /data/app/~~twH24Kj8BuC4gzoc49YFag==/*****.***.***.***-6X3NDSJKtK9fUgJEuZCcGA==/base.apk!libLiteCore.so (c4log_getDomain+24) (BuildId: 7f9cabd96d8f470aa0dde31660413da4fd7e34c0)
2024-06-25 12:05:14.305  3420-3420  DEBUG                   crash_dump64                         A        #03 pc 0000000000014164  /data/app/~~twH24Kj8BuC4gzoc49YFag==/*****.***.***.***-6X3NDSJKtK9fUgJEuZCcGA==/base.apk!libLiteCoreJNI.so (Java_com_couchbase_lite_internal_core_impl_NativeC4Log_log+96) (BuildId: 2f7efdccbca075c19cc7770a9c7a48a9add6d16d)
2024-06-25 12:05:14.306  3420-3420  DEBUG                   crash_dump64                         A        #09 pc 00000000004c2760  /data/app/~~twH24Kj8BuC4gzoc49YFag==/*****.***.***.***-6X3NDSJKtK9fUgJEuZCcGA==/base.apk
2024-06-25 12:05:14.306  3420-3420  DEBUG                   crash_dump64                         A        #14 pc 00000000004be844  /data/app/~~twH24Kj8BuC4gzoc49YFag==/*****.***.***.***-6X3NDSJKtK9fUgJEuZCcGA==/base.apk
2024-06-25 12:05:14.306  3420-3420  DEBUG                   crash_dump64                         A        #19 pc 00000000004ad498  /data/app/~~twH24Kj8BuC4gzoc49YFag==/*****.***.***.***-6X3NDSJKtK9fUgJEuZCcGA==/base.apk
2024-06-25 12:05:14.306  3420-3420  DEBUG                   crash_dump64                         A        #24 pc 00000000004cb2e0  /data/app/~~twH24Kj8BuC4gzoc49YFag==/*****.***.***.***-6X3NDSJKtK9fUgJEuZCcGA==/base.apk
2024-06-25 12:05:14.306  3420-3420  DEBUG                   crash_dump64                         A        #29 pc 00000000004cb210  /data/app/~~twH24Kj8BuC4gzoc49YFag==/*****.***.***.***-6X3NDSJKtK9fUgJEuZCcGA==/base.apk
2024-06-25 12:05:14.306  3420-3420  DEBUG                   crash_dump64                         A        #34 pc 00000000004cb0c0  /data/app/~~twH24Kj8BuC4gzoc49YFag==/*****.***.***.***-6X3NDSJKtK9fUgJEuZCcGA==/base.apk
2024-06-25 12:05:14.306  3420-3420  DEBUG                   crash_dump64                         A        #39 pc 00000000004a4818  /data/app/~~twH24Kj8BuC4gzoc49YFag==/*****.***.***.***-6X3NDSJKtK9fUgJEuZCcGA==/base.apk

bucket1Logs.zip (133.9 KB)

bucket2Logs.zip (3.8 MB)

I’m not quite sure what’s up, here. This looks to me like a known bug that we fixed in v3.1.3. I can see from your logs that you definitely are using 3.1.3, though. I’m confused.
If you can get me the console logs for and incident, I’ll have a better chance of figuring out what’s going wrong. Tombstones (adb bugreport) would also help.

Please find the required logs. This issue occurs frequently in the release environment, but it’s not as easy to reproduce in our lab whenever we try.logcat.txt.zip (13.2 KB)

@Sreenivasulu : thanks for the quick turnaround. I understand the problem with trying to recover logs from mobile devices. It’s a pain.

The file you enclosed contains, literally, no CBL logs. In order to be useful, I will need you to:

  • set logging to DEBUG for the console logger
Database.log.getConsole().setLevel(LogLevel.DEBUG)

Then I need to see the incident. There should be a log message that has lots of asterisks and includes the word SIGSEGV. I need the logs from about 30 sec before that happens up to and including the crash

Also, if you can get the tombstone from the device with adb crashdump that might be a help.

I will continue to look around to see if I can’t figure out what is happening.

@blake.meike please find the zip file below which consists of cb-lite logs,bug report.

Used below code for logging cblogs

 CouchbaseLite.init(context)
        dataBase = Database(dataBaseName, DatabaseConfiguration())

        var path = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
            context.getExternalFilesDir(null)!!.absolutePath
        } else {
            Environment.getExternalStorageDirectory().absolutePath
        }

        path = File(path + File.separator + "GH_CB_LOGS").apply {
            if (!this.exists()) {
                this.mkdirs()
            }
        }.absolutePath

        val logCfg = LogFileConfiguration(path).apply {
            maxSize = 10 * 1024 * 1024
            maxRotateCount = 5
            setUsePlaintext(false)
        }

        Database.log.file.config = logCfg
        Database.log.file.level = LogLevel.DEBUG

Yeah… As I pointed out, those are not the console logs. I will have a much better chance of figuring out what is going on, if you get the console logs to me.

Also, that zip file is just a zip file of logs. It is not a crash report obtained using adb bugreport.

Also, I see that you are using the Enterprise version of CBL. If you are a customer, I suggest that you contact the Couchbase Support team and open a ticket to get this fixed.

@blake.meike Please find bug report below, hope it helps fixing the issue, based on your finding we will create ticket.

bugreport-2024-07-08-14-08-03.zip (7.1 MB)

Thank you for the additional information. If you look through the stacktraces in the tombstones in that bugreport, you will see that only one of the issues includes Couchbase code, and that that one is an error in processing an HTTP connection.

Unfortunately, that still provides no useful information about what is causing the issue you are seeing.