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

[RPC] Add fail-guard for termination time exception #13651

Merged
merged 1 commit into from
Dec 22, 2022
Merged

Conversation

tqchen
Copy link
Member

@tqchen tqchen commented Dec 21, 2022

This PR adds fail-guard to reduce error messages thrown during process termination time. Such error won't trigger test error but will bring extra message during exit time.

This PR adds fail-guard to reduce error messages thrown during
process termination time. Such error won't trigger test error
but will bring extra message during exit time.
@tvm-bot
Copy link
Collaborator

tvm-bot commented Dec 21, 2022

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

  • No users to tag found in teams: rpc See #10317 for details

Generated by tvm-bot

Copy link
Contributor

@echuraev echuraev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general LGTM. One minor question. I didn't see any error messages during RPC termination before. In which scenario, I'll be able to get these import errors?

@tqchen
Copy link
Member Author

tqchen commented Dec 22, 2022

This would be some rare case that have to do with shutdown orders likely in multi processing. I have observed some flaky ones during purest

@tqchen
Copy link
Member Author

tqchen commented Dec 22, 2022

Example snippet

Exception ignored in: <function Server.__del__ at 0x7fb012d9add0>
Traceback (most recent call last):
  File "/home/tqchen/github/relax/python/tvm/rpc/server.py", line 502, in __del__
  File "/home/tqchen/github/relax/python/tvm/rpc/server.py", line 498, in terminate
  File "/home/tqchen/github/relax/python/tvm/contrib/popen_pool.py", line 145, in kill
  File "/home/tqchen/github/relax/python/tvm/contrib/popen_pool.py", line 43, in kill_child_processes
ImportError: sys.meta_path is None, Python is likely shutting down

@echuraev
Copy link
Contributor

Thank you for the clarification!

@echuraev echuraev merged commit 209845f into apache:main Dec 22, 2022
fzi-peccia pushed a commit to fzi-peccia/tvm that referenced this pull request Mar 27, 2023
This PR adds fail-guard to reduce error messages thrown during
process termination time. Such error won't trigger test error
but will bring extra message during exit time.
mikeseven pushed a commit to mikeseven/tvm that referenced this pull request Sep 27, 2023
This PR adds fail-guard to reduce error messages thrown during
process termination time. Such error won't trigger test error
but will bring extra message during exit time.
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

Successfully merging this pull request may close these issues.

3 participants