Skip to content

Commit

Permalink
pkg/report: strip trailing deadlock reports for real
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dvyukov committed Jan 14, 2019
1 parent 3085f27 commit 744a007
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/report/linux.go
Expand Up @@ -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
Expand All @@ -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
}
Expand Down

0 comments on commit 744a007

Please sign in to comment.