nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA FreeBSD (http://www.nvnews.net/vbulletin/forumdisplay.php?f=47)
-   -   Kernel memory leak in nvidia driver? (http://www.nvnews.net/vbulletin/showthread.php?t=100640)

cb1 10-19-07 10:14 AM

Kernel memory leak in nvidia driver?
 
Hi, I'm running Xorg 7.3 with the new 100.14.19 driver, on the recently-branched RELENG_7. I noticed that the nvidia driver seems to be slowly but surely leaking kernel memory. Currently, with a 2-day uptime and not really anything running:

$ vmstat -m | grep nvidia
nvidia 2314 69111K - 534373 16,32,64,128,256,512,1024,2048,4096

Up from about 8MB when the system was first booted. If it goes long enough, it will grow to upwards of 100MB. Sometimes during heavy OpenGL use it will burst upwards of 150MB (but go back down afterward). Eventually it bursts high enough that I suffer a kmem_map too small panic.

I'm not sure if this started with 100.14.19, or if I just happened to be paying more attention to kernel memory due to my work with tuning ZFS (which is very kmem-intensive).

The burst allocations during intensive use make sense, but it seems like sometimes when a process exits not all of its resources are being freed. Simple OpenGL apps like xscreensaver are OK, but I can provoke the behavior easily by running games in Wine -- every successive launch / exit cycle eats more memory.

Is anyone else experiencing this?

Dag 10-25-07 12:06 PM

Re: Kernel memory leak in nvidia driver?
 
I run the same setup, my uptime is 12 days at the moment.
Everything works as it should, after applying this patch.
http://www.nvnews.net/vbulletin/showthread.php?t=99604
I can play Lincity, Xmoto and Scorched3D simultaniously, and never use more than +/- 64 MB.

However, Wine gives me regular headaches, too.

cb1 10-26-07 11:07 AM

Re: Kernel memory leak in nvidia driver?
 
Quote:

Everything works as it should, after applying this patch.
http://www.nvnews.net/vbulletin/showthread.php?t=99604
I am aware of that patch, having written it, but thank you :)

After some further testing it does seem to be just Wine that I encounter the issue with. Running WoW, logging in, and exiting in a loop causes the memory usage to rise steadily.

Apparently something is not releasing all its resources, becuase I noticed that I was unable to kldunload nvidia after stopping the X server. I normally can do that even after having used X for a while, as long as I stop everything first.

Is there any way to get a debug dump of what resources the nvidia driver is holding and what process it thinks they're associated with?

zander 10-26-07 11:51 AM

Re: Kernel memory leak in nvidia driver?
 
What's the best way to get wine setup on FreeBSD 7.x?

Harvey Pooka 10-26-07 02:06 PM

Re: Kernel memory leak in nvidia driver?
 
Quote:

Originally Posted by zander
What's the best way to get wine setup on FreeBSD 7.x?

Here is a safe setup (after updating the ports tree):
cd /usr/ports/emulators/wine
make clean install && make clean
winecfg (mainly to configure the audio to use OSS)

This should be enough to run software such as Pharaoh. :)

Is this all you need?

zander 10-26-07 02:45 PM

Re: Kernel memory leak in nvidia driver?
 
@Harvey Pooka: I think so, yes. Thanks for the pointers.

@cb1: does the problem only reproduce with WoW or with other Windows applications, as well?

cb1 10-26-07 02:57 PM

Re: Kernel memory leak in nvidia driver?
 
@Harvey Pooka: Yes, that's exactly what I'm doing. Tweaked a few sound options in winecfg but that's it.

@zander: Well I'm not currently running any other Windows applications with it, but will see what I can set up to test it with.

Do you mean specifically OpenGL using apps or any app at all?

cb1 10-26-07 03:16 PM

Re: Kernel memory leak in nvidia driver?
 
Well shoot. I made the mistake of upgrading to the latest version of wine, and now i can't reproduce the problem anymore :(

wine-0.9.47,1 works fine

0.9.44,1 is what I had before. I think I'll try rolling back to that, as just because wine isn't tickling it doesn't mean that it's not still there.

zander 10-26-07 03:42 PM

Re: Kernel memory leak in nvidia driver?
 
@cb1: I meant any readily available Windows application that's simple to install and doesn't need a user account, etc., to run.


All times are GMT -5. The time now is 03:50 PM.

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