crash-reporter: add support for device coredump
Copy the device coredump file to /var/spool/crash directory when
udev event "devcoredump" is detected. Also include the last 50 lines
of /var/log/messages and /var/log/net.log in the coredump file for
debugging purpose. Only perform the collection if feedback is allowed
(metrics are enabled) or the device is running a developer image.
By default, crash-reporter will not upload device coredumps to the crash
server. The user can enable device coredumps upload via a to-be-added
crosh command, which should only be done at the direction of CrOS engineers.
TEST=USE="asan clang" FEATURES=test emerge-$BOARD crash-reporter
1. Trigger wifi firmware error on a Clapper running developer image by
running following command:
"echo 1 > /sys/kernel/debug/iwlwifi/0000\:01\:00.0/iwlmvm/fw_restart"
2. Verify there is a device coredump file in "/var/spool/crash/"
"devcoredump_iwlwifi*.devcore", as well as the additional log file
".log" and the meta file ".meta".
Reviewed-by: Zeping Qiu <email@example.com>
Commit-Queue: Zeping Qiu <firstname.lastname@example.org>
Tested-by: Zeping Qiu <email@example.com>
Reviewed-by: Mike Frysinger <firstname.lastname@example.org>
6 files changed