Kernel crash debugability


#1

Hi,

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

Thanks


#2

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: http://connect.linaro.org/resource/bud17/bud17-tr04/

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: https://github.com/96boards/documentation/blob/master/ConsumerEdition/HiKey960/Support/How-to-use-DS-5-JTAG-debugging-HiKey960.md


#3

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


#4

Correct.

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).