Java SDK native crash on Linux

When running the full test suite for my CBL KMP library, the JVM crashes with a native segfault on Linux. I haven’t experienced the same error on other platforms (Android, JVM on macOS, or JVM on Windows). My library doesn’t execute any JNI or native code on the JVM and Android platforms directly, so this error seems to originate from the underlying CBL Java SDK.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f13d53466c2, pid=2927, tid=3231
#
# JRE version: OpenJDK Runtime Environment Zulu21.44+17-CRaC-CA (21.0.8+9) (build 21.0.8+9-LTS)
# Java VM: OpenJDK 64-Bit Server VM Zulu21.44+17-CRaC-CA (21.0.8+9-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  0x00007f13d5343779
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t 9223372036854775808 %h %d" (or dumping to /home/runner/work/kotbase/kotbase/couchbase-lite-ee/core.2927)
#
# An error report file with more information is saved as:
# /home/runner/work/kotbase/kotbase/couchbase-lite-ee/hs_err_pid2927.log
#
# If you would like to submit a bug report, please visit:
#   http://www.azul.com/support/
#

Here’s an example CI job that failed. The hs_err_pid2927.log error log is available in the job’s test results archive.

It seems to be specific to the Enterprise Edition, as I always see it in the :couchbase-lite-ee:jvmTest Gradle task (never :couchbase-lite:jvmTest).

It happens occasionally when running tests locally on Ubuntu. It happens almost every time when running tests on the GitHub action CI runners. I’ve only managed to get a CI job to succeed on Linux a couple times since updating to CBL 3.2.4.

Thank you for reporting the issue
We have filed the issue and will be working on same