[Spice-devel] memory leak in Xspice?

Andreas Kinzler akinzler at gmx.de
Mon Feb 10 08:39:43 PST 2014


Hello Alon,

>> I am using Xspice (current head 9f9709b3) on a production server. After a
>> while the
>> server becomes instable and the Xorg log contains strange out of memory
>> errors for
>> small allocations (Out of video memory: Could not allocate 3344660
>> bytes).
>> When I type "free" on Linux shell, there seems to be gigabytes of free
>> memory available.
>> Are there known memory leaks in Xspice? Any ideas?
> Sorry for the late reply, I was on vacation (some) of that time. It

No problem :-)

> does look like an internal memory leak. Tracking it is not that easy,
> there is some valgrind integration - required since valgrind tracks only
> the system memory allocation and not any internal ones. You could start
> with disabling surface support and seeing if this persists, via:
> Option "EnableSurfaces" "False"
> Under the spiceqxl driver Device Section in your xorg configuration
> file, i.e. something like this:
> Section "Device"
> # ...
> Option "EnableSurfaces" "False"
> EndSection

I will try that. What are the implications of the switch? Does quality suffer?
Or network bandwidth increase?

> For valgrind, if this doesn't help, you will have to rebuild the driver
> with -DDEBUG_QXL_MEM (see src/qxl_mem.c)

I can try that if we have to. Perhaps another hint. I added a small patch to
remove a bunch of warnings. Perhaps they are related to the memory leak.

--- xf86-video-qxl-0.1.1-orig/src/qxl_surface_ums.c
+++ xf86-video-qxl-0.1.1/src/qxl_surface_ums.c
@@ -539,7 +539,7 @@

     if ((bpp & 3) != 0)
     {
-       ErrorF ("%s: Bad bpp: %d (%d)\n", __FUNCTION__, bpp, bpp & 7);
+       //ErrorF ("%s: Bad bpp: %d (%d)\n", __FUNCTION__, bpp, bpp & 7);
        return NULL;
     }

> Alon

Regards Andreas


More information about the Spice-devel mailing list