Bug 109531 - Memory leak in Radeon DRI or GLX driver
Summary: Memory leak in Radeon DRI or GLX driver
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: XFree86
Version: 1
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-09 02:24 UTC by Daniel
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-09-01 11:09:42 UTC
Type: ---
Embargoed:


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

Description Daniel 2003-11-09 02:24:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Gecko/20031030

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:
Always

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
memory.
    

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-09 02:25:58 UTC
Created attachment 95839 [details]
one of the xfree86 config files used (to show the driver used)

for reference

Comment 2 Daniel 2003-11-09 02:28:16 UTC
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-09 02:37:47 UTC
Added to bugs.xfree86.com as #859

Comment 4 Mike A. Harris 2004-02-23 19:38:14 UTC
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
library

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 11:09:42 UTC
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.