-
Notifications
You must be signed in to change notification settings - Fork 158
Possible busy-loop on process_tx errors #602
Copy link
Copy link
Open
Description
This logic can lead to a busy-loop if process_tx() returns a persistent error other than NothingWritten. In such cases, tx_has_deferred_frame will be false, and if the guest continues to supply TX buffers (has_new_entries is true), this loop will repeatedly call process_tx() and fail. The loop should be broken on any error from process_tx() to avoid this.
let result = self.process_tx();
self.tx_has_deferred_frame =
matches!(result, Err(TxError::Backend(WriteError::NothingWritten)));
if let Err(e) = result {
if !self.tx_has_deferred_frame {
log::error!("Failed to process tx: {e:?}");
}
break;
}
if !self.tx_q.queue.enable_notification(&self.mem).unwrap() {
break;
}Originally posted by @gemini-code-assist[bot] in #556 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels