Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 11-01-06, 02:15 PM   #1
lcs
Registered User
 
Join Date: Aug 2003
Posts: 14
Default Huge memory leak with texture_from_pixmap

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
Attached Files
File Type: txt tfp-test.cc.txt (4.7 KB, 172 views)
lcs is offline   Reply With Quote
Old 11-01-06, 02:17 PM   #2
piotrq__
Registered User
 
Join Date: Jan 2006
Posts: 193
Default 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.
piotrq__ is offline   Reply With Quote
Old 11-01-06, 02:18 PM   #3
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default 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
netllama is offline   Reply With Quote
Old 11-01-06, 02:42 PM   #4
lcs
Registered User
 
Join Date: Aug 2003
Posts: 14
Default Re: Huge memory leak with texture_from_pixmap

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.
Attached Files
File Type: log nvidia-bug-report.log (79.2 KB, 120 views)
lcs is offline   Reply With Quote
Old 11-01-06, 03:53 PM   #5
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default 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.
netllama is offline   Reply With Quote
Old 11-01-06, 04:18 PM   #6
piotrq__
Registered User
 
Join Date: Jan 2006
Posts: 193
Default 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.
piotrq__ is offline   Reply With Quote
Old 11-01-06, 04:31 PM   #7
lcs
Registered User
 
Join Date: Aug 2003
Posts: 14
Default Re: Huge memory leak with texture_from_pixmap

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.
Attached Files
File Type: txt tfp-test2.cc.txt (3.3 KB, 136 views)
lcs is offline   Reply With Quote
Old 11-01-06, 05:02 PM   #8
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default 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?
netllama is offline   Reply With Quote

Old 11-02-06, 12:44 AM   #9
lcs
Registered User
 
Join Date: Aug 2003
Posts: 14
Default 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 ...)

Last edited by lcs; 11-02-06 at 01:29 AM.
lcs is offline   Reply With Quote
Old 11-02-06, 03:45 AM   #10
lcs
Registered User
 
Join Date: Aug 2003
Posts: 14
Default Re: Huge memory leak with texture_from_pixmap

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
Attached Files
File Type: log nvidia-bug-report.log (92.0 KB, 100 views)
lcs is offline   Reply With Quote
Old 11-11-06, 03:21 AM   #11
lcs
Registered User
 
Join Date: Aug 2003
Posts: 14
Default 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 ...?)
lcs is offline   Reply With Quote
Old 11-11-06, 11:33 AM   #12
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default 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
netllama is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
GPU memory consumption, back buffer, Quadro tdsussman NVIDIA Linux 5 08-14-12 09:14 PM
Video: For HPC Energy Efficiency, Samsung 20-nm Memory Fab Makes a Difference News Archived News Items 0 06-26-12 06:00 AM
Measuring card memory usage peter_ga NVIDIA Linux 0 05-24-12 08:07 PM
new memory tech QBM (Quad band memory) sebazve Rumor Mill 9 09-24-02 09:38 PM
Best DDR Memory... pelly General Hardware 10 09-01-02 04:17 PM

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


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