[Spice-devel] Can't write from guest to host with webdav

Jakub Janku jjanku at redhat.com
Sun Jul 19 18:38:30 UTC 2020


On Sun, Jul 19, 2020 at 6:12 PM Koopa Koopa <codingkoopa at gmail.com> wrote:
>
> On 7/19/20, Jakub Janku <jjanku at redhat.com> wrote:
> > Hi!
> >
> > On Sun, Jul 19, 2020 at 9:34 AM Koopa Koopa <codingkoopa at gmail.com> wrote:
> >>
> >> Hi all,
> >>
> >> I'm looking to share a folder between my Arch Linux host and a Windows 10
> >> guest, and SPICE's folder sharing with webdav seems to be the best option
> >> for me. I've set up the QEMU devices that webdav needs, and installed the
> >> Windows service. I have the drive mapped, and am able to navigate the host
> >> folder (apart from the occasional "Windows cannot access
> >> \\localhost at 9843\DavWWWRoot\" that doesn't occur again), and copy files
> >> from the host to the guest. When trying to copy a new file (with data) or
> >> write to an existing file from the guest, though, the application (e.g.
> >> File Explorer, or other programs which save files) hangs for a little bit,
> >> before the transaction fails. For File Explorer, it displays "Error
> >> 0x80070021: The process cannot access the file because another process has
> >> locked a portion of the file."
> >>
> >> This is the output of remote-viewer:
> >>   (remote-viewer:16120): GSpice-WARNING **: 12:58:46.205: Warning no
> >> automount-inhibiting implementation available
> >
> > As you say, this happens in non-GNOME environments. But it's related
> > to usb redirection, not webdav.
> >>
> >>   (remote-viewer:16120): phodav-WARNING **: 12:58:57.910:
> >> (../phodav-2.4/libphodav/phodav-method-propfind.c:70):prop_resourcetype:
> >> code should not be reached
> >>
> >>   (remote-viewer:16120): phodav-WARNING **: 12:59:04.714:
> >> (../phodav-2.4/libphodav/phodav-method-propfind.c:70):prop_resourcetype:
> >> code should not be reached
> >
> > I know that these warnings can happen for example if the shared folder
> > contains a broken symlink. Is that your case? Basically anything in
> > the shared folder that isn't a regular file or a directory can emit
> > this warning, but it shouldn't cause the described issues afaik.
>
> Yep, that is the case. I had a broken symlink in the root directory of
> my share, which explains why that error only occurred in that
> directory. I've removed that file, and that error no longer occurs.

Great, so that makes this one clear.
>
> As for the main issue, upon some more testing, I've determined that:
> - I can copy files to the root of a $HOME share.
> - I cannot copy files to a mounted device within the $HOME share.
> - I cannot copy files to a share created at or within the mountpoint.
>
> The drive that my $HOME is on is ext4, and the mounted device (in
> fact, there are two of these in my home directory) is NTFS.

How frequent is this issue? Can you copy larger files?
>
> >>
> >>   (remote-viewer:16120): GSpice-WARNING **: 12:59:04.793:
> >> (../spice-gtk-0.38/src/channel-webdav.c:330):demux_to_client_cb: runtime
> >> check failed: (size == c->demux.size)
> >>   phodav-Message: 13:00:06.047: missing lock: /testfile
> >> urn:uuid:ceb212f1-f8af-4dd3-b36c-a7e627b6c08a
> >>   phodav-Message: 13:00:06.062: missing lock: /testfile
> >> urn:uuid:ceb212f1-f8af-4dd3-b36c-a7e627b6c08a
> >>   phodav-Message: 13:00:06.076: missing lock: /testfile
> >> urn:uuid:ceb212f1-f8af-4dd3-b36c-a7e627b6c08a
> >
> > I'm not able to reproduce it, so more logs would be helpful.
> > Could you please run remote-viewer or spicy with the following options
> > and attach the output?
> > G_MESSAGES_DEBUG=phodav remote-viewer --spice-debug
> >
>
> Sure. I've attached a remote-viewer log ran with those parameters,
> from right before I copied the file, until the File Explorer error was
> displayed. I had a share set up to where the mountpoint is the shared
> directory, and copied a file named "export1.csv" to the root of the
> share.

Thanks a lot!

Would you be able to recompile spice-gtk with the attached patch (it
adds some more logs and could perhaps fix the issue)? If so, please
send the output in the same fashion as you did now, spicy is just fine
for this purpose.

Cheers,
Jakub
>
> >>
> >> I read that the first GSpice error always occurs on non-GNOME host
> >> environments. The phodav error occurs whenever I view the root directory
> >> of the share, or try copying/writing to a file anywhere in the share. The
> >> second GSpice and other phodav messages occur when copying/writing a file
> >> in the share.
> >>
> >> This occurs both with remote-viewer, and spicy. The same result occurs
> >> whether or not I have the "Read only" checkbox in remote-viewer checked.
> >>
> >> Thanks!
> >> _______________________________________________
> >> Spice-devel mailing list
> >> Spice-devel at lists.freedesktop.org
> >> https://lists.freedesktop.org/mailman/listinfo/spice-devel
> >
> > Thanks,
> > Jakub
> >
> >
>
> Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-check-if-client-is-closed.patch
Type: text/x-patch
Size: 2968 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20200719/c868a5e0/attachment.bin>


More information about the Spice-devel mailing list