From e419f4e6d851d09202e550ac2a5975ef68fd6935 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 7 Jul 2020 09:35:45 +0200 Subject: pkg/report: consider on_each_cpu as stall anchor function Kernel frequently hangs in on_each_cpu, it seems to be more indicative of the root cause than subsequent frames. --- pkg/report/linux.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pkg/report/linux.go') diff --git a/pkg/report/linux.go b/pkg/report/linux.go index b24d9ae42..d66350bd2 100644 --- a/pkg/report/linux.go +++ b/pkg/report/linux.go @@ -590,6 +590,13 @@ func linuxStallFrameExtractor(frames []string) (string, string) { prev := frames[0] for _, frame := range frames { if matchesAny([]byte(frame), linuxStallAnchorFrames) { + if strings.HasPrefix(frame, "on_each_cpu") { + // In this case we want this function rather than the previous one + // (there can be several variations on the next one). + // This one can also be called "on_each_cpu_cond", + // normalize it to "on_each_cpu". + prev = "on_each_cpu" + } for _, prefix := range []string{ "__x64_", "SYSC_", @@ -716,6 +723,7 @@ var linuxStallAnchorFrames = []*regexp.Regexp{ compile("__fput"), compile("task_work_run"), compile("exit_to_usermode"), + compile("on_each_cpu"), } // nolint: lll -- cgit mrf-deployment