Bug 109531 - Memory leak in Radeon DRI or GLX driver
Memory leak in Radeon DRI or GLX driver
Product: Fedora
Classification: Fedora
Component: XFree86 (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Mike A. Harris
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2003-11-08 21:24 EST by Daniel
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-01 07:09:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
one of the xfree86 config files used (to show the driver used) (3.17 KB, text/plain)
2003-11-08 21:25 EST, Daniel
no flags Details
program to demonstrate the problem (720.23 KB, application/octet-stream)
2003-11-08 21:28 EST, Daniel
no flags Details

  None (edit)
Description Daniel 2003-11-08 21:24:33 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)

Description of problem:
When using the radeon driver, X itself will leak memory when rendering
to an offscreen buffer. Essentially, it leaks the offscreen
framebuffer itself. 

The same code does not cause a leak when using an NVidia card (with
the XFree86-supplied driver).

Version-Release number of selected component (if applicable):
Can reproduce in RH >= 7.3

How reproducible:

Steps to Reproduce:
1. Start X on a machine with a Radeon card. It will typically take 12M
of resident memory.
2.compile and run the attached program.
3.Note that X's resident memory is growing at the rate of 1 Meg /
second. Note that even when you quit the program, X does not free the

Actual Results:  X grows indefinately until the program is exited, and
then does not free the memory until X itself is restarted.

Expected Results:  X should allocate and de-allocate the offscreen
framebuffer as required (there is never more than 1 being used at a
time in this code).

Additional info:

I've discussed this code with Trolltech support, and they confirm that
this problem only manifests with the Radeon driver, and not with other
hardware or drivers.
Comment 1 Daniel 2003-11-08 21:25:58 EST
Created attachment 95839 [details]
one of the xfree86 config files used (to show the driver used)

for reference
Comment 2 Daniel 2003-11-08 21:28:16 EST
Created attachment 95840 [details]
program to demonstrate the problem

This is basically a default QT app (because its easier to render to an
offscreen buffer in QT), with the memory leak demonstrated. The code is
commented, including the exact line where the leak occurs. Note that the
application itself doesn't grow -- X does. Bad (tm).
Comment 3 Daniel 2003-11-08 21:37:47 EST
Added to bugs.xfree86.com as #859
Comment 4 Mike A. Harris 2004-02-23 14:38:14 EST
Since pixmaps are stored inside the X server, any application that
leaks pixmaps will cause the X server to increase in size.  That
is 100% expected, and it's not an X server bug.  The majority
of cases in which the X server appears to have a memory leak, are
usually traced back to either:  1) An application   or 2) A toolkit

kill -9 the application and the problem should go away.
Additionally, you can use the application 'xrestop' to monitor X
resource usage.  Sometimes it is a window manager at fault also.

This problem may end up being any of the above, or it may turn
out to be a legitimate X server bug or Radeon driver bug.  I'm not
a C++ programmer so your C++ example isn't something easily useable
to me personally.

Since the bug has been reported upstream now however, I will track
it there and monitor the progress and resolution there.

Changing status to 'UPSTREAM'

Comment 5 Mike A. Harris 2004-09-01 07:09:42 EDT
The #2 comment in xfree86 bugzilla upstream report indicates the
problem is fixed in a newer release.  I've closed the upstream report
as "FIXED", and am setting the status of this tracker to "RAWHIDE"
also, as we're about 2 or 3 Mesa/DRI implementations in the future
now.  ;o)

If the problem recurs, the new upstream bugzilla for the DRI project
is X.org bugzilla on freedesktop.org.  If the problem persists, please
file a new bug report at http://bugs.freedesktop.org in the "xorg"
component, and we'll continue to track the issue there.

Thanks for testing.

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