File tree Expand file tree Collapse file tree
src/run/runner/wall_time/perf Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11use super :: FifoCommand ;
2+ use anyhow:: Context ;
23use runner_shared:: fifo:: { RUNNER_ACK_FIFO , RUNNER_CTL_FIFO } ;
34use std:: path:: PathBuf ;
45use tokio:: io:: { AsyncReadExt , AsyncWriteExt } ;
@@ -52,7 +53,9 @@ impl RunnerFifo {
5253 }
5354 }
5455
55- let decoded = bincode:: deserialize ( & buffer) ?;
56+ let decoded = bincode:: deserialize ( & buffer) . with_context ( || {
57+ format ! ( "Failed to deserialize FIFO command (len: {message_len}, data: {buffer:?})" )
58+ } ) ?;
5659 Ok ( decoded)
5760 }
5861
Original file line number Diff line number Diff line change @@ -296,8 +296,13 @@ impl PerfRunner {
296296 perf_ping_timeout = 1 ;
297297
298298 let result = tokio:: time:: timeout ( Duration :: from_secs ( 5 ) , runner_fifo. recv_cmd ( ) ) . await ;
299- let Ok ( Ok ( cmd) ) = result else {
300- continue ;
299+ let cmd = match result {
300+ Ok ( Ok ( cmd) ) => cmd,
301+ Ok ( Err ( e) ) => {
302+ warn ! ( "Failed to parse FIFO command: {e}" ) ;
303+ break ;
304+ }
305+ Err ( _) => continue ,
301306 } ;
302307 debug ! ( "Received command: {cmd:?}" ) ;
303308
You can’t perform that action at this time.
0 commit comments