|
|
a60cd7 |
From 69047b8b02d8f7635fe106daac9e17d72d4a8130 Mon Sep 17 00:00:00 2001
|
|
|
a60cd7 |
From: Julius Milan <jmilan@redhat.com>
|
|
|
a60cd7 |
Date: Mon, 10 Apr 2017 16:30:58 +0200
|
|
|
a60cd7 |
Subject: [PATCH] koops: Improve fatal MCE check when dumping backtrace
|
|
|
a60cd7 |
|
|
|
a60cd7 |
Problem was, that regular kernel panic message was treated as fatal MCE,
|
|
|
a60cd7 |
for which we don't want to have backtrace.
|
|
|
a60cd7 |
|
|
|
a60cd7 |
The logic in koops_extract_oopses_from_lines is a bit complex,
|
|
|
a60cd7 |
so I describe it:
|
|
|
a60cd7 |
If fatal MCE was recognized, dumping of backtrace was skipped by following
|
|
|
a60cd7 |
to the next part of cycle (hacky, in the next part of cycle, there is
|
|
|
a60cd7 |
condition with many allowed strings to continue but not "Call Trace").
|
|
|
a60cd7 |
The check responsible for this "jump" (kernel.c:396) just checked whether
|
|
|
a60cd7 |
there is a string beginning with "Kernel panic - not syncing", however
|
|
|
a60cd7 |
this string appears in all kernel panics, not just fatal MCEs.
|
|
|
a60cd7 |
|
|
|
a60cd7 |
Fatal MCE may have form of:
|
|
|
a60cd7 |
"Kernel panic - not syncing: Fatal Machine check" or
|
|
|
a60cd7 |
"Kernel panic - not syncing: Machine check" or I found even
|
|
|
a60cd7 |
"Kernel panic - not syncing: Uncorrected machine check"
|
|
|
a60cd7 |
so I modified the condition appropriately and added test covering this
|
|
|
a60cd7 |
case.
|
|
|
a60cd7 |
|
|
|
a60cd7 |
Related to rhbz#1374648
|
|
|
a60cd7 |
---
|
|
|
a60cd7 |
src/lib/kernel.c | 2 +-
|
|
|
a60cd7 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
a60cd7 |
|
|
|
a60cd7 |
diff --git a/src/lib/kernel.c b/src/lib/kernel.c
|
|
|
a60cd7 |
index 1a9d327..f1a0f2c 100644
|
|
|
a60cd7 |
--- a/src/lib/kernel.c
|
|
|
a60cd7 |
+++ b/src/lib/kernel.c
|
|
|
a60cd7 |
@@ -356,7 +356,7 @@ next_line:
|
|
|
a60cd7 |
* In order to capture all these lines, we treat final line
|
|
|
a60cd7 |
* as "backtrace" (which is admittedly a hack):
|
|
|
a60cd7 |
*/
|
|
|
a60cd7 |
- if (strstr(curline, "Kernel panic - not syncing"))
|
|
|
a60cd7 |
+ if (strstr(curline, "Kernel panic - not syncing:") && strcasestr(curline, "Machine check"))
|
|
|
a60cd7 |
inbacktrace = 1;
|
|
|
a60cd7 |
else
|
|
|
a60cd7 |
if (strnlen(curline, 9) > 8
|
|
|
a60cd7 |
--
|
|
|
a60cd7 |
1.8.3.1
|
|
|
a60cd7 |
|