RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1548419 - Spice agent is stuck after closing connection with ongoing file transfer
Summary: Spice agent is stuck after closing connection with ongoing file transfer
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: spice-vdagent-win
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Frediano Ziglio
QA Contact: SPICE QE bug list
URL:
Whiteboard:
: 1676919 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-23 12:59 UTC by Radek Duda
Modified: 2020-11-04 03:17 UTC (History)
9 users (show)

Fixed In Version: spice-vdagent-win-0.10.0-4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 03:17:29 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)
vdagent.log from Win10 guest (6.77 KB, text/plain)
2018-02-23 12:59 UTC, Radek Duda
no flags Details
Proposed fix (1.22 KB, patch)
2020-05-15 14:26 UTC, Frediano Ziglio
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2020:4721 0 None None None 2020-11-04 03:17:34 UTC

Description Radek Duda 2018-02-23 12:59:59 UTC
Created attachment 1399858 [details]
vdagent.log from Win10 guest

Description of problem:
If I close remote-viewer when file is trranserred (drag'n'drop from client to guest), vdservice is stopped.

Version-Release number of selected component (if applicable):
client/host rhel7.5:
virt-viewer-5.0-10.el7.x86_64
spice-server-0.14.0-2.el7.x86_64
spice-glib-0.34-3.el7.x86_64
spice-gtk3-0.34-3.el7.x86_64
qemu-kvm-rhev-2.9.0-16.el7_4.14.x86_64

guest Win10/Win7:
vdagent-win-4.1-5
everything from RHEV-tools 4.2-2


How reproducible: ~70%


Steps to Reproduce:
1. Start Win VM, connect to it with remote-viewer
2. drag'n'drop some file from client to guest
3. before transfer is complete close remote-viewer
4. reconnect to guest VM with remote-viewer
if vdagent is running repeat steps 2-4

Actual results:
vdservice is not working

Expected results:
vdservice is running

Additional info:

Comment 1 Victor Toso 2018-02-26 08:00:00 UTC
Easy to reproduce upstream too, you just need to drag'n drop a big file and closed the connection. Both VDagent and VDservice are running but stuck and Spice features do not work after Agent enter in this state.

Moving to 4.3 for now and if needed we can backport to 4.2.z

Comment 2 Victor Toso 2018-10-22 15:00:13 UTC
Verified that this is solved in git master but bug still happens on latest release 0.9.0. We should make a release soon and probably rebase to bring several fixes to rhv.

I'd guess the fix to be the commit below but I didn't bisect the code for it.

commit aefc220c027c98c0877cbb6dc7140e72f119262b
Author: Frediano Ziglio <fziglio>
Date:   Fri May 25 20:01:11 2018 +0100

    file_xfer: Use destructor for FileXferTask
    
    Limit too much manual work.
    By default delete the file, unless success() is called.
    
    Signed-off-by: Frediano Ziglio <fziglio>
    Acked-by: Christophe Fergeau <cfergeau>

Moving to POST, checking for rebase on vdagent soon and I'll make this bug to depend on it (to be checked if really fixed, etc.)

Comment 3 Sandro Bonazzola 2019-01-28 09:44:38 UTC
This bug has not been marked as blocker for oVirt 4.3.0.
Since we are releasing it tomorrow, January 29th, this bug has been re-targeted to 4.3.1.

Comment 5 Sandro Bonazzola 2019-03-12 12:54:25 UTC
4.3.1 has been released, please re-target this bug as soon as possible.

Comment 10 Victor Toso 2020-05-14 10:09:30 UTC
From Comment #2 this is not reproducible upstream. Need to find the proper fix as suggested commit did not fix it.
Perhaps we could do a rebase to match upstream too?

Moving back to NEW. Removing myself from ASSIGNED.

Comment 11 Frediano Ziglio 2020-05-15 13:16:40 UTC
Even current master is not happy about it. It seems most of the time after you close the connection while transfering the file then the agent/service is not able to work. But processes are still there (as Victor state in a previous comment) and CPU is 0% (so not in a loop).

The issue is that large messages (like chunks of file) are split into chunks. When there's a disconnection server sends a VD_AGENT_DISCONNECT to the agent but it could be that _in_msg_pos is >0 that is the message was incomplete. This will cause next chunks to be added to the old incomplete one instead of creating a new message.

Solution is simple reset _in_msg_pos (and relative) when server sends VD_AGENT_CLIENT_DISCONNECTED.

Comment 12 Frediano Ziglio 2020-05-15 13:22:22 UTC
See fix at https://gitlab.freedesktop.org/spice/win32/vd_agent/-/merge_requests/23

Comment 13 Frediano Ziglio 2020-05-15 14:26:32 UTC
Created attachment 1688941 [details]
Proposed fix

Comment 14 Victor Toso 2020-05-15 15:06:23 UTC
Merged as fa2e3371c8a1cc3038039d08e13a289ae4fdb207

Comment 15 Frediano Ziglio 2020-05-21 14:57:29 UTC
*** Bug 1676919 has been marked as a duplicate of this bug. ***

Comment 21 errata-xmlrpc 2020-11-04 03:17:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (spice-vdagent-win bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2020:4721


Note You need to log in before you can comment on or make changes to this bug.