From faae2fdada12b98e508bcf76fef1fe1aa5f5183b Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 24 Oct 2022 09:36:38 +0200 Subject: pkg/report: parse stack in "inconsistent lock state" reports We took the exact top frame for these reports. As the result the frame filtering logic wasn't working and some bugs were attributed to very common functions like _atomic_dec_and_lock/kmem_cache_alloc_node. Parse the full stack instead. --- pkg/report/linux.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'pkg/report/linux.go') diff --git a/pkg/report/linux.go b/pkg/report/linux.go index e67806584..0063ae93d 100644 --- a/pkg/report/linux.go +++ b/pkg/report/linux.go @@ -1039,6 +1039,7 @@ var linuxStackParams = &stackParams{ "report_bug", "fixup_bug", "print_report", + "print_usage_bug", "do_error", "invalid_op", "_trap", @@ -1707,7 +1708,13 @@ var linuxOopses = append([]*oops{ { title: compile("WARNING: inconsistent lock state"), report: compile("WARNING: inconsistent lock state(?:.*\\n)+?.*takes(?:.*\\n)+?.*at: (?:{{PC}} +)?{{FUNC}}"), - fmt: "inconsistent lock state in %[1]v", + fmt: "inconsistent lock state in %[2]v", + stack: &stackFmt{ + parts: []*regexp.Regexp{ + linuxCallTrace, + parseStackTrace, + }, + }, }, { title: compile("WARNING: suspicious RCU usage"), -- cgit mrf-deployment