Failed to connect with Android RPC

Hi All,

I have build and setup Android RPC to mobile phone, but i cannot connect it with host PC. The output log (in host PC) as below: "python3 -m tvm.exec.rpc_tracker --host=0.0.0.0 --port=9190 INFO:RPCTracker:bind to 0.0.0.0:9190 ERROR:asyncio:Exception in callback BaseAsyncIOLoop._handle_events(10, 1) handle: <Handle BaseAsyncIOLoop._handle_events(10, 1)> Traceback (most recent call last): File “/home/quantq2/anaconda3/lib/python3.8/asyncio/events.py”, line 81, in _run self._context.run(self._callback, *self._args) File “/home/quantq2/anaconda3/lib/python3.8/site-packages/tornado/platform/asyncio.py”, line 139, in _handle_events handler_func(fileobj, events) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tornado_util.py”, line 41, in _event_handler self._event_handler(events) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tornado_util.py”, line 79, in _event_handler if self._update_read() and (events & self._ioloop.WRITE): File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tornado_util.py”, line 118, in _update_read self.on_message(msg) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tracker.py”, line 222, in on_message self.call_handler(json.loads(msg)) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tracker.py”, line 277, in call_handler if info[“addr”][0] is None: KeyError: ‘addr’ ERROR:asyncio:Exception in callback BaseAsyncIOLoop._handle_events(11, 1) handle: <Handle BaseAsyncIOLoop._handle_events(11, 1)> Traceback (most recent call last): File “/home/quantq2/anaconda3/lib/python3.8/asyncio/events.py”, line 81, in _run self._context.run(self._callback, *self._args) File “/home/quantq2/anaconda3/lib/python3.8/site-packages/tornado/platform/asyncio.py”, line 139, in _handle_events handler_func(fileobj, events) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tornado_util.py”, line 41, in _event_handler self._event_handler(events) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tornado_util.py”, line 79, in _event_handler if self._update_read() and (events & self._ioloop.WRITE): File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tornado_util.py”, line 118, in _update_read self.on_message(msg) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tracker.py”, line 222, in on_message self.call_handler(json.loads(msg)) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tracker.py”, line 277, in call_handler if info[“addr”][0] is None: KeyError: ‘addr’ ERROR:asyncio:Exception in callback BaseAsyncIOLoop._handle_events(12, 1) handle: <Handle BaseAsyncIOLoop._handle_events(12, 1)> Traceback (most recent call last): File “/home/quantq2/anaconda3/lib/python3.8/asyncio/events.py”, line 81, in _run self._context.run(self._callback, *self._args) File “/home/quantq2/anaconda3/lib/python3.8/site-packages/tornado/platform/asyncio.py”, line 139, in _handle_events handler_func(fileobj, events) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tornado_util.py”, line 41, in _event_handler self._event_handler(events) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tornado_util.py”, line 79, in _event_handler if self._update_read() and (events & self._ioloop.WRITE): File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tornado_util.py”, line 118, in _update_read self.on_message(msg) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tracker.py”, line 222, in on_message self.call_handler(json.loads(msg)) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tracker.py”, line 277, in call_handler if info[“addr”][0] is None: KeyError: ‘addr’ ERROR:asyncio:Exception in callback BaseAsyncIOLoop._handle_events(13, 1) handle: <Handle BaseAsyncIOLoop._handle_events(13, 1)> Traceback (most recent call last): File “/home/quantq2/anaconda3/lib/python3.8/asyncio/events.py”, line 81, in _run self._context.run(self._callback, *self._args) File “/home/quantq2/anaconda3/lib/python3.8/site-packages/tornado/platform/asyncio.py”, line 139, in _handle_events handler_func(fileobj, events) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tornado_util.py”, line 41, in _event_handler self._event_handler(events) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tornado_util.py”, line 79, in _event_handler if self._update_read() and (events & self._ioloop.WRITE): File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tornado_util.py”, line 118, in _update_read self.on_message(msg) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tracker.py”, line 222, in on_message self.call_handler(json.loads(msg)) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tracker.py”, line 277, in call_handler if info[“addr”][0] is None: KeyError: ‘addr’ ERROR:asyncio:Exception in callback BaseAsyncIOLoop._handle_events(14, 1) handle: <Handle BaseAsyncIOLoop._handle_events(14, 1)> Traceback (most recent call last): File “/home/quantq2/anaconda3/lib/python3.8/asyncio/events.py”, line 81, in _run self._context.run(self._callback, *self._args) File “/home/quantq2/anaconda3/lib/python3.8/site-packages/tornado/platform/asyncio.py”, line 139, in _handle_events handler_func(fileobj, events) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tornado_util.py”, line 41, in _event_handler self._event_handler(events) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tornado_util.py”, line 79, in _event_handler if self._update_read() and (events & self._ioloop.WRITE): File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tornado_util.py”, line 118, in _update_read self.on_message(msg) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tracker.py”, line 222, in on_message self.call_handler(json.loads(msg)) File “/media/quantq2/Data1/quantq2/Project/tvm/python/tvm/rpc/tracker.py”, line 277, in call_handler if info[“addr”][0] is None: KeyError: ‘addr’ "

Can anyone guide me the direction to fix?

if you see an error just after run of the tracker, there might be situation that you ran tracker previously, pressed Ctrl-C, have an intention that process is killed but it might still be in zombie state and retain 9190 port that will affect next runs of the tracker. To verify if this is a case - just point another port. Instead of 9190, just point 9191 If this is a case, there might be two solutions

  1. look for processes and kill suspected one ps ax | grep python, wait a little bit and try to start on the tracker on port 9190 gain
  2. just use another port.

@elvin-n Thank for your feedback, I have check and try, the problem didn’t come from previous tracker running

Try to build the repository with USE_RPC ON and USE_CPP_RPC ON in the config.make file if you didn’t try yet, it might help.