enhance: add timeout monitoring to command-line tools to prevent them…#37
Open
yangrudan wants to merge 2 commits intoDeepLink-org:masterfrom
Open
enhance: add timeout monitoring to command-line tools to prevent them…#37yangrudan wants to merge 2 commits intoDeepLink-org:masterfrom
yangrudan wants to merge 2 commits intoDeepLink-org:masterfrom
Conversation
… from getting stuck.
reiase
requested changes
Jan 7, 2026
probing/cli/src/lib.rs
Outdated
| pub async fn cli_main(args: Vec<String>) -> Result<()> { | ||
| let _ = env_logger::try_init_from_env(Env::new().filter(ENV_PROBING_LOGLEVEL)); | ||
| cli::Cli::parse_from(args).run().await | ||
| match timeout(Duration::from_secs(10), cli::Cli::parse_from(args).run()).await { |
Contributor
There was a problem hiding this comment.
有些命令的执行时间会比较长,比如REPL命令不会主动结束,这个超时可能会导致REPL这类命令出问题。建议缩短超时机制的范围,只对部分子命令生效
Contributor
Author
There was a problem hiding this comment.
哦哦, 没考虑到repl, 不过ctypes换成pyO3是不是导致了GIL锁的问题呀?我不太确定
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

… from getting stuck.
通过增加命令行的超时机制, 避免请求无法返回时出现的卡死.
#34