mihomo icon indicating copy to clipboard operation
mihomo copied to clipboard

[Bug] 最新alpha内存泄漏,导致每隔几个小时就会重启,已传heap

Open dycwuxing opened this issue 2 years ago • 8 comments

Verify steps

  • [X] 确保你使用的是本仓库最新的的 mihomo 或 mihomo Alpha 版本 Ensure you are using the latest version of Mihomo or Mihomo Alpha from this repository.
  • [X] 如果你可以自己 debug 并解决的话,提交 PR 吧 Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
  • [X] 我已经在 Issue Tracker 中找过我要提出的问题 I have searched on the issue tracker for a related issue.
  • [X] 我已经使用 Alpha 分支版本测试过,问题依旧存在 I have tested using the dev branch, and the issue still exists.
  • [X] 我已经仔细看过 Documentation 并无法自行解决问题 I have read the documentation and was unable to solve the issue.
  • [X] 这是 Mihomo 核心的问题,并非我所使用的 Mihomo 衍生版本(如 OpenMihomo、KoolMihomo 等)的特定问题 This is an issue of the Mihomo core per se, not to the derivatives of Mihomo, like OpenMihomo or KoolMihomo.

Mihomo version

alpha-2e12cee

What OS are you seeing the problem on?

No response

Mihomo config

这次传不了附件,稍后回复上传

Mihomo log

No response

Description

这次传不了附件,稍后回复上传

dycwuxing avatar Jan 03 '24 02:01 dycwuxing

上午10点-下午3点,上班中openclash基本无使用 image

dycwuxing avatar Jan 03 '24 07:01 dycwuxing

image MACOS上1.13G了....

dycwuxing avatar Jan 03 '24 12:01 dycwuxing

尝试使用命令curl "${controller-api}/debug/gc" -X PUT 可否缓解,可能与你的nameserver policy数量有关

Larvan2 avatar Jan 05 '24 07:01 Larvan2

curl "${controller-api}/debug/gc" -X PUT

呃,我使用这个,返回了404 page not found啊大佬,我未设置密码 curl "192.168.1.1:9090/debug/gc" -X PUT

dycwuxing avatar Jan 05 '24 07:01 dycwuxing

启动设置log level 为debug

Larvan2 avatar Jan 05 '24 07:01 Larvan2

启动设置log level 为debug

image 大佬我测试了,效果不太明显,和之前差不多,我目前也是用的api,不过每3小时重启一次核心...

dycwuxing avatar Jan 05 '24 09:01 dycwuxing

Types of profiles available: Count Profile 298 allocs 0 block 0 cmdline 5034 goroutine 298 heap 0 mutex 0 profile 16 threadcreate 0 trace

I also encountered the Clash crash issue. After debugging with pprof, I discovered that goroutines were overflowing. Most of them are blocked at internal/poll.runtime_pollWait, I think

full goroutine stack dump here goroutine.txt

sage417 avatar Dec 29 '24 05:12 sage417