Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 15935 - memory leak in nvidia drivers >= 1.0.2960
Summary: memory leak in nvidia drivers >= 1.0.2960
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
: 17955 (view as bug list)
Depends on:
Blocks: 17955
  Show dependency tree
 
Reported: 2003-02-18 12:41 UTC by Holger Benl
Modified: 2003-04-09 10:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Benl 2003-02-18 12:41:03 UTC
When going through the screensavers from xscreensaver, my memory consumption
goes up until it reduces my machine to a swapping mess that takes minutes to
respond to any user interaction.

Reproducible: Always
Steps to Reproduce:
1. open xscreensaver
2. click on an OpenGL-based screensaver (and wait 'til the preview appears to
the right)
3. click on another screensaver
4. repeat 2. and 3.
Actual Results:  
memory consumption goes up every time the preview for an OpenGL-based
screensaver comes up and doesn't go down anymore - not even if I exit
xscreensaver or
stop the X server (!)

Expected Results:  
memory should be freed when it's not used anymore ;)

I'm on a 1.4rc2 system. I tried with:
- gentoo-2.4.19-r10 kernel and nvidia-kernel-1.0.3123-r2/nvidia-glx-1.0.3123
- vanilla 2.4.20 kernel and nvidia as above
- vanilla 2.4.20 kernel and nvidia-kernel-1.0.2960-r1/nvidia-glx-2.0.2960-r1
all of these showed the described behaviour

- vanilla 2.4.20 kernel and nvidia-kernel-1.0.2880-r1/nvidia-glx-1.0.2880
this one seems to work without a problem

on my previous gentoo system (1.2), I also had problems when I recently
upgraded the nvidia drivers - I didn't investigate however, since I knew
I'd be re-installing soon anyway. But from what I can remember, that could
well have been the same problem (I *think* I was upgrading from 1.0.2880
back then)

I have an Athlon system with VIA 82C686 chipset and a Riva TNT (don't laugh) card.
Comment 1 James Bowlin 2003-03-08 22:32:56 UTC
Fixed? 
 
I emailed Nvidia about this bug and the nvidia memory leak problems mentioned in our 
fora.  I am able to replicate this bug on my machine using gentoo-sources-2.4.20-r1 
with the 4191 and 3123 Nvidia drivers. 
 
Andy (from Nvidia) sent me the following patch.  It solved the problem for 
me using the 4191 Nvidia driver.  I have not tried it with the 3123 Nvidia driver yet. 
 
He also pointed out that the orignal bug report said it was reproducible 
on vanilla-2.4.20 sources which don't have the code that gets patched below 
so there may be other problems too. 
 
BTW: this all happened today (Saturday).  Many thanks to Andy for working 
during the weekend. 
 
I'm on a Dell i8200 laptop with a GeForce2 Go card w/ 32 Meg Vram and 
using Nvidia AGP. 
 
diff -ru linux-2.4.20-2.48/mm/page_alloc.c linux-2.4.20-6/mm/page_alloc.c 
--- linux-2.4.20-2.48/mm/page_alloc.c 2003-02-13 08:31:30.000000000 -0800 
+++ linux-2.4.20-6/mm/page_alloc.c 2003-02-27 06:33:37.000000000 -0800 
@@ -98,13 +106,13 @@ 
lru_cache_del(page); 
} 
 
- /* 
- * This late check is safe because reserved pages do not 
- * have a valid page->count. This trick avoids overhead 
- * in __free_pages(). 
- */ 
- if (PageReserved(page)) 
- return; 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
if (page->buffers) 
BUG(); 
if (page->mapping) { 
@@ -654,7 +662,7 @@ 
 
void __free_pages(struct page *page, unsigned int order) 
{ 
- if (put_page_testzero(page)) 
+ if (!PageReserved(page) && put_page_testzero(page)) 
__free_pages_ok(page, order); 
} 
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2003-03-16 07:24:06 UTC
lolo/whoever, please have a look.
Comment 3 Jay Pfeifer (RETIRED) gentoo-dev 2003-03-23 13:57:57 UTC
*** Bug 17955 has been marked as a duplicate of this bug. ***
Comment 4 Jay Pfeifer (RETIRED) gentoo-dev 2003-03-23 13:59:08 UTC
i'll have to see how the patch affects people who are *not* using nvidia's proprietary drivers. 
 
Jay 
Comment 5 James Bowlin 2003-04-07 21:33:04 UTC
This problem has vanished on my system using the 4349 drivers with the Gentoo 
2.4.20-r2 Kernel.   
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2003-04-09 10:03:11 UTC
Ok, great.