# linux-3.10.7-gentoo and memory leak [solved]

## RayDude

I built and installed 3.10.7 yesterday. Worked like a champ for a while, however after being up for a few hours I noticed that my memory was full (8 Gigs) and my swap space was disappearing.

This problem doesn't exist with 3.9.9.

I have configured memory to be tickless (cause its supposed to be faster). I attached my kernel config.

Any idea what's going on?

Note: while the system was dying, at some point KDE gives up and restarts X, but memory was still full. I killed X and logged in a root, memory was still full. I kill all the console-kit-daemons and everything else I could find that was eating memory and still didn't get any memory back.

Edit: Just remembered: udevd was taking 100% of one CPU.

Actually: this may not be kernel related as 3.9.9 is slowly eating more memory as well and udevd is taking 75% of one CPU. upowerd is taking 25% of one CPU. The system is up to 3.3Gigs of ram and still climbing.

I searched the forums and didn't find anything. Google didn't show anything either so I presume I have the kernel mis-configured.

Any advice would be greatly appreciated. I can't stay and 3.9.9 for ever.

http://pastebin.com/EMiFv2Rd

Update: Lets see: I added some fonts and turned on hinting. I did an emerge world. I installed steam and got Portal working. What else could have done it?

Update 2: Its console kit. Its eating half of the memory at this point. I remember reading about this before and blocking later versions of console kit to fix it...

Update 3: console kit is eating lots of virtual, so are firefox and chrome (yes I use both), but their numbers aren't going up as memory disappears. Something else is going on.

This is driving me buggy, I have to reboot every couple of hours.

Update 4: udevd was going berserk because the kernel was trying to load the nvidia module over and over but the card was off. The fix is to enable the nvidia card with bbswitch. I don't want it on all the time but until bbswitch is a bit more intelligent, I'll assume I have to keep the laptop plugged in all the time. I still have a memory leak...

Final Update: fixing the nvidia module solved the memory leak. And bbswitch behaves properly when you set its default to on in /etc/modprobe.d/bbswitch.conf. After the nvidia module loads, bbswitch detects that it isn't needed anymore, unloads the module and then disables the card.

To summarize: with bbswitch.conf set to disable the nvidia card, the kernel tries unsuccessfully over and over again to load the nvidia module. Each time eating a little more memory and not freeing it. This could be a kernel bug or nvidia module bug. Once nvidia can load, everything behaves as it should.

All other memory hogs are using a lot of virtual but are not taking that much physical so they were just a red herring.

----------

