does not return anything


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/, 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,

It returned following error.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/workspace/python/tvm/rpc/", 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/ [0x7fe1e9392e51]
  [bt] (3) /workspace/build/ [0x7fe1e939c854]
  [bt] (2) /workspace/build/ [0x7fe1e939b2b4]
  [bt] (1) /workspace/build/ [0x7fe1e9397184]
  [bt] (0) /workspace/build/ [0x7fe1e8b989e2]
  File "/workspace/src/runtime/rpc/", 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?

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).


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

Server List
server-address	key
----------------------------	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= --port=9190

Tracker address

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

Queue Status
key       total  free  pending
rk3399    1      0     4

Then run python3 there is no response

This code is running in docker.

I met same issue and still not find the solution. server address is always, 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

i just found the problem , i follow the turtorial to depoly android_rpc with docker on MacOS.

when i use python3 -m tvm.exec.query_rpc_tracker --host= --port=9190, i got server-address : and is not my android’s ip.

when i run python3 there is no response, and i got

" File “/workspace/python/tvm/rpc/”, line 83, in recvall chunk = sock.recv(min(nbytes - nread, 1024)) ".

Then i ping my host ip and my android ip in docker continer, i CANN’T PING these two ip because "The docker (Linux) bridge network is not reachable from the macOS host."Networking features in Docker Desktop for Mac | Docker Documentation

Finally i deploy my container to Linux and it’s works. So if you use docker in MacOS, you may should do some hard work to slove the problem of network.