debugd: Capture lsblk and blkid in feedback reports

The output of these tools is helpful in debugging mount issues.

BUG=chromium:1029230
TEST=Build/deploy to chell, run 'generate_logs', and check generated
     logs for output of lsblk and blkid.
TEST=Build/deploy, modify system_logs::BuildAboutSystemLogsFetcher() in
     chrome to anonymize system logs, deploy chrome, open chrome://system
     and see anonymized UUIDs and volume labels in output of 'blkid' and
     'lsblk'.

Cq-Depend: chromium:2016773
Change-Id: I522f89c95f979f2c6004528740a5140f44422a91
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2004130
Commit-Queue: Anand Mistry <amistry@chromium.org>
Tested-by: Anand Mistry <amistry@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
diff --git a/debugd/src/log_tool.cc b/debugd/src/log_tool.cc
index fe15ac4..4d6b00d 100644
--- a/debugd/src/log_tool.cc
+++ b/debugd/src/log_tool.cc
@@ -109,6 +109,10 @@
   {kFile, "bios_times", "/var/log/bios_times.txt"},
   {kCommand, "board-specific",
     "/usr/share/userfeedback/scripts/get_board_specific_info"},
+  // Slow or non-responsive block devices could cause this command to stall. Use
+  // a timeout to prevent this command from blocking log fetching. This command
+  // is expected to take O(100ms) in the normal case.
+  {kCommand, "blkid", "timeout -s KILL 5s /sbin/blkid", kRoot, kRoot},
   {kFile, "buddyinfo", "/proc/buddyinfo"},
   {kCommand, "cbi_info", "/usr/share/userfeedback/scripts/cbi_info", kRoot,
     kRoot},
@@ -171,6 +175,8 @@
 #endif  // USE_IWLWIFI_DUMP
   {kCommand, "kernel-crashes",
     "cat /var/spool/crash/kernel.*.kcrash 2>/dev/null"},
+  {kCommand, "lsblk", "timeout -s KILL 5s lsblk -a", kRoot, kRoot,
+    Log::kDefaultMaxBytes, LogTool::Encoding::kAutodetect, true},
   {kCommand, "lsmod", "lsmod"},
   {kCommand, "lspci", "/usr/sbin/lspci"},
   {kCommand, "lsusb", "lsusb && lsusb -t"},