You are not logged in.

#1 2018-11-23 20:04:56

wioo
Member
Registered: 2017-05-18
Posts: 14

[SOLVED]Kernel 4.19.2, memory problem

So, this is a strange one.

When using latest kernel (4.19.2) memory just grows, every 10 sec for 1M. This does not happen with lts kernel.
On fresh restart, only using htop (doing nothing else) like I said, every 10 second 1M+. In two days my memory is full and I cant free it. Closing almost all aps, clear cache (with sudo echo 3 | tee /proc/sys/vm/drop_caches)...

I am using ps_mem and df -a, all normal.

Last edited by wioo (2018-11-24 08:42:15)

Offline

#2 2018-11-23 20:32:07

loqs
Member
Registered: 2014-03-06
Posts: 6,370

Re: [SOLVED]Kernel 4.19.2, memory problem

If you monitor the output of /proc/meminfo which value is increasing by 1M every 10 seconds?

Offline

#3 2018-11-23 20:49:05

wioo
Member
Registered: 2017-05-18
Posts: 14

Re: [SOLVED]Kernel 4.19.2, memory problem

values at 426M/7.63G file 1
values at 433M/7.63G file 2

diff  1 2
2,5c2,5
< MemFree:         6843564 kB
< MemAvailable:    7318156 kB
< Buffers:           69060 kB
< Cached:           638004 kB
---
> MemFree:         6835908 kB
> MemAvailable:    7310672 kB
> Buffers:           69204 kB
> Cached:           637980 kB
7,12c7,12
< Active:           425704 kB
< Inactive:         449656 kB
< Active(anon):     175796 kB
< Inactive(anon):    21676 kB
< Active(file):     249908 kB
< Inactive(file):   427980 kB
---
> Active:           439136 kB
> Inactive:         436368 kB
> Active(anon):     175820 kB
> Inactive(anon):    21644 kB
> Active(file):     263316 kB
> Inactive(file):   414724 kB
17c17
< Dirty:               136 kB
---
> Dirty:                32 kB
19,24c19,24
< AnonPages:        168308 kB
< Mapped:           242076 kB
< Shmem:             29180 kB
< Slab:             100800 kB
< SReclaimable:      44168 kB
< SUnreclaim:        56632 kB
---
> AnonPages:        168368 kB
> Mapped:           241944 kB
> Shmem:             29148 kB
> Slab:             100860 kB
> SReclaimable:      44208 kB
> SUnreclaim:        56652 kB
26c26
< PageTables:         5868 kB
---
> PageTables:         5900 kB
31c31
< Committed_AS:    1269804 kB
---
> Committed_AS:    1264784 kB

Offline

#4 2018-11-23 22:12:31

jamespharvey20
Member
Registered: 2015-06-09
Posts: 75

Re: [SOLVED]Kernel 4.19.2, memory problem

Not understanding your last post, as to how it answers loqs' question.  He's looking for specifically which line grows out of control.

"426M to 433M".  I'm guessing "426M" refers to "< Active: 425704 kB", but I don't know what "433M" refers to because "> Active: 439136 kB" unless it's a typo and should have been 439M.

But, regardless, what loqs is looking for is which of those increases 1M every 10 seconds.  Showing us a diff of a single change or whatever it is doesn't tell us which value gets huge over time.  Too much noise.  So, try comparing usage after a much longer period of time.  I'm not saying to wait this long, but what I'm meaning is if you compared a fresh boot to as the system approaches being full and eventually crashing, one line (not active, but one saying what's using it - like Mapped, Slab, etc.) is going to get huge.  Compare usage for as long as it takes for one value to grow out of control so much that you know it's where the memory is going.

Offline

#5 2018-11-24 07:29:33

wioo
Member
Registered: 2017-05-18
Posts: 14

Re: [SOLVED]Kernel 4.19.2, memory problem

You are right about time. I'll wait for memory to get close to 100 percent. 
Btw, those values are not typo, they are values reported by htop (which includes buffers/cache...) when I read meminfo.

Offline

#6 2018-11-24 08:25:30

seth
Member
Registered: 2012-09-03
Posts: 8,906

Re: [SOLVED]Kernel 4.19.2, memory problem

On a brief look, MemFree/MemAvailable drop roughly by 7MB, but there's no explanation in the tracked memory (active/inactive swaps, but near equal sum, commits actually dropped 4.9MB)

Smells like the kernel (or a module) leaks, see https://bbs.archlinux.org/viewtopic.php?id=240381 - rtlwifi apparently was just fixed 5 days ago…

Offline

#7 2018-11-24 08:37:40

wioo
Member
Registered: 2017-05-18
Posts: 14

Re: [SOLVED]Kernel 4.19.2, memory problem

Yup, rtlwifi causes memory leak. I just installed driver from master git branch.
Thanks seth.

Last edited by wioo (2018-11-24 08:38:59)

Offline

#8 2018-11-30 07:43:03

gofree
Member
From: Slovakia
Registered: 2008-07-26
Posts: 49

Re: [SOLVED]Kernel 4.19.2, memory problem

I've seen this bug also in kernel 4.9.15. Is there any easy way how to mitigate - did you install the rtlwifi_new-extended-dkms ? Currently running on LTS which seems fine.

Offline

#9 2018-11-30 19:54:18

wioo
Member
Registered: 2017-05-18
Posts: 14

Re: [SOLVED]Kernel 4.19.2, memory problem

gofree wrote:

I've seen this bug also in kernel 4.9.15. Is there any easy way how to mitigate - did you install the rtlwifi_new-extended-dkms ? Currently running on LTS which seems fine.

I used https://github.com/lwfinger/rtlwifi_new  (master branch)

Pretty straightforward

git clone https://github.com/lwfinger/rtlwifi_new.git
cd rtlwifi_new
make
sudo make install
sudo modprobe -r <<YOUR WIRELESS DRIVER CODE>>
sudo modprobe <<YOUR WIRELESS DRIVER CODE>>

Offline

Board footer

Powered by FluxBB