Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtiofs.exe crashes on files > 2091998 bytes #760

Closed
savchenko opened this issue Apr 20, 2022 · 2 comments
Closed

virtiofs.exe crashes on files > 2091998 bytes #760

savchenko opened this issue Apr 20, 2022 · 2 comments
Assignees

Comments

@savchenko
Copy link

savchenko commented Apr 20, 2022

Describe the bug
virtiofs.exe is crashing when transferring files >2091998 bytes in either direction.

To Reproduce
Steps to reproduce the behaviour:

  1. Create a VM
  2. Try to transfer a file >2091998 bytes to or from the guest

Examples

These files can be transferred:

dd if=/dev/zero of=1kb bs=1024 count=1
dd if=/dev/zero of=10kb bs=10240 count=1
dd if=/dev/zero of=100kb bs=102400 count=1
dd if=/dev/zero of=1Mb bs=1024000 count=1
dd if=/dev/zero of=2Mb bs=2048000 count=1
dd if=/dev/zero of=2Mb_plus bs=2091998 count=1

And this one will fail, 2091999 bytes:

dd if=/dev/zero of=2Mb_plus bs=2091999 count=1

Expected behavior
Transfers succeed irrespective of the file size (within the limitation of FS).

Screenshots

Windows file dialogue showing error 0x800703E3

image

Host:

  • Distro: Debian Testing

  • Kernel version: v5.16.18

  • QEMU version: v6.2+dfsg-3

  • QEMU command line: N/A (using virt-manager v4.0.0)

  • libvirt version: v8.1.0-2

  • libvirt XML file: Under the spoiler below

    (click me)
    <domain type="kvm">
    <name>win10</name>
    <uuid>48abf6bc-9d03-48cd-8839-5163d8f74310</uuid>
    <metadata>
     <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
       <libosinfo:os id="http://microsoft.com/win/10"/>
     </libosinfo:libosinfo>
    </metadata>
    <memory unit="KiB">16777216</memory>
    <currentMemory unit="KiB">16777216</currentMemory>
    <memoryBacking>
     <source type="memfd"/>
     <access mode="shared"/>
    </memoryBacking>
    <vcpu placement="static">8</vcpu>
    <os>
     <type arch="x86_64" machine="pc-q35-6.2">hvm</type>
    </os>
    <features>
     <acpi/>
     <apic/>
     <hyperv mode="custom">
       <relaxed state="on"/>
       <vapic state="on"/>
       <spinlocks state="on" retries="8191"/>
     </hyperv>
     <vmport state="off"/>
    </features>
    <cpu mode="host-passthrough" check="none" migratable="on"/>
    <clock offset="localtime">
     <timer name="rtc" tickpolicy="catchup"/>
     <timer name="pit" tickpolicy="delay"/>
     <timer name="hpet" present="no"/>
     <timer name="hypervclock" present="yes"/>
    </clock>
    <on_poweroff>destroy</on_poweroff>
    <on_reboot>restart</on_reboot>
    <on_crash>destroy</on_crash>
    <pm>
     <suspend-to-mem enabled="no"/>
     <suspend-to-disk enabled="no"/>
    </pm>
    <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
     <disk type="file" device="disk">
       <driver name="qemu" type="qcow2"/>
       <source file="/home/lbr/VM/images/21h2.qcow2"/>
       <target dev="vda" bus="virtio"/>
       <boot order="1"/>
       <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
     </disk>
     <disk type="file" device="cdrom">
       <driver name="qemu" type="raw"/>
       <source file="/home/lbr/VM/tools/virtio-win-0.1.215.iso"/>
       <target dev="sda" bus="sata"/>
       <readonly/>
       <address type="drive" controller="0" bus="0" target="0" unit="0"/>
     </disk>
     <controller type="usb" index="0" model="qemu-xhci" ports="15">
       <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
     </controller>
     <controller type="pci" index="0" model="pcie-root"/>
     <controller type="pci" index="1" model="pcie-root-port">
       <model name="pcie-root-port"/>
       <target chassis="1" port="0x10"/>
       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/>
     </controller>
     <controller type="pci" index="2" model="pcie-root-port">
       <model name="pcie-root-port"/>
       <target chassis="2" port="0x11"/>
       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/>
     </controller>
     <controller type="pci" index="3" model="pcie-root-port">
       <model name="pcie-root-port"/>
       <target chassis="3" port="0x12"/>
       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/>
     </controller>
     <controller type="pci" index="4" model="pcie-root-port">
       <model name="pcie-root-port"/>
       <target chassis="4" port="0x13"/>
       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/>
     </controller>
     <controller type="pci" index="5" model="pcie-root-port">
       <model name="pcie-root-port"/>
       <target chassis="5" port="0x14"/>
       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
     </controller>
     <controller type="pci" index="6" model="pcie-root-port">
       <model name="pcie-root-port"/>
       <target chassis="6" port="0x15"/>
       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x5"/>
     </controller>
     <controller type="pci" index="7" model="pcie-root-port">
       <model name="pcie-root-port"/>
       <target chassis="7" port="0x16"/>
       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x6"/>
     </controller>
     <controller type="pci" index="8" model="pcie-root-port">
       <model name="pcie-root-port"/>
       <target chassis="8" port="0x17"/>
       <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x7"/>
     </controller>
     <controller type="pci" index="9" model="pcie-root-port">
       <model name="pcie-root-port"/>
       <target chassis="9" port="0x18"/>
       <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x0" multifunction="on"/>
     </controller>
     <controller type="pci" index="10" model="pcie-root-port">
       <model name="pcie-root-port"/>
       <target chassis="10" port="0x19"/>
       <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x1"/>
     </controller>
     <controller type="pci" index="11" model="pcie-root-port">
       <model name="pcie-root-port"/>
       <target chassis="11" port="0x1a"/>
       <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x2"/>
     </controller>
     <controller type="pci" index="12" model="pcie-root-port">
       <model name="pcie-root-port"/>
       <target chassis="12" port="0x1b"/>
       <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x3"/>
     </controller>
     <controller type="pci" index="13" model="pcie-root-port">
       <model name="pcie-root-port"/>
       <target chassis="13" port="0x1c"/>
       <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x4"/>
     </controller>
     <controller type="pci" index="14" model="pcie-root-port">
       <model name="pcie-root-port"/>
       <target chassis="14" port="0x1d"/>
       <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x5"/>
     </controller>
     <controller type="sata" index="0">
       <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
     </controller>
     <controller type="virtio-serial" index="0">
       <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
     </controller>
     <filesystem type="mount" accessmode="passthrough">
       <driver type="virtiofs"/>
       <source dir="/tmp/vshare"/>
       <target dir="vshare"/>
       <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
     </filesystem>
     <serial type="pty">
       <target type="isa-serial" port="0">
         <model name="isa-serial"/>
       </target>
     </serial>
     <console type="pty">
       <target type="serial" port="0"/>
     </console>
     <channel type="spicevmc">
       <target type="virtio" name="com.redhat.spice.0"/>
       <address type="virtio-serial" controller="0" bus="0" port="1"/>
     </channel>
     <channel type="spiceport">
       <source channel="org.spice-space.webdav.0"/>
       <target type="virtio" name="org.spice-space.webdav.0"/>
       <address type="virtio-serial" controller="0" bus="0" port="2"/>
     </channel>
     <input type="tablet" bus="usb">
       <address type="usb" bus="0" port="1"/>
     </input>
     <input type="mouse" bus="ps2"/>
     <input type="keyboard" bus="ps2"/>
     <graphics type="spice">
       <listen type="none"/>
       <image compression="off"/>
       <gl enable="yes" rendernode="/dev/dri/by-path/pci-0000:0c:00.0-render"/>
     </graphics>
     <sound model="ich9">
       <address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
     </sound>
     <audio id="1" type="spice"/>
     <video>
       <model type="virtio" heads="1" primary="yes">
         <acceleration accel3d="yes"/>
       </model>
       <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
     </video>
     <redirdev bus="usb" type="spicevmc">
       <address type="usb" bus="0" port="2"/>
     </redirdev>
     <redirdev bus="usb" type="spicevmc">
       <address type="usb" bus="0" port="3"/>
     </redirdev>
     <memballoon model="virtio">
       <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
     </memballoon>
     <vsock model="virtio">
       <cid auto="yes" address="3"/>
       <address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>
     </vsock>
    </devices>
    </domain>

VM:

  • Windows version: 10.0.19044 N/A Build 19044

    > Get-ComputerInfo | select WindowsProductName, WindowsVersion, OsHardwareAbstractionLayer
    #
    WindowsProductName WindowsVersion OsHardwareAbstractionLayer
    ------------------ -------------- --------------------------
    Windows 10 Pro     2009           10.0.19041.1151
    > systeminfo /fo csv | ConvertFrom-Csv | select OS*Version*, Hotfix* | Format-List
    #
    OS Version : 10.0.19044 N/A Build 19044
    Hotfix(s)  : 4 Hotfix(s) Installed.,[01]: KB5004331,[02]: KB5003791,[03]: KB5006670,[04]: KB5005699
  • Which driver has a problem: From the Event Viewer...

    Spice webdav proxy

    Log Name:      System
    Source:        Service Control Manager
    Date:          20/04/2022 12:29:44 PM
    Event ID:      7034
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      DESKTOP-6POD0M8
    Description:
    The Spice webdav proxy service terminated unexpectedly. It has done this 1 time(s).
    
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
        <EventID Qualifiers="49152">7034</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8080000000000000</Keywords>
        <TimeCreated SystemTime="2022-04-20T11:29:44.5704420Z" />
        <EventRecordID>979</EventRecordID>
        <Correlation />
        <Execution ProcessID="624" ThreadID="4924" />
        <Channel>System</Channel>
        <Computer>DESKTOP-6POD0M8</Computer>
        <Security />
      </System>
      <EventData>
        <Data Name="param1">Spice webdav proxy</Data>
        <Data Name="param2">1</Data>
        <Binary>730070006900630065002D0077006500620064006100760064000000</Binary>
      </EventData>
    </Event>  

    virtiofs.exe

    Log Name:      Application
    Source:        Application Error
    Date:          20/04/2022 12:30:21 PM
    Event ID:      1000
    Task Category: (100)
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      DESKTOP-6POD0M8
    Description:
    Faulting application name: virtiofs.exe, version: 0.0.0.0, time stamp: 0x61a8e5b8
    Faulting module name: virtiofs.exe, version: 0.0.0.0, time stamp: 0x61a8e5b8
    Exception code: 0xc0000005
    Fault offset: 0x00000000000068f0
    Faulting process ID: 0x1a94
    Faulting application start time: 0x01d854a9e8075e62
    Faulting application path: C:\Program Files\Virtio-Win\VioFS\virtiofs.exe
    Faulting module path: C:\Program Files\Virtio-Win\VioFS\virtiofs.exe
    Report ID: 729a80b6-8a95-47ca-bbc9-fbb048124bff
    Faulting package full name: 
    Faulting package-relative application ID: 
    
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Application Error" />
        <EventID Qualifiers="0">1000</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>100</Task>
        <Opcode>0</Opcode>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2022-04-20T11:30:21.2112588Z" />
        <EventRecordID>608</EventRecordID>
        <Correlation />
        <Execution ProcessID="0" ThreadID="0" />
        <Channel>Application</Channel>
        <Computer>DESKTOP-6POD0M8</Computer>
        <Security />
      </System>
      <EventData>
        <Data>virtiofs.exe</Data>
        <Data>0.0.0.0</Data>
        <Data>61a8e5b8</Data>
        <Data>virtiofs.exe</Data>
        <Data>0.0.0.0</Data>
        <Data>61a8e5b8</Data>
        <Data>c0000005</Data>
        <Data>00000000000068f0</Data>
        <Data>1a94</Data>
        <Data>01d854a9e8075e62</Data>
        <Data>C:\Program Files\Virtio-Win\VioFS\virtiofs.exe</Data>
        <Data>C:\Program Files\Virtio-Win\VioFS\virtiofs.exe</Data>
        <Data>729a80b6-8a95-47ca-bbc9-fbb048124bff</Data>
        <Data>
        </Data>
        <Data>
        </Data>
      </EventData>
    </Event>
  • Driver version or commit hash that was used to build the driver: v0.1.215-2, everything is from the virtio-win-0.1.215.iso, shasum 38364f050257b7c34b9f0c4b5d234c4c2cc5929d

Additional context
Attaching dump of the crashed process as requested by @YanVugenfirer in #724virtiofs_dump.zip

@savchenko savchenko added the Bug Bug label Apr 20, 2022
@savchenko savchenko changed the title virtiofs.exe crashing on files > 2091998 bytes virtiofs.exe crashes on files > 2091998 bytes Apr 20, 2022
@viktor-prutyanov viktor-prutyanov self-assigned this Apr 20, 2022
@viktor-prutyanov
Copy link
Collaborator

viktor-prutyanov commented Apr 20, 2022

Hi @savchenko,

I think you can replace

<driver type="virtiofs"/>

with

<driver type="virtiofs" queue="1024"/>

@savchenko
Copy link
Author

@viktor-prutyanov , this seems to fix it! Yet to do an extensive testing, but so far so good - no crashes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants