From 744a007c1935c734a72775488c9ae0c2d0a90153 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 14 Jan 2019 17:24:39 +0100 Subject: pkg/report: strip trailing deadlock reports for real Oops messages frequently induce possible deadlock reports because oops reporting introduces unexpected locking chains. So if we have enough of the actual oops, strip the deadlock message. --- pkg/report/linux.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pkg/report/linux.go') diff --git a/pkg/report/linux.go b/pkg/report/linux.go index bbb0cf80e..fe55ebb99 100644 --- a/pkg/report/linux.go +++ b/pkg/report/linux.go @@ -248,7 +248,8 @@ func (ctx *linux) findReport(output []byte, oops *oops, startPos int, context st if bytes.Contains(line, []byte("Disabling lock debugging due to kernel taint")) { skipLine = true } else if textLines > 25 && - bytes.Contains(line, []byte("Kernel panic - not syncing")) { + (bytes.Contains(line, []byte("Kernel panic - not syncing")) || + bytes.Contains(line, []byte("WARNING: possible circular locking dependency detected"))) { // If panic_on_warn set, then we frequently have 2 stacks: // one for the actual report (or maybe even more than one), // and then one for panic caused by panic_on_warn. This makes @@ -258,6 +259,9 @@ func (ctx *linux) findReport(output []byte, oops *oops, startPos int, context st // before the panic, because sometimes we have, for example, // a single WARNING line without a stack and then the panic // with the stack. + // Oops messages frequently induce possible deadlock reports + // because oops reporting introduces unexpected locking chains. + // So if we have enough of the actual oops, strip the deadlock message. skipText = true skipLine = true } -- cgit mrf-deployment