[Virtio-fs] vhost_set_vring_kick failed

Pra.. Dew.. linux_learner at outlook.com
Wed Jun 1 19:12:20 UTC 2022


Thank you Sergio. When I applied the patch, I got stuck  here. The header size is correct (40 bytes).

vhost-user.c
 390     ret = qemu_chr_fe_write_all(chr, (const uint8_t *) msg, size);
 391     if (ret != size) {
 392         error_report("Failed to write msg."
 393                      " Wrote %d instead of %d.", ret, size);
 394         return -1;
 395     }


----
Jun 01 19:01:52 device-d1fe4f98f7091676 systemd[1]: Started Application Runtime Environment VMM.
Jun 01 19:01:52 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: info: Passing through UIO device usb-phy at 29910000:
Jun 01 19:01:52 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: info:         Region: base: 0000000029910000 size: 0000000000010000
Jun 01 19:01:52 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: info:         IRQ: 104
Jun 01 19:01:52 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: info: Passing through UIO device gpio at 2d010000:
Jun 01 19:01:52 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: info:         Region: base: 000000002d010000 size: 0000000000002000
Jun 01 19:01:52 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: info:         IRQ: 131
Jun 01 19:01:52 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: info: Passing through UIO device ram:
Jun 01 19:01:52 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: info:         Region: base: 00000000b0000000 size: 0000000050000000
Jun 01 19:01:55 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: info: Passing through UIO device uio at 298c0000:
Jun 01 19:01:55 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: info:         Region: base: 00000000298c0000 size: 0000000000010000
Jun 01 19:01:55 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: info: Passing through UIO device uio at 29800000:
Jun 01 19:01:55 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: info:         Region: base: 0000000029800000 size: 0000000000010000
Jun 01 19:01:55 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: info: Passing through UIO device usb at 29900000:
Jun 01 19:01:55 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: info:         Region: base: 0000000029900000 size: 0000000000001000
Jun 01 19:01:55 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: info:         IRQ: 103
Jun 01 19:01:55 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: info: Successfully realized 6 UIO devices
Jun 01 19:01:57 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: warning: Could not locate arm,scmi-shmem node
Jun 01 19:02:23 device-d1fe4f98f7091676 are-launcher[651]: AS_DEBUG: hdr_size=0x28
Jun 01 19:02:23 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: Failed to write msg. Wrote -1 instead of 52.
Jun 01 19:02:23 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: vhost_set_vring_addr failed: Invalid argument (22)
Jun 01 19:02:23 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: Failed to set msg fds.
Jun 01 19:02:23 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: vhost VQ 0 ring restore failed: -1: Invalid argument (22)
Jun 01 19:02:23 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: Error starting vhost: 22
Jun 01 19:02:23 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: Failed to set msg fds.
Jun 01 19:02:23 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: vhost_set_vring_call failed: Resource temporarily unavailable (11)
Jun 01 19:02:23 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: Failed to set msg fds.
Jun 01 19:02:23 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: vhost_set_vring_call failed: Resource temporarily unavailable (11)
Jun 01 19:02:23 device-d1fe4f98f7091676 are-launcher[651]: qemu-system-device: Failed to read from slave.
device-d1fe4f98f7091676:~$

________________________________
From: Sergio Lopez
Sent: Wednesday, June 1, 2022 6:01 AM
To: Pra.. Dew..
Cc: Vivek Goyal; Stefan Hajnoczi; virtio-fs at redhat.com
Subject: Re: [Virtio-fs] vhost_set_vring_kick failed

On Tue, May 31, 2022 at 10:25:12PM +0000, Pra.. Dew.. wrote:
> Thank you so much Vivek. I enabled the trace in the code itself and
> ran it. The only message I got was InvalidParam message below. I did
> not get any other message.  We are going to try changing the
> structure [VhostUserMemRegMsg]  padding to see if that fixes the
> problem. Is there anything else we should try?

Applying 3009edff81 to qemu-5.1.0 should do the trick. I'm attaching
the patch to this email, so you can simply apply it with something
like:

patch -p1 < 0001-vhost-user-fix-VHOST_USER_ADD-REM_MEM_REG-truncation.patch

Sergio.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virtio-fs/attachments/20220601/97cceeee/attachment.htm>


More information about the Virtio-fs mailing list