From 23a0415eb7fdd036ee971e16b1528bf474bc4c99 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Fri, 6 Mar 2020 13:22:47 -0800 Subject: [PATCH] profiling: Fix crash when enabling goroutines profiling (#9097) This commit replaces 'goroutines' with 'goroutine' when passing it to pprof library when activating goroutine type profiling --- cmd/utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/utils.go b/cmd/utils.go index ec73b1f6a..c248df20f 100644 --- a/cmd/utils.go +++ b/cmd/utils.go @@ -324,10 +324,10 @@ func startProfiler(profilerType string) (minioProfiler, error) { } case madmin.ProfilerGoroutines: prof.ext = "txt" - prof.recordBase("goroutines", 1) + prof.recordBase("goroutine", 1) prof.stopFn = func() ([]byte, error) { var buf bytes.Buffer - err := pprof.Lookup("goroutines").WriteTo(&buf, 1) + err := pprof.Lookup("goroutine").WriteTo(&buf, 1) return buf.Bytes(), err } case madmin.ProfilerTrace: