Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Relay][Bug] Error raised by relay.TensorType is not handled properly #1830

Closed
junrushao opened this issue Oct 5, 2018 · 2 comments
Closed
Assignees

Comments

@junrushao
Copy link
Member

junrushao commented Oct 5, 2018

Minimal reproducible example

# file: main.py
from tvm import relay
relay.TensorType((1, ), "random_illegal_string")

Stacktrace in Python3

>>> python3 main.py
Traceback (most recent call last):
  File "main.py", line 2, in <module>
    relay.TensorType((1, ), "random_illegal_string")
  File "/path/to/tvm/python/tvm/relay/ty.py", line 44, in __init__
    self.__init_handle_by_constructor__(_make.TensorType, shape, dtype)
  File "/path/to/tvm/python/tvm/_ffi/_ctypes/node.py", line 79, in __init_handle_by_constructor__
    handle = __init_by_constructor__(fconstructor, args)
  File "/path/to/tvm/python/tvm/_ffi/_ctypes/function.py", line 199, in __init_handle_by_constructor__
    ctypes.byref(ret_val), ctypes.byref(ret_tcode)))
  File "/path/to/tvm/python/tvm/_ffi/base.py", line 66, in check_call
    raise TVMError(py_str(_LIB.TVMGetLastError()))
tvm._ffi.base.TVMError: [13:30:57] /path/to/tvm/include/tvm/runtime/packed_func.h:925: unknown type random_illegal_string

Stack trace returned 10 entries:
[bt] (0) /path/to/tvm/build/libtvm.so(dmlc::StackTrace[abi:cxx11]()+0x1a9) [0x7f875dab54f9]
[bt] (1) /path/to/tvm/build/libtvm.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x18) [0x7f875dab63e8]
[bt] (2) /path/to/tvm/build/libtvm.so(tvm::runtime::TVMArgValue::operator DLDataType() const+0xd4b) [0x7f875dac531b]
[bt] (3) /path/to/tvm/build/libtvm.so(+0x50969f) [0x7f875dd9569f]
[bt] (4) /path/to/tvm/build/libtvm.so(TVMFuncCall+0x48) [0x7f875df69c48]
[bt] (5) /path/to/lib/libffi.so.6(ffi_call_unix64+0x4c) [0x7f8780bcfff6]
[bt] (6) /path/to/lib/libffi.so.6(ffi_call+0x273) [0x7f8780bcfc83]
[bt] (7) /path/to/python/3.7.0/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(_ctypes_callproc+0x2cf) [0x7f8780de4c2f]
[bt] (8) /path/to/python/3.7.0/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(+0xaee3) [0x7f8780ddeee3]
[bt] (9) /path/to/lib/libpython3.7m.so.1.0(_PyObject_FastCallKeywords+0x104) [0x7f878153e504]

Exception ignored in: <function NodeBase.__del__ at 0x7f875e141a60>
Traceback (most recent call last):
  File "/path/to/tvm/python/tvm/_ffi/_ctypes/node.py", line 46, in __del__
    check_call(_LIB.TVMNodeFree(self.handle))
  File "/path/to/tvm/python/tvm/_ffi/_ctypes/node.py", line 53, in __getattr__
    self.handle, c_str(name),
  File "/path/to/tvm/python/tvm/_ffi/_ctypes/node.py", line 53, in __getattr__
    self.handle, c_str(name),
  File "/path/to/tvm/python/tvm/_ffi/_ctypes/node.py", line 53, in __getattr__
    self.handle, c_str(name),
  [Previous line repeated 495 more times]
RecursionError: maximum recursion depth exceeded

Stacktrace in Python2

>>> python2.7 main.py
Traceback (most recent call last):
  File "main.py", line 2, in <module>
    relay.TensorType((1, ), "random_illegal_string")
  File "/path/to/tvm/python/tvm/relay/ty.py", line 44, in __init__
    self.__init_handle_by_constructor__(_make.TensorType, shape, dtype)
  File "/path/to/tvm/python/tvm/_ffi/_ctypes/node.py", line 79, in __init_handle_by_constructor__
    handle = __init_by_constructor__(fconstructor, args)
  File "/path/to/tvm/python/tvm/_ffi/_ctypes/function.py", line 199, in __init_handle_by_constructor__
    ctypes.byref(ret_val), ctypes.byref(ret_tcode)))
  File "/path/to/tvm/python/tvm/_ffi/base.py", line 66, in check_call
    raise TVMError(py_str(_LIB.TVMGetLastError()))
tvm._ffi.base.TVMError: [13:30:35] /path/to/tvm/include/tvm/runtime/packed_func.h:925: unknown type random_illegal_string

Stack trace returned 10 entries:
[bt] (0) /path/to/tvm/build/libtvm.so(dmlc::StackTrace[abi:cxx11]()+0x1a9) [0x7f77b981f4f9]
[bt] (1) /path/to/tvm/build/libtvm.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x18) [0x7f77b98203e8]
[bt] (2) /path/to/tvm/build/libtvm.so(tvm::runtime::TVMArgValue::operator DLDataType() const+0xd4b) [0x7f77b982f31b]
[bt] (3) /path/to/tvm/build/libtvm.so(+0x50969f) [0x7f77b9aff69f]
[bt] (4) /path/to/tvm/build/libtvm.so(TVMFuncCall+0x48) [0x7f77b9cd3c48]
[bt] (5) /path/to/python@2/2.7.15_1/lib/python2.7/lib-dynload/_ctypes.so(ffi_call_unix64+0x4c) [0x7f77dc65f974]
[bt] (6) /path/to/python@2/2.7.15_1/lib/python2.7/lib-dynload/_ctypes.so(ffi_call+0x2ba) [0x7f77dc65f46a]
[bt] (7) /path/to/python@2/2.7.15_1/lib/python2.7/lib-dynload/_ctypes.so(_ctypes_callproc+0x2cf) [0x7f77dc6585af]
[bt] (8) /path/to/python@2/2.7.15_1/lib/python2.7/lib-dynload/_ctypes.so(+0xc374) [0x7f77dc652374]
[bt] (9) /path/to/lib/libpython2.7.so.1.0(PyObject_Call+0x43) [0x7f77dccb1dc3]

Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <object repr() failed> ignored
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <object repr() failed> ignored
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <object repr() failed> ignored
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <object repr() failed> ignored
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <object repr() failed> ignored
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <object repr() failed> ignored
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <object repr() failed> ignored
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <object repr() failed> ignored
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <object repr() failed> ignored
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <object repr() failed> ignored
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <object repr() failed> ignored
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <object repr() failed> ignored
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <object repr() failed> ignored
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <object repr() failed> ignored
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <object repr() failed> ignored
^C
@junrushao junrushao mentioned this issue Oct 5, 2018
3 tasks
@junrushao junrushao changed the title Error raised by relay.TensorType is not handled properly [Relay] Error raised by relay.TensorType is not handled properly Oct 5, 2018
@junrushao junrushao changed the title [Relay] Error raised by relay.TensorType is not handled properly [Relay][Bug] Error raised by relay.TensorType is not handled properly Oct 6, 2018
@tqchen tqchen self-assigned this Oct 6, 2018
@tqchen
Copy link
Member

tqchen commented Oct 6, 2018

should be fixed by #1850

@junrushao
Copy link
Member Author

Will close once #1850 is merged.

@tqchen tqchen closed this as completed Oct 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants