Kernel crash debugability


We want to know what mechanism is used in Hikey960 platform to debug kernel crash issues, like Vmcore or any other method.


There are a ton of methods, from printk() to dynamic tracing or JTAG! I usually recommend selecting the tool to match the problem… and spoke about that at length:

The two most important physical connectors on Hikey960 to help are the UART1 on the low speed connector (requires 1.8v UART adapter) and the unpopulated JTAG connector on the underside of the board:

Thanks for pointing out to Kernel Debug Stories – BUD17-TR04 link, I found it very useful.

In the document below point is mentioned under kdump/crash.

Note : that kdump for arm64 is still being upstreamed, expected in v4.12.
Full arm64 support in kexec-tools is also not yet landed.

But currently we are using v4.4, which means kdump will not work right?
uname -a
Linux localhost 4.4.76-g766b8c0-dirty #5 SMP PREEMPT Fri Jul 14 12:23:57 IST 2017 aarch64


There isn’t any kdump support in v4.4. You could backport it or you could borrow the backport from LSK but there would be quite a lot of work needed to assemble all the bits. Not only the kernel pieces but you’d have to construct a userspace for the dump kernel too.

You certainly shouldn’t undertake anything like that unless you know the CPU is still running during the failure (if the CPU hangs then kdump can’t help you solve the problem anyway).