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

minicap 资源收回问题。 #1177

Closed
liyuefeng opened this issue Nov 22, 2023 · 3 comments
Closed

minicap 资源收回问题。 #1177

liyuefeng opened this issue Nov 22, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@liyuefeng
Copy link

minicap中下面的这个函数在关闭minicap的时候android7版本使用ps -A| grep minicap 找不到minicap进程,跑多个任务,minicap进程会越来越多,导致手机特别卡。
def _cleanup_minicap(self):
"""
Clean up the minicap process whose status is __skb_wait_for_more_packets or futex_wait_queue_me
清理状态为__skb_wait_for_more_packets, futex_wait_queue_me的minicap进程

    Returns:

    """
    # 卡住的进程状态
    TASK_INTERRUPTIBLE1 = "__skb_wait_for_more_packets"
    TASK_INTERRUPTIBLE2 = "futex_wait_queue_me"

    try:
        shell_output = self.adb.shell("ps -A| grep minicap")
    except:
        pass
    else:
        if len(shell_output) == 0:
            return
        for line in shell_output.split("\r\n"):
            if TASK_INTERRUPTIBLE1 in line or TASK_INTERRUPTIBLE2 in line:
                pid = line.split()[1]
                try:
                    self.adb.shell("kill %s" % pid)
                except:
                    pass
@yimelia
Copy link
Member

yimelia commented Nov 29, 2023

这个是手机权限问题,不是所有手机都允许这样查询,或者你可以帮忙提供一下具体的手机型号?我们尝试测试一下

@liyuefeng
Copy link
Author

手机型号vivo X9i android版本:7.1.2
微信截图_20231129151510

@yimelia yimelia added the bug Something isn't working label Nov 29, 2023
@yimelia
Copy link
Member

yimelia commented Nov 29, 2023

感谢反馈,已经确认问题,将在下个版本修复

@yimelia yimelia closed this as completed in 1bddb78 Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants