Android RPC stuck on load_module

Currently, I’m trying to deploy pre-trained models to Android devices via TVM_RPC.
The devices are well connected to TVM tracker as you can see below,

Tracker address localhost:9190

Server List
----------------------------
server-address key
192.168.1.24:38523 server:android
----------------------------

Queue Status
----------------------------
key total free pending
android 1 1 0
----------------------------

However, when executing android_rpc_test.py and deploy_model_on_android.py,
the below error occurs in the load_module function.

Traceback (most recent call last):

File “android_rpc_test.py”, line 132, in
test_rpc_module()

File “android_rpc_test.py”, line 75, in test_rpc_module
f2 = remote.load_module(“cpu_lib.so”)

File “/workspacee/python/tvm/rpc/client.py”, line 148, in load_module
return bse._LoadRemoteModule(self._sess, path)

File “/workspace/python/tvm/_ffi/_ctypes/function.py”, line 210, in call
raise get_last_ffi_error()

tvm._ffi.base.TVMError: Traceback (most recent call last):
[bt] (4) /workspace/build/libtvm.so(TVMFuncCall+0x61) [0x7f99a799e61]
[bt] (3) /workspace/build/libtvm.so(+0xcd2e14) [0x7f979a7d5e14]
[bt] (2) /workspace/build/libtvm.so(+0xcd23a6) [0x7f979a7d53a6]
[bt] (1) /workspace/build/libtvm.so(+0xce4232) [0x7f979a7e7232]
[bt] (0) /workspace/build/libtvm.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x32) [0x7f9799face12]
File “/workspace/src/runtime/rpc/rpc_session.cc”, line 875
TVMError: Check failed: code == RPCCode: :kReturn: code=4

And, the adb logcat | grep “tvm4j” is like:
W/System.err(29955): Load module from /data/data/ml.dmlc.tvm.tvmrpc/cache/tvm4j_rpc_-701471314/cpu_lib.so
W/linker (29955): /data/data/ml.dmlc.tvm.tvmrpc/cache/tvm4j_rpc_-701471314/cpu_lib.so: unused DT entry: type 0x6ffffef5 arg 0x1c8
W/linker (29955): /data/data/ml.dmlc.tvm.tvmrpc/cache/tvm4j_rpc_-701471314/cpu_lib.so: unused DT entry: type 0x6ffffffe arg 0x4f8
W/linker (29955): /data/data/ml.dmlc.tvm.tvmrpc/cache/tvm4j_rpc_-701471314/cpu_lib.so: unused DT entry: type 0x6fffffff arg 0x1
D/TVM_RUNTIME(29955): [15:17:33] /home/ykim/tvm/tvm/apps/android_rpc/app/src/main/jni/…/…/…/…/…/…/3rdparty/dmlc-core/include/dmlc/logging.h:424: [15:17:33] /home/ykim/tvm/tvm/apps/android_rpc/app/src/main/jni/…/…/…/…/…/…/include/…/src/runtime/dso_module.cc:112: Check failed: lib_handle_ != nullptr: Failed to load dynamic shared library /data/data/ml.dmlc.tvm.tvmrpc/cache/tvm4j_rpc_-701471314/cpu_lib.so dlopen failed: empty/missing DT_HASH in “/data/data/ml.dmlc.tvm.tvmrpc/cache/tvm4j_rpc_-701471314/cpu_lib.so” (built with --hash-style=gnu?)
F/art (29955): art/runtime/thread.cc:1143] No pending exception expected: ml.dmlc.tvm.Base$TVMError: TVMError: Check failed: lib_handle_ != nullptr: Failed to load dynamic shared library /data/data/ml.dmlc.tvm.tvmrpc/cache/tvm4j_rpc_-701471314/cpu_lib.so dlopen failed: empty/missing DT_HASH in “/data/data/ml.dmlc.tvm.tvmrpc/cache/tvm4j_rpc_-701471314/cpu_lib.so” (built with --hash-style=gnu?)
W/System.err(29955): Deleting /data/data/ml.dmlc.tvm.tvmrpc/cache/tvm4j-1753629381

Note I’m currently using Dockerfile.demo_android and
this happend when I was not use docker.

Please let me know if you have an idea to solve the above problem.

Thanks!

first,make sure the key is same with your rpc app key ( android according to your log ) second ,maybe the you device build version is lower than rpc app ,the console may be in stuck for a long time ,then log TVMError: Check failed: code == RPCCode: :kReturn: code=4 ;