From e13baabc41fbf8495b11f2c7250bc7043435f083 Mon Sep 17 00:00:00 2001 From: Frederick Mayle Date: Tue, 22 Aug 2023 11:15:14 -0700 Subject: [PATCH] devices: log full anyhow::Error on sleep/snapshot/restore failures Change-Id: I68cf0a57910415afbaa20dcf7617c36277630d5f Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4804687 Reviewed-by: Noah Gold Reviewed-by: Elie Kheirallah Commit-Queue: Frederick Mayle --- devices/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/devices/src/lib.rs b/devices/src/lib.rs index f68f79fb50..f0d621821b 100644 --- a/devices/src/lib.rs +++ b/devices/src/lib.rs @@ -429,6 +429,7 @@ async fn handle_command_tube( .context("failed to reply to sleep command")?; } Err(e) => { + error!("failed to sleep: {:#}", e); command_tube .send(VmResponse::ErrString(e.to_string())) .await @@ -451,7 +452,7 @@ async fn handle_command_tube( ); if let Err(e) = snapshot_handler(path.as_path(), &guest_memory, buses).await { - error!("failed to snapshot: {}", e); + error!("failed to snapshot: {:#}", e); command_tube .send(VmResponse::ErrString(e.to_string())) .await @@ -472,7 +473,7 @@ async fn handle_command_tube( restore_handler(path.as_path(), &guest_memory, &[&*io_bus, &*mmio_bus]) .await { - error!("failed to restore: {}", e); + error!("failed to restore: {:#}", e); command_tube .send(VmResponse::ErrString(e.to_string())) .await