Bug 1256376 - memory leak/high memory usage with spice webdav feature
Summary: memory leak/high memory usage with spice webdav feature
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Fedora
Classification: Fedora
Component: qemu
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Fedora Virtualization Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-24 12:38 UTC by Victor Toso
Modified: 2015-11-23 20:44 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-11-23 20:44:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
massif: with patches in spice server (64.39 KB, text/plain)
2015-08-24 12:39 UTC, Victor Toso
no flags Details
massif: without patches (115.52 KB, text/plain)
2015-08-24 12:40 UTC, Victor Toso
no flags Details


Links
System ID Private Priority Status Summary Last Updated
FreeDesktop.org 91350 0 None None None Never

Description Victor Toso 2015-08-24 12:38:21 UTC
This bug is being open due the comment:
https://bugs.freedesktop.org/show_bug.cgi?id=91350#c9

Description of problem:
When copying big files from client to guest, the memory usage in the host grows by about the size of the file. This is partially spice problem due the memory pool being able to increase as much as necessary without a limit which should be handled by the patches sent in the mailing list [0]

[0] http://lists.freedesktop.org/archives/spice-devel/2015-August/021644.html

At the same time, massif shows high memory usage by qemu as well [1] (output attached)

[1] (peak)
->49.64% (267,580,319B) 0x308B89: malloc_and_trace (vl.c:2724)
| ->49.38% (266,167,561B) 0x67CE678: g_malloc (gmem.c:97)
| | ->49.03% (264,241,152B) 0x511D8E: qemu_coroutine_new (coroutine-ucontext.c:106)
| | | ->49.03% (264,241,152B) 0x510E24: qemu_coroutine_create (qemu-coroutine.c:74)
(...)

The file being shared was a 320M ogv video.


Version-Release number of selected component (if applicable):
QEMU emulator version 2.3.93
SPICE and SPICE-GTK: from git master

How reproducible:
100%

Steps to Reproduce:
1-) build spice-gtk with --enable-webdav=yes
2-) enable webdav in your VM by following:
https://elmarco.fedorapeople.org/manual.html#_folder_sharing
3-) using remote-viewer with webdav patches, connects to a fedora guest
4-) Open nautilus, go to 'Browse Network'
5-) On remote-viewer, enable shared folder by File > Preferences > [X] Share folder
6-) The spice client folder should appear: Double-click to mount it.
7-) Check the memory of your qemu process
8-) Copy a big file (let's say, 300 MB) from the shared folder to local VM
9-) See the memory consumption of qemu grows by a lot;

Actual results:
Memory usage grows during copy and is not freed

Expected results:
Memory should have an upper limit to grow and should be freed after copy

Additional info:
SPICE upstream bug: https://bugs.freedesktop.org/show_bug.cgi?id=91350

Comment 1 Victor Toso 2015-08-24 12:39:22 UTC
Created attachment 1066354 [details]
massif: with patches in spice server

patches: http://lists.freedesktop.org/archives/spice-devel/2015-August/021644.html

Comment 2 Victor Toso 2015-08-24 12:40:00 UTC
Created attachment 1066355 [details]
massif: without patches

Comment 3 Cole Robinson 2015-11-23 20:44:40 UTC
Since there's already an upstream bug at https://bugs.launchpad.net/qemu/+bug/1493033  , just closing this. If you want to get RH qemu devs to prioritize this it's probably better to file a RHEL bug


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