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 865053 - Free copied data from vdagent after copy&paste finishes successfully
Summary: Free copied data from vdagent after copy&paste finishes successfully
Keywords:
Status: CLOSED NOTABUG
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: Arnon Gilboa
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-10 17:10 UTC by Marian Krcmarik
Modified: 2019-10-10 14:19 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-11 16:13:46 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Marian Krcmarik 2012-10-10 17:10:28 UTC
Description of problem:
Free copied data from vdagent after copy&paste finishes successfully, It seems like vdagent process keeps copied data from client to guest in memory and does not free it after copy&paste is done, It is visible mainly when doing huge copy&paste - like dozens of megabytes. This is not observed with the linux vdagent.

Version-Release number of selected component (if applicable):
vdagent-win 0.1-12

How reproducible:
Always

Steps to Reproduce:
1. Connect to a windows guest with installed and running vdagent
2. Place huge text into clipboard on the client machine.
3. Paste it on the guest.
4. Check memory usage of vdagent process.
  
Actual results:
The memory usage seems to be increased by amount of copied text.

Expected results:
The memory should be freed after the copy&paste is done.

Additional info:

Comment 1 Arnon Gilboa 2012-10-11 15:39:53 UTC
Seems like it's not a bug. That's the way clipboard works in Windows. Each time an application sets the clipboard, it cannot free the data. This happens automatically by the system when another appliaction sets the clipboard, or when it's cleaned.

"If SetClipboardData succeeds, the system owns the object identified by the hMem parameter. The application may not write to or free the data once ownership has been transferred to the system." (In our case the application is vdagent)
http://msdn.microsoft.com/en-us/library/windows/desktop/ms649051%28v=vs.85%29.aspx

Comment 2 Marian Krcmarik 2012-10-11 16:13:46 UTC
(In reply to comment #1)
> Seems like it's not a bug. That's the way clipboard works in Windows. Each
> time an application sets the clipboard, it cannot free the data. This
> happens automatically by the system when another appliaction sets the
> clipboard, or when it's cleaned.
> 
> "If SetClipboardData succeeds, the system owns the object identified by the
> hMem parameter. The application may not write to or free the data once
> ownership has been transferred to the system." (In our case the application
> is vdagent)
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms649051%28v=vs.
> 85%29.aspx

Ok, Thanks for looking at that, I will close in that case.


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