File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -469,7 +469,9 @@ impl VirtualCPU {
469469 }
470470 Ok ( HyperlightExit :: Cancelled ( ) ) => {
471471 // If cancellation was not requested for this specific guest function call,
472- // the vcpu was interrupted by a stale cancellation from a previous call
472+ // the vcpu was interrupted by a stale cancellation. This can occur when:
473+ // - Linux: A signal from a previous call arrives late
474+ // - Windows: WHvCancelRunVirtualProcessor called right after vcpu exits but RUNNING_BIT is still true
473475 if !cancel_requested && !debug_interrupted {
474476 // Track that an erroneous vCPU kick occurred
475477 metrics:: counter!( METRIC_ERRONEOUS_VCPU_KICKS ) . increment ( 1 ) ;
Original file line number Diff line number Diff line change @@ -21,8 +21,10 @@ pub(crate) static METRIC_GUEST_ERROR_LABEL_CODE: &str = "code";
2121// Counter metric that counts the number of times a guest function was called due to timing out
2222pub ( crate ) static METRIC_GUEST_CANCELLATION : & str = "guest_cancellations_total" ;
2323
24- // Counter metric that counts the number of times a vCPU was erroneously kicked by a stale signal
25- // This happens when a signal from a previous guest call arrives late and interrupts a new call
24+ // Counter metric that counts the number of times a vCPU was erroneously kicked by a stale cancellation
25+ // This can happen in two scenarios:
26+ // 1. Linux: A signal from a previous guest call arrives late and interrupts a new call
27+ // 2. Windows: WHvCancelRunVirtualProcessor is called right after vCPU exits but RUNNING_BIT is still true
2628pub ( crate ) static METRIC_ERRONEOUS_VCPU_KICKS : & str = "erroneous_vcpu_kicks_total" ;
2729
2830// Histogram metric that measures the duration of guest function calls
You can’t perform that action at this time.
0 commit comments