Android_rpc_test.py does not return anything

Hello,

I am carrying out the deploy_model_on_android tutorial.

It worked well up to Register Android device to RPC Tracker.

However when I run tests/android_rpc_test.py, it does not return anything.

Apparently there is a problem with the following code execution, so I tried following code with max_retry=1.

remote = tracker.request(key, priority=0,
                             session_timeout=60)

It returned following error.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/workspace/python/tvm/rpc/client.py", line 329, in request
    key, max_retry, str(last_err)))
RuntimeError: Cannot request android after 1 retry, last_error:Traceback (most recent call last):
  [bt] (4) /workspace/build/libtvm.so(TVMFuncCall+0x61) [0x7fe1e9392e51]
  [bt] (3) /workspace/build/libtvm.so(+0x9bb854) [0x7fe1e939c854]
  [bt] (2) /workspace/build/libtvm.so(+0x9ba2b4) [0x7fe1e939b2b4]
  [bt] (1) /workspace/build/libtvm.so(+0x9b6184) [0x7fe1e9397184]
  [bt] (0) /workspace/build/libtvm.so(+0x1b79e2) [0x7fe1e8b989e2]
  File "/workspace/src/runtime/rpc/rpc_socket_impl.cc", line 77
TVMError: Check failed: sock.RecvAll(&code, sizeof(code)) == sizeof(code) (0 vs. 4) :

Do you have any idea what can be the cause of the problem?
Thanks

I had this error previously, I think it occurs when you don’t use the same key for connecting the client/server so try checking that. It is the key you used in the android rpc app, in the the example you find it at tracker.request(key, priority=0, session_timeout=60).

Personally I don’t use any key (so I empty the field in the android app and put an empty string in the code). The key is useful when you have multiple devices and you want to distinguish them.

PS: you also find the devices keys in used when running python -m tvm.query_rpc_tracker in the Queue Status section (when using no key you just the output of the other columns not aligned).

Thanks!

I checked the key, but I used the same key(android).

I tried to run it without setting the key, but the result was the same.

What does python -m tvm.query_rpc_tracker return?
If you don’t find any device, this may help you

This is the return value.

Tracker address 0.0.0.0:9190

Server List
----------------------------
server-address	key
----------------------------
172.17.0.1:40150	server:android
----------------------------

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

hey, have you solved the problem?

@hiroki I run into the same issue. Did you solve it?

@brucechou1983 No I couldn’t resolve this issue.

I have met the same problem: python3 -m tvm.exec.query_rpc_tracker --host=0.0.0.0 --port=9190

Tracker address 0.0.0.0:9190

Server List
----------------------------
server-address	key
----------------------------
172.17.0.1:57044	server:rk3399
----------------------------

Queue Status
-------------------------------
key       total  free  pending
-------------------------------
rk3399    1      0     4
-------------------------------

Then run python3 android_rpc_test.py there is no response

This code is running in docker.

I met same issue and still not find the solution. server address is always 172.17.0.1, and is not mobile address. Both server and mobile are using same wifi.

Anyone has solution/workaround for this issue?

same problem for me. Running in docker