-
Notifications
You must be signed in to change notification settings - Fork 467
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
[venus-messager] 使用内存逐渐增加 #5331
[venus-messager] 使用内存逐渐增加 #5331
Comments
可以确定内存泄露发生在messager获取tipset更新本地数据的过程中,推测有可能是获取的tipset没有释放导致的,审阅相关代码,目前还不能确定具体位置 |
大概率是与MessageState中的messageCache *cache.Cache有关,master分支删了这个,就没有一直增长的现象了 |
type cache struct { 这里的: items map[string]Item,value是struct,在delete时并不会回收内存。见下面示例:
go run result: |
删除map要想马上被gc内存,需要用替换的方式,创建个新的map,把保留元素加进去,然后赋值给map变量 |
据运维反馈,最近master已没有了 |
链服务模块 / Chain Service Components
订单服务模块 / Deal Service Components
算力服务模块 / Storage Power Service Components
版本 / Version
描述 / Describe the Bug
使用的内存逐渐增加,直至程序被kill
日志 / Logging Information
重现步骤 / Repo Steps
抓取的proof:
pprof.venus-messager.alloc_objects.alloc_space.inuse_objects.inuse_space.002.pb.gz
The text was updated successfully, but these errors were encountered: