Comments (12)
GCHeap.heap-3.20230131112906.390.log mem.20230131112506.312.log 提供两个dumpdump出来的文件 如果需要别的可以再提供
两个profile里的metric指向的函数都是,应该是add2line的时候找不到函数名和地址。能提供下demo吗
因为是公司的服务感觉不太好直接全贴出来..需要哪些关键的地方我可以节选出来。 ` func systemInit() { err := service.Init() if err != nil { glog.Fatalf("system fatal err:%s", err) } configs.InitDb() appstore.Init() appdev.Init() //authcheck.Init()
r := &ReporterImpl{} h, _ := holmes.New( holmes.WithProfileReporter(r), holmes.WithCollectInterval("5s"), holmes.WithDumpPath("/tmp"), holmes.WithTextDump(), holmes.WithCPUDump(10, 25, 80, time.Minute), holmes.WithMemDump(30, 25, 80, time.Minute), holmes.WithGCHeapDump(10, 20, 40, time.Minute), holmes.WithGoroutineDump(500, 25, 20000, 0, time.Minute), holmes.WithCGroup(true), // set cgroup to true ) h.EnableCPUDump(). EnableGoroutineDump(). EnableMemDump(). EnableGCHeapDump().Start()
}
type ReporterImpl struct{}
func (r *ReporterImpl) Report(pType string, filename string, reason holmes.ReasonType, eventID string, sampleTime time.Time, pprofBytes []byte, scene holmes.Scene) error { // do something glog.Infof("report to minio reporter %s", filename) fr := bytes.NewReader(pprofBytes) minioClient := configs.Get().MinioClientPool.Get() _, err := minioClient.PutObject(context.Background(), configs.Get().DownloadBucket, filepath.Join("wxtest", filename), fr, int64(len(pprofBytes)), minio.PutObjectOptions{ContentType: pType}) if err != nil { glog.Errorf("Reporter holmes.Report error %v", err) } return err }
func main() { systemInit() //appdev.Get().TestPublish("./data/com.liuli.app-store.tar") //service.Get().Run() for true { time.Sleep(1 * time.Minute) } }
`
这部分就是集成holmes的地方 剩下就是请求一个文件上传的业务接口你方便运行下 这里的case吗?看看能否正常解析。 我想排除是不是项目依赖的第三库导
致的问题,有些库会对runtime分配下来的资源进行二次分配,给profile增加了很多噪音,比如goid。
本地运行demo可以正常解析。
运行自己的服务确实仍然会出现上述问题。
mem.20230201183949.552.log
go.mod.txt
from holmes.
这个和文件后缀应该没啥关系,只要是生成的压缩文件的内容符合谷歌pprof pb格式的要求,就可以被 go pprof工具正常解析。
我起了个demo,import了holmes的master分支代码。并没有复现你的问题。
方便提供一下可复现的case吗,我们在一起调查下。
from holmes.
GCHeap.heap-3.20230131112906.390.log
mem.20230131112506.312.log
提供两个dumpdump出来的文件 如果需要别的可以再提供
from holmes.
GCHeap.heap-3.20230131112906.390.log mem.20230131112506.312.log 提供两个dumpdump出来的文件 如果需要别的可以再提供
两个profile里的metric指向的函数都是,应该是add2line的时候找不到函数名和地址。能提供下demo吗
from holmes.
GCHeap.heap-3.20230131112906.390.log mem.20230131112506.312.log 提供两个dumpdump出来的文件 如果需要别的可以再提供
两个profile里的metric指向的函数都是,应该是add2line的时候找不到函数名和地址。能提供下demo吗
因为是公司的服务感觉不太好直接全贴出来..需要哪些关键的地方我可以节选出来。
`
func systemInit() {
err := service.Init()
if err != nil {
glog.Fatalf("system fatal err:%s", err)
}
configs.InitDb()
appstore.Init()
appdev.Init()
//authcheck.Init()
r := &ReporterImpl{}
h, _ := holmes.New(
holmes.WithProfileReporter(r),
holmes.WithCollectInterval("5s"),
holmes.WithDumpPath("/tmp"),
holmes.WithTextDump(),
holmes.WithCPUDump(10, 25, 80, time.Minute),
holmes.WithMemDump(30, 25, 80, time.Minute),
holmes.WithGCHeapDump(10, 20, 40, time.Minute),
holmes.WithGoroutineDump(500, 25, 20000, 0, time.Minute),
holmes.WithCGroup(true), // set cgroup to true
)
h.EnableCPUDump().
EnableGoroutineDump().
EnableMemDump().
EnableGCHeapDump().Start()
}
type ReporterImpl struct{}
func (r *ReporterImpl) Report(pType string, filename string, reason holmes.ReasonType, eventID string, sampleTime time.Time, pprofBytes []byte, scene holmes.Scene) error {
// do something
glog.Infof("report to minio reporter %s", filename)
fr := bytes.NewReader(pprofBytes)
minioClient := configs.Get().MinioClientPool.Get()
_, err := minioClient.PutObject(context.Background(),
configs.Get().DownloadBucket, filepath.Join("wxtest", filename),
fr, int64(len(pprofBytes)), minio.PutObjectOptions{ContentType: pType})
if err != nil {
glog.Errorf("Reporter holmes.Report error %v", err)
}
return err
}
func main() {
systemInit()
//appdev.Get().TestPublish("./data/com.liuli.app-store.tar")
//service.Get().Run()
for true {
time.Sleep(1 * time.Minute)
}
}
`
这部分就是集成holmes的地方 剩下就是请求一个文件上传的业务接口
from holmes.
GCHeap.heap-3.20230131112906.390.log mem.20230131112506.312.log 提供两个dumpdump出来的文件 如果需要别的可以再提供
两个profile里的metric指向的函数都是,应该是add2line的时候找不到函数名和地址。能提供下demo吗
因为是公司的服务感觉不太好直接全贴出来..需要哪些关键的地方我可以节选出来。 ` func systemInit() { err := service.Init() if err != nil { glog.Fatalf("system fatal err:%s", err) } configs.InitDb() appstore.Init() appdev.Init() //authcheck.Init()
r := &ReporterImpl{} h, _ := holmes.New( holmes.WithProfileReporter(r), holmes.WithCollectInterval("5s"), holmes.WithDumpPath("/tmp"), holmes.WithTextDump(), holmes.WithCPUDump(10, 25, 80, time.Minute), holmes.WithMemDump(30, 25, 80, time.Minute), holmes.WithGCHeapDump(10, 20, 40, time.Minute), holmes.WithGoroutineDump(500, 25, 20000, 0, time.Minute), holmes.WithCGroup(true), // set cgroup to true ) h.EnableCPUDump(). EnableGoroutineDump(). EnableMemDump(). EnableGCHeapDump().Start()
}
type ReporterImpl struct{}
func (r *ReporterImpl) Report(pType string, filename string, reason holmes.ReasonType, eventID string, sampleTime time.Time, pprofBytes []byte, scene holmes.Scene) error { // do something glog.Infof("report to minio reporter %s", filename) fr := bytes.NewReader(pprofBytes) minioClient := configs.Get().MinioClientPool.Get() _, err := minioClient.PutObject(context.Background(), configs.Get().DownloadBucket, filepath.Join("wxtest", filename), fr, int64(len(pprofBytes)), minio.PutObjectOptions{ContentType: pType}) if err != nil { glog.Errorf("Reporter holmes.Report error %v", err) } return err }
func main() { systemInit() //appdev.Get().TestPublish("./data/com.liuli.app-store.tar") //service.Get().Run() for true { time.Sleep(1 * time.Minute) } }
`
这部分就是集成holmes的地方 剩下就是请求一个文件上传的业务接口
你方便运行下 这里的case吗?看看能否正常解析。
我想排除是不是项目依赖的第三库导致的问题,有些库会对runtime分配下来的资源进行二次分配,给profile增加了很多噪音,比如goid。
from holmes.
/needInvestigate
from holmes.
环境
rancher v2.4.4
holmes v1.1.0
holmes.WithTextDump(),
holmes.WIthMemDump(20,50,70,5*time.Minute)
导出的 heap 会出现 unknown 的情况
from holmes.
-
最好单独搞个 issue,看起来不是同一个问题
-
导出的 heap 会出现 unknown 的情况
这个具体是什么情况呢?文件内容是 unknown 么?
from holmes.
最好单独搞个 issue,看起来不是同一个问题
导出的 heap 会出现 unknown 的情况
这个具体是什么情况呢?文件内容是 unknown 么?
与 issue 截图的内容一样,heap 内容能够被 profile 工具解读,但是指向 unknown。
不过因为公司使用的内网无法把 profile 拿出来展示,我只是想提供一个曾经复现的场景
from holmes.
使用的是官方的 Deadlock 例子,复现了相同的场景,其他的 demo 也有相同的问题。
Deadlock Demo 包含了 debug log, profile, etc..
from holmes.
from holmes.
Related Issues (20)
- heap samples are not what I expect HOT 4
- 一点小建议 HOT 2
- report时传递更详细的现场信息 HOT 2
- a code issue in releases HOT 2
- 输出的日志文件结构中的 previous和current代表内存吗? HOT 1
- cpu 突然飙高的一下触发了dump操作,但是dump下来的文件使用 go tool pprof 分析文件,好像什么都分析不出来 HOT 16
- bug: should log the previous data in human readable order
- feature: print the CPU usage during sampling cpu profile HOT 4
- a similar project
- mosn.io/pkg/log 404 Not Found HOT 5
- get CPU core failed HOT 3
- EnableDump: current cpu percent [1] greater than the CPUMaxPercent[90] HOT 2
- 不知道这些参数要填多少合适?有参考吗 HOT 1
- 这个有做释放内存的处理吗?测得时间不是很长我简单的做了一下对比(开holmes内存分配监控和不开监控的对比,不做任何请求,时间都为半小时),不开监控半小时内内存基本稳定,基本没有上调的情况,开了监控后半小时内有小幅度上涨,想知道这个有做释放内存的处理吗 HOT 1
- holmes.WithMemDump(30, 25, 80, 2 * time.Minute),这个如图所示不会dump吗?那要怎样才会dump,我以为current>0会dump HOT 4
- "GOVCS disallows using bzr for public launchpad.net/gocheck" go get 提示错误 HOT 3
- The v1.1.0 version is missing HOT 1
- error: 'TARGET_OS_MAC' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_]
- dingtalk.png 加群的二维码已经失效,可以更新一下吗 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from holmes.