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

[Bug] utest got segmentation fault #14806

Closed
zhaoyang-star opened this issue May 9, 2023 · 1 comment
Closed

[Bug] utest got segmentation fault #14806

zhaoyang-star opened this issue May 9, 2023 · 1 comment
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug

Comments

@zhaoyang-star
Copy link
Contributor

zhaoyang-star commented May 9, 2023

Run python3 -Xfaulthandler -m pytest tests/python/relay/test_op_level1.py got segmentation fault. Run other test_*.py also met the seg fault. It seems that Seg Fault happened when using ctypes with Python and C++. Does anyone meet similar error? Thanks in advance.

(env_tvm) root@12800db2b9db:/z/Dev/tvm# python3 -Xfaulthandler -m pytest tests/python/relay/test_op_level1.py
Fatal Python error: Segmentation fault

Current thread 0x00007f5896dc5740 (most recent call first):
  File "/z/Dev/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 227 in __call__
  File "/z/Dev/tvm/python/tvm/runtime/module.py", line 687 in enabled
  File "/z/Dev/tvm/python/tvm/testing/utils.py", line 424 in _get_targets
  File "/z/Dev/tvm/python/tvm/testing/utils.py", line 526 in enabled_targets
  File "/z/Dev/tvm/python/tvm/testing/plugin.py", line 69 in pytest_configure
  File "/z/env_init/env_tvm/lib/python3.8/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/z/env_init/env_tvm/lib/python3.8/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/z/env_init/env_tvm/lib/python3.8/site-packages/pluggy/_hooks.py", line 277 in call_historic
  File "/z/env_init/env_tvm/lib/python3.8/site-packages/_pytest/config/__init__.py", line 1046 in _do_configure
  File "/z/env_init/env_tvm/lib/python3.8/site-packages/_pytest/main.py", line 265 in wrap_session
  File "/z/env_init/env_tvm/lib/python3.8/site-packages/_pytest/main.py", line 316 in pytest_cmdline_main
  File "/z/env_init/env_tvm/lib/python3.8/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/z/env_init/env_tvm/lib/python3.8/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/z/env_init/env_tvm/lib/python3.8/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/z/env_init/env_tvm/lib/python3.8/site-packages/_pytest/config/__init__.py", line 166 in main
  File "/z/env_init/env_tvm/lib/python3.8/site-packages/_pytest/config/__init__.py", line 189 in console_main
  File "/z/env_init/env_tvm/lib/python3.8/site-packages/pytest/__main__.py", line 5 in <module>
  File "/usr/lib/python3.8/runpy.py", line 87 in _run_code
  File "/usr/lib/python3.8/runpy.py", line 194 in _run_module_as_main
Segmentation fault (core dumped)

Environment

Operating System: Linux 12800db2b9db 5.19.0-40-generic #41~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC
TVM version: v0.11.1
Python version: 3.8.10

@zhaoyang-star zhaoyang-star added needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug labels May 9, 2023
@zhaoyang-star zhaoyang-star changed the title [Bug] [Bug] utest got segmentation fault May 9, 2023
@zhaoyang-star
Copy link
Contributor Author

I found the reason is that my OS is Ubuntu 20.04, while the prebuild llvm used is 16.0.0-x86_64-linux-gnu-ubuntu-18.04. I replese it with 16.0.0-x86_64-linux-gnu-ubuntu-20.04 and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug
Projects
None yet
Development

No branches or pull requests

1 participant