firecracker-microvm/firecracker · error

vsock: invalid queue index

Error message

vsock: invalid queue index: {qidx}

What it means

Error "vsock: invalid queue index: {qidx}" thrown in firecracker-microvm/firecracker.

Solutions

  1. Ensure the vsock queue index is within the number of queues the device exposes.
  2. Verify virtio queue negotiation completed before processing queue events.

When it happens

Trigger: Thrown at src/vmm/src/devices/virtio/vsock/device.rs:144 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of firecracker-microvm/firecracker@81b38b9dad (2026-08-19). Data as JSON: /api/errors/3787e22d2f869efc. Report an issue: GitHub.

Appendix: source

Thrown at src/vmm/src/devices/virtio/vsock/device.rs:142

    /// Retrieve the cid associated with this vsock device.
    pub fn cid(&self) -> u64 {
        self.cid
    }

    /// Access the backend behind the device.
    pub fn backend(&self) -> &B {
        &self.backend
    }

    /// Signal the guest driver that we've used some virtio buffers that it had previously made
    /// available.
    pub fn signal_used_queue(&self, qidx: usize) -> Result<(), DeviceError> {
        self.device_state
            .active_state()
            .expect("Device is not initialized")
            .interrupt
            .trigger(VirtioInterruptType::Queue(qidx.try_into().unwrap_or_else(
                |_| panic!("vsock: invalid queue index: {qidx}"),
            )))
            .map_err(DeviceError::FailedSignalingIrq)
    }

    /// Signal the guest which queues are ready to be consumed
    pub fn signal_used_queues(&self, used_queues: &[u16]) -> Result<(), DeviceError> {
        self.device_state
            .active_state()
            .expect("Device is not initialized")
            .interrupt
            .trigger_queues(used_queues)
            .map_err(DeviceError::FailedSignalingIrq)
    }

    /// Walk the driver-provided RX queue buffers and attempt to fill them up with any data that we
    /// have pending. Return `true` if the guest needs to be notified (respecting notification
    /// suppression).
    pub fn process_rx(&mut self) -> Result<bool, InvalidAvailIdx> {

View on GitHub (pinned to 81b38b9dad)