检查内存泄漏在runtime.systemstack是怎么回事?

jmxu11 · · 1786 次点击 · · 开始浏览    
这是一个创建于 的文章,其中的信息可能已经有所发展或是发生改变。

程序给一定压力跑稳定性3天,发现物理内存呈现坡度增长,平均1天10M左右。使用pprof工具检测如下:

Type: inuse_space
Time: Apr 8, 2019 at 5:27pm (CST)
Entering interactive mode (type "help" for commands, "o" for options)
(pprof) top
Showing nodes accounting for 22170kB, 100% of 22170kB total
Showing top 10 nodes out of 36
      flat  flat%   sum%        cum   cum%
14336.66kB 64.67% 64.67% 14848.84kB 66.98%  runtime.systemstack
 2640.83kB 11.91% 76.58%  2640.83kB 11.91%  bufio.NewWriterSize (inline)
 2626.67kB 11.85% 88.43%  2626.67kB 11.85%  bufio.NewReaderSize (inline)
  516.01kB  2.33% 90.75%   516.01kB  2.33%  bytes.makeSlice
  513.31kB  2.32% 93.07%   513.31kB  2.32%  vendor/golang.org/x/net/http2.(*Framer).WriteDataPadded
  512.19kB  2.31% 95.38%   512.19kB  2.31%  runtime.malg
  512.19kB  2.31% 97.69%  5265.69kB 23.75%  vendor/google.golang.org/grpc/transport.newHTTP2Client
  512.14kB  2.31%   100%   512.14kB  2.31%  encoding/json.(*decodeState).objectInterface
         0     0%   100%      514kB  2.32%  bufio.NewReader
         0     0%   100%   516.01kB  2.33%  bytes.(*Buffer).ReadFrom

 

查了很多信息都不知道runtime.systemstack的内存泄漏是怎么回事。有大神了解这个吗?


有疑问加站长微信联系(非本文作者)

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

1786 次点击  
加入收藏 微博
1 回复  |  直到 2019-04-25 14:23:37
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传