Bug 90035

Summary: Memory leak when using mouse cursor themes
Product: [Retired] Red Hat Raw Hide Reporter: Felipe Alfaro Solana <felipe_alfaro>
Component: XFree86Assignee: Mike A. Harris <mharris>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: medium    
Version: 1.0CC: chris.ricker
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-08-23 03:04:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 100644    

Description Felipe Alfaro Solana 2003-05-01 14:51:53 UTC
Description of problem: 
Since I've started using a new X11 animated mouse cursor theme, the X server process (X) 
keeps constantly growing in memory consumption. This didn't happen when using the standard 
X11 mouse cursor theme that comes by default with Red Hat Linux 9. 
 
This memory leaks is completely reproducible by forcing the X server to change between an 
animated mouse cursor and a standard, B&W mouse cursor. For example, when using VNC 
viewer (vncviewer) to remotely access another RH9 server, most of the time the mouse cursor 
shown when the pointer is inside the VNC viewer window has a standard, B&W appearance. I 
can reproduce the memory leak simply by moving the mouse pointer inside of the VNC viewer 
window and then outside, to force the switching between the new animated mouse cursor and 
the old, non-animated, B&W cursor. 
 
The "top" command reveals an steady increase in memory consumption when doing this. For 
example, I've seen X server to increase memory consumption from 24% up to a 32% simply 
by making the mouse enter and exit the VNC window to force mouse shape change. 
 
Version-Release number of selected component (if applicable): 
XFree86-4.3.0-6 
 
How reproducible: 
Always 
 
Steps to Reproduce: 
1. Install an animated mouse cursor for XFree86 4.3. For example, I downloaded "Golden 
XCursors 3D" from "http://www.kde-look.org/content/show.php?content=5507". 
1a. Install the mouse themes by uncompressing the package. Next, move the "gold" and 
"default" directories from the mouse theme package to "/usr/share/icons". 
1b. Restart X. This should display golden, animated mouse cursors. 
2. Log on to your X11 session. In my case, it's a KDE session. 
3. Launch "vncviewer" to attach to a remote RH9 server. 
4. While inside the client area of the VNC viewer window, the mouse cursor will usually have 
the old, boring, B&W appearance of older versions of XFree86: a standard black arrow. There 
are some exceptions to this rule: it seems that some applications running on the remote server 
still show the animated mouse cursor, but usually, the desktop area of the remote server does 
always show the standard, non-animated, B&W mouse cursor. 
5. If you move the mouse outside the VNC viewer window, the mouse cursor will return to the 
animated, golden arrow. 
6. By repeating steps 4 and 5 for a few times, you'll appreciate the "X" process increases it's 
memory usage steadily. 
 
Actual results: 
X server seems to leak memory every time the mouse cursor changes between an animated, 
colorful cursor and an older, B&W one. 
 
Expected results: 
X server shouldn't leak memory simply by switching back and forth from and to the new, 
animated cursors back and the older, B&W ones. 
 
Additional info: 
Running XFree86-4.3.0-6 from RawHide, but also happens with RH9's XFree86-4.3.0-2. 
The video card is an ATI RAGE Mobility M1 AGP with 8MB. 
The machine is running Red Hat 9 with a 2.5.68-mm3 kernel (yeah, I know it's an experimental 
kernel and this is not normally supported, but I've seen problems in the past with the new 
mouse cursors, specially with the ATI and Radeon drivers). 
This seems to happen with the standard ATI driver and the GATOS project ATI driver.

Comment 1 Felipe Alfaro Solana 2003-05-05 13:20:45 UTC
Disabling the animated mouse cursor cures the memory leak problem. It seems the problem is 
more complex than simply switching between animated and B&W mouse cursors: I've been 
using my system in such a way that only animated mouse cursors are used and the X server 
keeps leaking memory. 

Comment 2 Osma Ahvenlampi 2003-05-23 20:37:47 UTC
I have a similar problem. I installed an animated mouse cursor and soon
afterwards noticed that the X virtual memory size keeps increasing. I wasn't
sure what caused it because I had upgraded to RH9 at about the same time.
However, since switching back to non-animated cursors, the leak has at least
become significantly slower, if not eliminated. I've still experienced a couple
of OOM crashes while using a set of applications that haven't OOM on me before
(although they are memory hungry), so I'm quite not sure the problem is
completely eliminated by not using animated cursors.

Perhaps XFree leaks a bitmap every time the cursors changes shape?

Comment 3 Felipe Alfaro Solana 2003-08-23 01:32:04 UTC
I tried reproducing this with XFree86-4.3.0-21 but I was unable to. So, if 
everybody agrees, I'll close it. 

Comment 4 Mike A. Harris 2003-08-23 03:04:22 UTC
Ok thanks, marking as fixed in RAWHIDE.