Bug 90035 - Memory leak when using mouse cursor themes
Memory leak when using mouse cursor themes
Product: Red Hat Raw Hide
Classification: Retired
Component: XFree86 (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Mike A. Harris
David Lawrence
Depends On:
Blocks: CambridgeTarget
  Show dependency treegraph
Reported: 2003-05-01 10:51 EDT by Felipe Alfaro Solana
Modified: 2007-04-18 12:53 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-08-22 23:04:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Felipe Alfaro Solana 2003-05-01 10:51:53 EDT
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): 
How reproducible: 
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 09:20:45 EDT
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 16:37:47 EDT
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-22 21:32:04 EDT
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-22 23:04:22 EDT
Ok thanks, marking as fixed in RAWHIDE.

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