[Cairo] X server CPU Load problem

Soorya Kuloor skuloor at verano.com
Fri Sep 19 11:02:05 PDT 2003


Hi Carl,

I rebuilt Cairo with your fix. I have been able to run the test code now
for more than 2 hours without any leak or the CPU problem. Previously, I
was able to reproduce the problem within 1-1.5 hours consistently. So it
looks like the problem is fixed.

Thanks,
-- Soorya

On Tue, 2003-09-16 at 15:44, Carl Worth wrote:
> On Aug 27, Soorya Kuloor wrote:
>  > I am attaching a test program that makes the X server consume approx.
>  > 100% CPU after a while. The program basically redraws the screen every
>  > 200ms with alternate colors, basically giving an appearance of blinking
>  > figures.
> 
> Soorya,
> 
> I've just committed a fix to Cairo CVS that should correct this
> problem.
> 
> You mentioned to me recently that the X server memory was
> increasing. I took a look with the X-Resource extension[*] and it was
> plain to see that the client was leaking pixmaps into the server.
> 
> Now that I knew what to look for it was easy to find the problem in
> Cairo. Rather embarrassing really:
> 
> 	-/* XXX: huh? This should be fine since we already created a picture
> 	-       from the pixmap, right?? (Somehow, it seems to be causing some
> 	-       breakage).
> 	        XFreePixmap (surface->dpy, pix);
> 	-*/
> 
> I think at one point the pixmap was mistakenly being freed multiple
> times. But I must have fixed that bug in both spots. ;-)
> 
> Ah well. Hopefully it should behave much more nicely now. I no longer
> see any increase in server resources when running the example.
> 
> -Carl
> 
> [*] http://mail.gnome.org/archives/gnome-hackers-readonly/2002-March/msg00127.html
> 





More information about the cairo mailing list