Hi Alexey,
yes, I'm looking at this..
-----Original Message-----
There is an issue with newer Linux kernel (found on 5.9.y)
where 'bt 0' fails with:
crash> bt 0
PID: 0 TASK: ffffffff95414900 CPU: 0 COMMAND: "swapper/0"
bt: invalid size request: 0 type: "stack contents"
bt: read of stack at fffffe0000012000 failed
The reason is: readmem fails to read content of exception
stack [4]. As you can see it has correct base: fffffe0000012000,
but zero size, See reduced output of 'help -m':
stkinfo: isize: 16384
esize[7]: 4096,4096,4096,4096,0,0,0
NMI_stack_index: 1
exception_stacks:
[0]: DOUBLEFAULT
[1]: NMI
[2]: DEBUG
[3]: MCE
[4]: (unknown)
[5]: (unknown)
[6]: (unknown)
ebase[cpus][7]:
[0]: fffffe0000009000 fffffe000000b000 fffffe000000d000 fffffe000000f000
fffffe0000012000 0000000000000000 0000000000000000
Apparently the following patch causes this and it's in 5.10-rc ?
commit 02772fb9b68e6a72a5e17f994048df832fe2b15e
Author: Joerg Roedel <jroedel(a)suse.de>
Date: Mon Sep 7 15:15:43 2020 +0200
x86/sev-es: Allocate and map an IST stack for #VC handler
If so, it seems we should support this properly.
btw, hopefully we would like to release the new version (7.2.9) of crash
next week and are preparing, so some patches might be deferred to the next
(7.3.0 ?), especially patches for Linux 5.10.
Thanks,
Kazu
>From
https://www.kernel.org/doc/Documentation/x86/kernel-stacks
there are only 4 exception stacks for x86. So I'm not sure what
5th ebase ([4]) is, but its size is zero, (guard page?)
So, solution I use here is to ignore exception stack if its size
is zero.
Signed-off-by: Alexey Makhalov <amakhalov(a)vmware.com>
---
x86_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/x86_64.c b/x86_64.c
index fc05e8a..a8c9b2e 100644
--- a/x86_64.c
+++ b/x86_64.c
@@ -5090,7 +5090,7 @@ skip_stage:
ms->stkinfo.esize[estack];
console("x86_64_get_dumpfile_stack_frame: searching %s estack at %lx\n",
ms->stkinfo.exception_stacks[estack], bt->stackbase);
- if (!(bt->stackbase))
+ if (!(bt->stackbase) || !(ms->stkinfo.esize[estack]))
goto skip_stage;
bt->stackbuf = ms->irqstack;
alter_stackbuf(bt);
--
2.11.0
--
Crash-utility mailing list
Crash-utility(a)redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility