TVMError: Check failed: code == RPCCode: :kReturn: code=4

when I use the the script deploy_model_on_android.py to test with my phone ,the rpc app will relauch ,the the python script will crash .i have sucess to test the cross_compilation_and_rpc.py script . the log as folow: Traceback (most recent call last): File “/media/yzh/program/tvm/python/tvm/_ffi/_ctypes/ndarray.py”, line 82, in del check_call(_LIB.TVMArrayFree(self.handle)) File “/media/yzh/program/tvm/python/tvm/_ffi/base.py”, line 314, in check_call raise get_last_ffi_error() tvm._ffi.base.TVMError: Traceback (most recent call last): [bt] (6) /media/yzh/program/tvm/build/libtvm.so(TVMArrayFree+0x20) [0x7f1509b4ad70] [bt] (5) /media/yzh/program/tvm/build/libtvm.so(tvm::runtime::RPCWrappedFunc::RemoteNDArrayDeleter(tvm::runtime::NDArray::Container*)+0x227) [0x7f1509bab467] [bt] (4) /media/yzh/program/tvm/build/libtvm.so(+0x136e746) [0x7f1509bb1746] [bt] (3) /media/yzh/program/tvm/build/libtvm.so(tvm::runtime::RPCSession::HandleUntilReturnEvent(tvm::runtime::TVMRetValue*, bool, tvm::runtime::PackedFunc const*)+0x12e) [0x7f1509bb15de] [bt] (2) /media/yzh/program/tvm/build/libtvm.so(+0x13858bc) [0x7f1509bc88bc] [bt] (1) /media/yzh/program/tvm/build/libtvm.so(tvm::common::Socket::Error(char const*)+0x90) [0x7f1509bb3270] [bt] (0) /media/yzh/program/tvm/build/libtvm.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x32) [0x7f1509373f32] File “/media/yzh/program/tvm/src/runtime/rpc/…/…/common/socket.h”, line 366 TVMError: Socket SockChannel::Recv Error:Connection reset by peer Traceback (most recent call last):

File “/media/yzh/program/tutorial/tvm-tutorial-master/deploy_model_on_android.py”, line 318, in module.set_input(**params)

File “/media/yzh/program/tvm/python/tvm/contrib/graph_runtime.py”, line 156, in set_input self._get_input(k).copyfrom(params[k])

File “/media/yzh/program/tvm/python/tvm/_ffi/_ctypes/function.py”, line 207, in call raise get_last_ffi_error()

tvm._ffi.base.TVMError: Traceback (most recent call last): [bt] (6) /media/yzh/program/tvm/build/libtvm.so(TVMFuncCall+0x61) [0x7f1509b6b431] [bt] (5) /media/yzh/program/tvm/build/libtvm.so(std::_Function_handler<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*), tvm::runtime::RPCModuleNode::WrapRemote(void*)::{lambda(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)#1}>::_M_invoke(std::_Any_data const&, tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&)+0x3b) [0x7f1509ba96fb] [bt] (4) /media/yzh/program/tvm/build/libtvm.so(tvm::runtime::RPCSession::CallFunc(void*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*, tvm::runtime::PackedFunc const*)+0xe4) [0x7f1509bb1c54] [bt] (3) /media/yzh/program/tvm/build/libtvm.so(tvm::runtime::RPCSession::HandleUntilReturnEvent(tvm::runtime::TVMRetValue*, bool, tvm::runtime::PackedFunc const*)+0x7d) [0x7f1509bb152d] [bt] (2) /media/yzh/program/tvm/build/libtvm.so(+0x13858ec) [0x7f1509bc88ec] [bt] (1) /media/yzh/program/tvm/build/libtvm.so(tvm::common::Socket::Error(char const*)+0x90) [0x7f1509bb3270] [bt] (0) /media/yzh/program/tvm/build/libtvm.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x32) [0x7f1509373f32] File “/media/yzh/program/tvm/src/runtime/rpc/…/…/common/socket.h”, line 366 TVMError: Socket SockChannel::Send Error:Broken pipe

1 Like

Any comment on this? @shenmayufei Were you able to solve this?