nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Huge memory leak with texture_from_pixmap (http://www.nvnews.net/vbulletin/showthread.php?t=79333)

lcs 11-01-06 02:15 PM

Huge memory leak with texture_from_pixmap
 
1 Attachment(s)
I'm trying to write a composition manager using texture_from_pixmap. However, I'm getting huge memory leaks from my code.

In order to try to find the problem I wrote this simple test program that doesn't do a lot but has the same behavior. Am I doing something wrong? compiz works ...

(I have a laptop with a Radeon 9700 Mobile and there it doesn't leak.)

Fedora Core 6:[martin@lisa ~]$ uname -a
Linux lisa.datan.blom.org 2.6.18-1.2798.fc6 #1 SMP Mon Oct 16 14:39:22 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux
[martin@lisa ~]$ glxinfo |grep string
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 7800 GS/AGP/SSE2
OpenGL version string: 2.1.0 NVIDIA 96.40

piotrq__ 11-01-06 02:17 PM

Re: Huge memory leak with texture_from_pixmap
 
Try 96.25, or 96.26 driver. That 96.40 version that you're using is actually older than those two.

netllama 11-01-06 02:18 PM

Re: Huge memory leak with texture_from_pixmap
 
In addition to testing with 1.0-9626, I'm curious how you are detecting the memory leak? Also, please generate and post an nvidia-bug-report.log.

Thanks,
Lonni

lcs 11-01-06 02:42 PM

Re: Huge memory leak with texture_from_pixmap
 
1 Attachment(s)
Quote:

Originally Posted by netllama
In addition to testing with 1.0-9626, I'm curious how you are detecting the memory leak? Also, please generate and post an nvidia-bug-report.log.

Thanks for the quick reply. Same thing with 9626 RPMS from Livna, I'm afraid. Log attached.

Memory usage is simply using top and inspecting the Xorg process. I run totally out of memory after 2-3 invocations.

netllama 11-01-06 03:53 PM

Re: Huge memory leak with texture_from_pixmap
 
What is your test app supposed to do?
As far as I can tell it just seems to hang X (trying to access a previate resource) as long as its running, but I'm not seeing any memory usage issues.

piotrq__ 11-01-06 04:18 PM

Re: Huge memory leak with texture_from_pixmap
 
Same here... I compiled and ran this app, all I got was just a hang, but no increase in memory usage.

lcs 11-01-06 04:31 PM

Re: Huge memory leak with texture_from_pixmap
 
1 Attachment(s)
Quote:

Originally Posted by netllama
What is your test app supposed to do?

Open an GL window, reparent it to the overlay window, redirect all other windows to offscreen buffers, create pixmaps and glxpixmaps from all these, (render something using them for 10 seconds, but that was not in the code), release all glxpixmaps and pixmaps, go back to X.

Quote:

Originally Posted by netllama
As far as I can tell it just seems to hang X (trying to access a previate resource) as long as its running, but I'm not seeing any memory usage issues.

Alright, I cut out almost everything. The attached example

1) Sets up opengl using glut
2) Redirects all windows to offscreen buffers
3) Creates GLXPixmaps for those buffers via XCompositeNameWindowPixmap
4) Deletes those buffers
5) Unredirects all windows back

On each invocation, Xorg grows by about 350 MB. If I comment out the glXCreatePixmap call, no memory is lost.

netllama 11-01-06 05:02 PM

Re: Huge memory leak with texture_from_pixmap
 
I think I see what is happening (and potentially wrong or misunderstood) with your app. If I have a compositor running, the app hangs immediately. If I do not have a compositor running, then this new version runs ok, however I'm not seeing any memory leakage. I see the free memory drop by about 20MB when the app is running, and then get freed after it stops.

I'm still not sure that I understand the conditions under which this needs to be run to reproduce the problem you're reporting. Can you detail your setup?

lcs 11-02-06 12:44 AM

Re: Huge memory leak with texture_from_pixmap
 
Quote:

Originally Posted by netllama
I'm still not sure that I understand the conditions under which this needs to be run to reproduce the problem you're reporting. Can you detail your setup?

Sorry, perhaps I should have had proper error checks in the example. I was trying to write a composition manager, so if you already have one running, it must be stopped before running the test.

I'm running a standard Metacity GNOME desktop in FC6. Nothing special.

Edit: I also tried tried to start a bare Xorg server from runlevel 3, using plain xinit. Interesting observation: If i don't run a window manager or just tinywm-1.3, I can't observe any memory loss. But as soon as I start twm or metacity, I can watch Xorg grow. (tinywm doesn't reparent, that's all I can think of ...)

lcs 11-02-06 03:45 AM

Re: Huge memory leak with texture_from_pixmap
 
1 Attachment(s)
By the way, this also happens on my PC at work with a PCIe card, even when logging into a "failsafe" sessing with only twm and an xterm running.

OpenGL renderer string: GeForce 7800 GTX/PCI/SSE2
OpenGL version string: 2.1.0 NVIDIA 96.40

lcs 11-11-06 03:21 AM

Re: Huge memory leak with texture_from_pixmap
 
Upgraded to 9629 (Livna RPMs) -- same thing. Surely somebody else must be able to reproduce this, since I get exactly the same behavior on two independent FC6/x86_64 G7x systems?

(It doesn't leak if I destroy the previous GLXPixmap before creating a new one, but I have a rather non-trivial rendering pass and need to bind each Pixmap several times during the rendering pass. I was hoping I could get away with creating a GLXPixmap for each window only once ...?)

netllama 11-11-06 11:33 AM

Re: Huge memory leak with texture_from_pixmap
 
I'm sorry, I was able to reproduce the memory leak, however your test app isn't even using tesxture_from_pixmap. There's a bug open for this issue now.

Thanks,
Lonni


All times are GMT -5. The time now is 01:25 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.