Use hung thread stack for watchdog panics.
With this change the crash reporter tries to determine if the last stack
dump in the log file is from the hung thread watchdog, and in that case
creates a crash signature that's based on the previous stack dump.
When the previous stack is used because the watchdog function was detected,
prepend "(HANG)" to the function name or kernel message in the signature.
Also use an earlier stack signature if all functions in the last one are
uncertain. This happens in many cases (about 1/2). It's likely a
bug in the kernel but until we fix it this workaround will be helpful.
I tested this manually with the --generate_kernel_signature flag and
with the provided unit test. I also added two unit tests for the two
new cases. Finally, I tried to run the KernelCrashServer autotests,
but it doesn't run correctly in developer mode, even before my change.
TEST=manually tested, unit tested, and autotested. No further tests required.
Reviewed-by: Luigi Semenzato <firstname.lastname@example.org>
Tested-by: Luigi Semenzato <email@example.com>
Commit-Ready: Luigi Semenzato <firstname.lastname@example.org>
3 files changed