SIGBUS from libc on Android during inference
Hi @SichangHe, Can you provide more detailed instructions on how to replicate? I have created the model with your scripts but when I attempt to run the Android Studio Project for the client I get this issue:

![image](https://github.com/tensorflow/tensorflow/assets/132095473/ae10b32f-944e-48f8-a60d-197c81cb863c)

I am unfamiliar with Flutter/Dart so I'm probably just missing some steps, please let me know so that we may be able to reproduce your issue effectively. The more details you include the less back and forth we have to go through to reproduce your issue. Thanks for your help! Hi @pkgoogle.

Glad that the model generation script worked for you.

I will create a repository without Flutter to help you reproduce this issue.
 I've created https://github.com/SichangHe/reproduce_tensorflow_tensorflow_issue_61654, but it doesn't crash… I'm not sure why. The original app did not crash neither during my testing earlier today. I will talk to my colleague. @SichangHe, Thanks for checking, hope it helps! My colleague reproduced it again.

In the log, it seems that the sequence is `fit - evaluate - fit - eval… crash`. I will make it so that one could alter fit & evaluate so maybe we would be able to reproduce it.

Another take is to use the real data we used, but I'm not sure that is really relevant. I cycled through fitting and evaluation and used the data lead to the previous crash but it still didn't crash… I also cannot reproduce the crash using our app on my device any more, but my colleague still get crashes using our app on his device.

Any ideas why this inconsistency happens and how to help reproduce the crash? Hi @SichangHe, as you can imagine this is a tough situation haha. What device is your colleague using? Can you include logging for your app and give us the crash report? That is probably the best way to move forward. Thank you for your help. @Beilong-Tang, could you provide the above information? Unfortunately, we could not reproduce this issue any more. So, I'm closing this.

@pkgoogle, thanks for sticking around and helping!
### 1. System information

Server that generated the TFLite file:

- OS Platform and Distribution: `Linux debian 6.1.0-9-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.27-1 (2023-05-08) x86_64 GNU/Linux`.
- TensorFlow installation: Pip.
- TensorFlow library: tensorflow 2.13.0.

Android client that interprets this TFLite file and crashed:

- OS Platform and Distribution: Huawei `Hebe-BD00` running version 12.0.1 (presumably HarmonyOS).
- TensorFlow library: [Gradle dependencies on latest TFLite, GPU, support, and select TF Ops](https://github.com/FedCampus/FedKit/blob/f1ba4d438d19b5d984fe8d0fc6defd3710cc5892/android/fed_kit_train/build.gradle.kts).

### 2. Code

#### Option B: Paste your code here or provide a link to a custom end-to-end colab

This code is [under `gen_tflite` in FedKit](https://github.com/FedCampus/FedKit/tree/f1ba4d438d19b5d984fe8d0fc6defd3710cc5892/gen_tflite).
It is used to create [the TFLite files](https://github.com/FedCampus/FedKit/files/12391810/fed_mcrnn1.tflite.zip).

<details>
<summary>gen_tflite/__init__.py</summary>

```python
import tensorflow as tf

SAVED_MODEL_DIR = "saved_model"


def red(string: str) -> str:
    return f"\033[91m{string}\033[0m"


class BaseTFLiteModel(tf.Module):
    """Base TFLite model class to inherit from.
    # Usage
    Inherent from this class and then annotate with `@tflite_model_class`.
    Override these attributes:
    - `X_SHAPE`: Shape of the input to the model.
    - `Y_SHAPE`: Shape of the output from the model.
    - `model`: A `tf.keras.Model` initialized in `__init__`.
    # Functionality
    Provides default implementation of `train`, `infer`, `parameters`, `restore`.
    These methods are not annotated with `@tf.function`;
    they are supposed to be converted by `@tflite_model_class`."""

    X_SHAPE: list[int]
    Y_SHAPE: list[int]
    model: tf.keras.Model

    def train(self, x, y):
        return self.model.train_step((x, y))

    def infer(self, x):
        return {"logits": self.model(x)}

    def parameters(self):
        return {
            f"a{index}": weight.read_value()
            for index, weight in enumerate(self.model.weights)
        }

    def restore(self, **parameters):
        for index, weight in enumerate(self.model.weights):
            parameter = parameters[f"a{index}"]
            weight.assign(parameter)
        assert self.parameters is not None
        return self.parameters()


def tflite_model_class(cls):
    """Convert `cls` that inherits from `BaseTFLiteModel` to a TFLite model class.
    Convert `cls`'s methods using `@tf.function` with proper `input_signature`
    according to `X_SHAPE` and `Y_SHAPE`.
    The converted methods are `train`, `infer`, `parameters`, `restore`.
    Only `restore`'s `input_signature` is not specified because it need to be
    determined after examples of parameters are given."""
    cls.x_spec = tf.TensorSpec([None] + cls.X_SHAPE, tf.float32)  # type: ignore
    cls.y_spec = tf.TensorSpec([None] + cls.Y_SHAPE, tf.float32)  # type: ignore
    cls.train = tf.function(
        cls.train,
        input_signature=[cls.x_spec, cls.y_spec],
    )
    cls.infer = tf.function(
        cls.infer,
        input_signature=[cls.x_spec],
    )
    cls.parameters = tf.function(cls.parameters, input_signature=[])
    cls.restore = tf.function(cls.restore)
    return cls


def save_model(model, saved_model_dir):
    parameters = model.parameters.get_concrete_function()
    init_params = parameters()
    print(f"Initial parameters is {init_params}.")
    restore = model.restore.get_concrete_function(**init_params)
    restore_test = restore(**init_params)
    print(f"Restore test result: {restore_test}.")
    tf.saved_model.save(
        model,
        saved_model_dir,
        signatures={
            "train": model.train.get_concrete_function(),
            "infer": model.infer.get_concrete_function(),
            "parameters": parameters,
            "restore": restore,
        },
    )

    converted_params = [
        param.numpy() for param in parameters_from_raw_dict(init_params)
    ]
    shape = f"{[list(param.shape) for param in converted_params]}"
    print(f"Model parameter shape: {red(shape)}.")
    byte_sizes = f"{[param.size * param.itemsize for param in converted_params]}"
    print(f"Model parameter sizes in bytes: {red(byte_sizes)}.")
    return converted_params


def convert_saved_model(saved_model_dir):
    converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir)
    converter.target_spec.supported_ops = [
        tf.lite.OpsSet.TFLITE_BUILTINS,  # enable TensorFlow Lite ops.
        tf.lite.OpsSet.SELECT_TF_OPS,  # enable TensorFlow ops.
    ]

    converter.experimental_enable_resource_variables = True
    tflite_model = converter.convert()

    return tflite_model


def parameters_from_raw_dict(raw_dict):
    parameters = []
    index = 0
    while True:
        parameter = raw_dict.get(f"a{index}")
        if parameter is None:
            break
        parameters.append(parameter)
        index += 1
    return parameters


def save_tflite_model(tflite_model, tflite_file):
    with open(tflite_file, "wb") as model_file:
        return model_file.write(tflite_model)
```

</details>

<details>
<summary>gen_tflite/fed_mcrnn_eg/run.py</summary>

```python
from os import path

from .. import *
from . import FedMCRNNModel

DIR = path.dirname(__file__)


TFLITE_FILE = f"fed_mcrnn1.tflite"


def main():
    model = FedMCRNNModel()
    save_model(model, SAVED_MODEL_DIR)
    tflite_model = convert_saved_model(SAVED_MODEL_DIR)
    save_tflite_model(tflite_model, TFLITE_FILE)


main() if __name__ == "__main__" else None
```

</details>

<details>
<summary>gen_tflite/fed_mcrnn_eg/__init__.py</summary>

```python
from tensorflow import keras

from .. import *


@tflite_model_class
class FedMCRNNModel(BaseTFLiteModel):
    X_SHAPE = [7, 8]
    Y_SHAPE = [1]

    def __init__(self):
        self.model = self.build_model()

    def build_model(self):
        """Written and tuned by Aicha Slaitane in Aug 2023."""
        model = keras.Sequential()
        # For the first LSTM layer, specify the input_shape
        model.add(
            keras.layers.LSTM(
                # Tune number of units separately.
                units=384,
                input_shape=self.X_SHAPE,
                return_sequences=True,
            )
        )
        model.add(keras.layers.LeakyReLU(0.523629795960645))
        model.add(keras.layers.Dropout(0.372150795833))

        # For subsequent LSTM layers, no need to specify input_shape
        model.add(
            keras.layers.LSTM(
                units=64,
                return_sequences=True,
            )
        )
        model.add(keras.layers.LeakyReLU(0.523629795960645))
        model.add(keras.layers.Dropout(0.372150795833))

        model.add(
            keras.layers.LSTM(
                units=480,
                return_sequences=True,
            )
        )
        model.add(keras.layers.LeakyReLU(0.523629795960645))
        model.add(keras.layers.Dropout(0.372150795833))
        model.add(keras.layers.Flatten())
        model.add(keras.layers.Dense(1))

        model.compile(
            optimizer=keras.optimizers.Adam(learning_rate=0.00668472266354),
            loss="mean_squared_error",
            metrics=["mean_absolute_error"],
        )
        return model
```

</details>

Command to build the TFLite file: `python3 -m gen_tflite.fed_mcrnn_eg.run`.

---

Code used on the Android side is [in `FlowerClient.kt` in FedKit](https://github.com/FedCampus/FedKit/blob/f1ba4d438d19b5d984fe8d0fc6defd3710cc5892/android/fed_kit_train/src/main/java/org/eu/fedcampus/fed_kit_train/FlowerClient.kt).

<details>
<summary>Relevant code</summary>

```kotlin
/**
 * Flower client that handles TensorFlow Lite model [Interpreter] and sample data.
 * @param tfliteFileBuffer TensorFlow Lite model file.
 * @param spec Specification for the samples, see [SampleSpec].
 */
class FlowerClient<X : Any, Y : Any>(
    tfliteFileBuffer: MappedByteBuffer,
    val layersSizes: IntArray,
    val spec: SampleSpec<X, Y>,
) : AutoCloseable {
    val interpreter = Interpreter(tfliteFileBuffer)
    val interpreterLock = ReentrantLock()
    val trainingSamples = mutableListOf<Sample<X, Y>>()
    val testSamples = mutableListOf<Sample<X, Y>>()
    val trainSampleLock = ReentrantReadWriteLock()
    val testSampleLock = ReentrantReadWriteLock()

    /**
     * Run inference on [x] using [interpreter] and return the result.
     */
    fun inference(x: Array<X>): Array<Y> {
        val inputs = mapOf("x" to x)
        val logits = spec.emptyY(x.size)
        val outputs = mapOf("logits" to logits)
        runSignatureLocked(inputs, outputs, "infer")
        return logits
    }

    private fun runSignatureLocked(
        inputs: Map<String, Any>,
        outputs: Map<String, Any>,
        signatureKey: String
    ) {
        interpreterLock.withLock {
            interpreter.runSignature(inputs, outputs, signatureKey)
        }
    }
}
```

</details>


### 3. Failure after conversion

See also [issue `Training Fatel Signal` on FedKit](https://github.com/FedCampus/FedKit/issues/15):

<details>
<summary>Crash log</summary>

```ruby
F/libc    (25011): Fatal signal 7 (SIGBUS), code 2 (BUS_ADRERR), fault addr 0x77db8b7690 in tid 10606 (DefaultDispatch), pid 25011 (.cuhk.fedcampus)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Hinova/TINA-AN00/TS-TINA-Q:11/HinovaHebe-BD00/102.0.1.166C11:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2023-08-21 09:42:39+0800
pid: 25011, tid: 10606, name: DefaultDispatch  >>> com.cuhk.fedcampus <<<
uid: 10263
signal 7 (SIGBUS), code 2 (BUS_ADRERR), fault addr 0x77db8b7690
    x0  b4000077a668b344  x1  00000077db8b7690  x2  0000000000000004  x3  0000000000000001
    x4  00000077db8b7694  x5  b4000077a668b348  x6  0000000000000008  x7  0000000000000008
    x8  00000077db8b7690  x9  0000000000000000  x10 b4000077da4d1bc0  x11 00000077db8b7690
    x12 3ddde2cdbc34570b  x13 3deefded3df00685  x14 0000000000000003  x15 00000000ebad6a89
    x16 00000077ce7e1ed0  x17 00000078ef4d8c40  x18 00000077d1238000  x19 0000000000000004
    x20 b4000077a668b340  x21 b4000077f8cc3b10  x22 0000000000000000  x23 0000000000000001
    x24 0000000000000001  x25 0000000000000001  x26 0000000000000001  x27 0000000000000001
    x28 0000000000000002  x29 00000078589791f0
    lr  00000077ce5999ec  sp  0000007858979110  pc  00000078ef4d8b44  pst 0000000080001000
backtrace:
#00 pc 0000000000086b44  /apex/com.android.runtime/lib64/bionic/libc.so (__memcpy+116) (BuildId: ed6fa1d1056492860af901caffabe1a6)
      #01 pc 000000000014e9e8  /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk!libtensorflowlite_jni.so (offset 0x8263000)
      #02 pc 00000000002d5d68  /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk!libtensorflowlite_jni.so (offset 0x8263000)
      #03 pc 00000000002d575c  /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk!libtensorflowlite_jni.so (offset 0x8263000)
      #04 pc 00000000002c25a8  /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk!libtensorflowlite_jni.so (offset 0x8263000)
      #05 pc 0000000000025668  /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk!libtensorflowlite_jni.so (offset 0x8263000) (Java_org_tensorflow_lite_NativeInterpreterWrapper_run+100)
      #06 pc 000000000014fed4  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #07 pc 00000000001467e8  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #08 pc 00000000001bc26c  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+236) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #09 pc 00000000003361cc  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #10 pc 000000000032c440  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+996) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #11 pc 00000000006ce704  /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+548) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #12 pc 0000000000140994  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #13 pc 00000000003f9aea  [anon:dalvik-classes.dex extracted in memory from /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk] (org.tensorflow.lite.NativeInterpreterWrapper.run+122)
      #14 pc 00000000003236fc  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.15210458325005997145)+348) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #15 pc 00000000006abad0  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+780) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #16 pc 000000000014fff8  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #17 pc 000000000206b0f4  /memfd:jit-cache (deleted) (offset 0x2000000) (org.tensorflow.lite.NativeInterpreterWrapper.runSignature+1044)
      #18 pc 0000000000146564  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #19 pc 00000000001bc250  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+208) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #20 pc 00000000003361cc  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #21 pc 000000000032c440  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+996) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #22 pc 00000000006cb78c  /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+848) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #23 pc 0000000000140814  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #24 pc 00000000003f8e14  [anon:dalvik-classes.dex extracted in memory from /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk] (org.tensorflow.lite.Interpreter.runSignature+36)
      #25 pc 00000000006cba2c  /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+1520) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #26 pc 0000000000140814  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #27 pc 00000000003f6440  [anon:dalvik-classes.dex extracted in memory from /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk] (org.eu.fedcampus.fed_kit_train.FlowerClient.runSignatureLocked+20)
      #28 pc 00000000006ce0c8  /apex/com.android.art/lib64/libart.so (MterpInvokeDirect+1248) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #29 pc 0000000000140914  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #30 pc 00000000003f5aa0  [anon:dalvik-classes.dex extracted in memory from /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk] (org.eu.fedcampus.fed_kit_train.FlowerClient.inference+84)
      #31 pc 00000000006cba2c  /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+1520) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #32 pc 0000000000140814  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #33 pc 00000000003f616e  [anon:dalvik-classes.dex extracted in memory from /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk] (org.eu.fedcampus.fed_kit_train.FlowerClient.evaluate+146)
      #34 pc 00000000006cba2c  /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+1520) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #35 pc 0000000000140814  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #36 pc 0000000000001284  [anon:dalvik-classes7.dex extracted in memory from /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk!classes7.dex] (com.cuhk.fedcampus.train.FedmcrnnClient$evaluate$1.invokeSuspend+52)
      #37 pc 00000000006cba2c  /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+1520) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #38 pc 0000000000140814  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #39 pc 0000000000001234  [anon:dalvik-classes7.dex extracted in memory from /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk!classes7.dex] (com.cuhk.fedcampus.train.FedmcrnnClient$evaluate$1.invoke+16)
      #40 pc 00000000006cba2c  /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+1520) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #41 pc 0000000000140814  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #42 pc0000000000001208  [anon:dalvik-classes7.dex extracted in memory from /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk!classes7.dex] (com.cuhk.fedcampus.train.FedmcrnnClient$evaluate$1.invoke+4)
      #43 pc 00000000006cd464  /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #44 pc 0000000000140a14  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #45 pc 0000000000001b00  [anon:dalvik-classes7.dex extracted in memory from /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk!classes7.dex] (com.cuhk.fedcampus.train.FedmcrnnClient$tryLaunch$1.invokeSuspend+72)
      #46 pc 00000000006cba2c  /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+1520) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #47 pc 0000000000140814  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #48 pc 0000000000363596  [anon:dalvik-classes.dex extracted in memory from /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk] (kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith+42)
      #49 pc 00000000006cd464  /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #50 pc 0000000000140a14  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #51 pc 00000000003a9a98  [anon:dalvik-classes.dex extracted in memory from /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk] (kotlinx.coroutines.DispatchedTask.run+448)
      #52 pc 00000000006cba2c  /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+1520) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #53 pc 0000000000140814  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #54 pc 00000000003ea81e  [anon:dalvik-classes.dex extracted in memory from /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk] (kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely+2)
      #55 pc 00000000006cba2c  /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+1520) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #56 pc 0000000000140814  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #57 pc 00000000003e93fa  [anon:dalvik-classes.dex extracted in memory from /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask+34)
      #58 pc 00000000006ce0c8  /apex/com.android.art/lib64/libart.so (MterpInvokeDirect+1248) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #59 pc 0000000000140914  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #60 pc 00000000003e9528  [anon:dalvik-classes.dex extracted in memory from /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker+56)
      #61 pc 00000000006ce0c8  /apex/com.android.art/lib64/libart.so (MterpInvokeDirect+1248) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #62 pc 0000000000140914  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #63 pc 00000000003e94d8  [anon:dalvik-classes.dex extracted in memory from /data/app/~~jOMJSmliax2W9nG0uNnx0g==/com.cuhk.fedcampus-KOBIK4l5h_A1eePLjPC9Jg==/base.apk] (kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run)
      #64 pc 00000000003236fc  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.15210458325005997145)+348) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #65 pc 00000000006abad0  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+780) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #66 pc 000000000014fff8  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #67 pc 0000000000146564  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #68 pc 00000000001bc250  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+208) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #69 pc 0000000000591268  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+460) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #70 pc 00000000005e3bd0  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1364) (BuildId: c83b725cb502ebcf2b3b28039ccfbfa6)
      #71 pc 00000000000ed068  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: ed6fa1d1056492860af901caffabe1a6)
      #72 pc 000000000008d5e0  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: ed6fa1d1056492860af901caffabe1a6)
Lost connection to device.
Exited (sigterm)
```

</details>
