You are not logged in.

#26 2018-09-19 09:01:07

coolsidd
Member
Registered: 2018-09-13
Posts: 9

Re: Huge memory leak on linux kernel 4.18

Voila!! After switching to 4.17.11 the output kmemleak is almost empty with only a few initial modprobe entries. Can confirm that no memory leak seems to be occurring after about 1 hour of runtime. I have opened a issue here https://github.com/lwfinger/rtlwifi_new/issues/401
Lets hope that it gets fixed in the upcoming updates.
Meanwhile reverting/ bisecting the kernel seems to be the only solution.
@saga Are you also using the same driver?

Offline

#27 2018-09-19 13:15:00

Xum
Member
Registered: 2017-07-08
Posts: 11

Re: Huge memory leak on linux kernel 4.18

I also have the same issue and also have the rtl8723be. Well done finding this!

Offline

#28 2018-09-29 05:41:52

saga
Member
Registered: 2016-10-25
Posts: 14

Re: Huge memory leak on linux kernel 4.18

So what's the update on this bug?

Offline

#29 2018-10-05 16:58:07

chicomag
Member
Registered: 2018-03-14
Posts: 2

Re: Huge memory leak on linux kernel 4.18

I'm having this isso too, and it's still present on Linux 4.18.12. It's happening since the update to the 4.18.x versions, and it doesn't happen with 4.14 LTS.

Offline

#30 2018-10-07 02:11:46

chicomag
Member
Registered: 2018-03-14
Posts: 2

Re: Huge memory leak on linux kernel 4.18

It's exactly the same for me, when I unload the rtl8723be module the problem doesn't happen, when I load it again and wait some time it happens again.

Offline

#31 2018-10-07 06:55:02

seth
Member
Registered: 2012-09-03
Posts: 10,329

Re: Huge memory leak on linux kernel 4.18

Please stop empty posting. ("metoo")

The upstream bug suggests that the leak might occur in some other (related) module, eg. mac80211
The crosstest they're asking for would be to run your network on a different device (sidestepping the module) and see whether the kernel still leaks.
So if you can use an interface that does not rely on rtl8723be , do so and check the memory development. Report back to the upstream bug.

Offline

#32 2018-10-13 14:35:31

swiftgeek
Member
Registered: 2011-04-19
Posts: 31

Re: Huge memory leak on linux kernel 4.18

Adding `lspci` for reference, I need to find time to compile kernel with support for kmemleak. 3.7GiB leak after 9 days (4.18.10)

00:00.0 Host bridge [0600]: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub [8086:2a40] (rev 07)
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller [8086:2a42] (rev 07)
00:02.1 Display controller [0380]: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller [8086:2a43] (rev 07)
00:19.0 Ethernet controller [0200]: Intel Corporation 82567LM Gigabit Network Connection [8086:10f5] (rev 03)
00:1a.0 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 [8086:2937] (rev 03)
00:1a.1 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 [8086:2938] (rev 03)
00:1a.2 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 [8086:2939] (rev 03)
00:1a.7 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 [8086:293c] (rev 03)
00:1b.0 Audio device [0403]: Intel Corporation 82801I (ICH9 Family) HD Audio Controller [8086:293e] (rev 03)
00:1c.0 PCI bridge [0604]: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 [8086:2940] (rev 03)
00:1c.1 PCI bridge [0604]: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 [8086:2942] (rev 03)
00:1c.2 PCI bridge [0604]: Intel Corporation 82801I (ICH9 Family) PCI Express Port 3 [8086:2944] (rev 03)
00:1c.3 PCI bridge [0604]: Intel Corporation 82801I (ICH9 Family) PCI Express Port 4 [8086:2946] (rev 03)
00:1d.0 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 [8086:2934] (rev 03)
00:1d.1 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 [8086:2935] (rev 03)
00:1d.2 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 [8086:2936] (rev 03)
00:1d.7 USB controller [0c03]: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 [8086:293a] (rev 03)
00:1e.0 PCI bridge [0604]: Intel Corporation 82801 Mobile PCI Bridge [8086:2448] (rev 93)
00:1f.0 ISA bridge [0601]: Intel Corporation ICH9M-E LPC Interface Controller [8086:2917] (rev 03)
00:1f.2 SATA controller [0106]: Intel Corporation 82801IBM/IEM (ICH9M/ICH9M-E) 4 port SATA Controller [AHCI mode] [8086:2929] (rev 03)
00:1f.3 SMBus [0c05]: Intel Corporation 82801I (ICH9 Family) SMBus Controller [8086:2930] (rev 03)
02:00.0 Network controller [0280]: Qualcomm Atheros AR93xx Wireless Network Adapter [168c:0030] (rev 01)

EDIT: Seems to be fixed in 4.19.0 and still leaky (at same rate) in 4.18.16

Last edited by swiftgeek (2018-10-31 14:26:52)

Offline

#33 2019-01-31 05:46:52

saga
Member
Registered: 2016-10-25
Posts: 14

Re: Huge memory leak on linux kernel 4.18

Can anyone verify if this problem is still present in the latest 4.20.5 kernel. It would save us some time with compiling and installing modules.

Offline

#34 2019-02-25 17:58:37

gcr
Member
Registered: 2019-02-25
Posts: 14

Re: Huge memory leak on linux kernel 4.18

saga wrote:

Can anyone verify if this problem is still present in the latest 4.20.5 kernel. It would save us some time with compiling and installing modules.

I have a problem with memory leak. I have Dell laptop, with vanilla Arch and Xfce. During night it takes all 8Gb of RAM.
I tried LTS kernel (4.19.25-1), ZEN (4.20.12.zen1-1) and vanilla Arch (4.20.12.arch1-1). Without apps, just in TTY it leaks, I can see it in top, how memory usage increase every few seconds at ~0.5Mbytes.
Do You need some logs?

Last edited by gcr (2019-02-25 18:02:25)

Offline

#35 2019-02-25 18:14:47

loqs
Member
Registered: 2014-03-06
Posts: 7,264

Re: Huge memory leak on linux kernel 4.18

@gcr is your system using the rtl8723be module?

Offline

#36 2019-02-25 18:20:54

gcr
Member
Registered: 2019-02-25
Posts: 14

Re: Huge memory leak on linux kernel 4.18

@loqs as I see, no.

grep rtl is in bottom
https://pastebin.com/uC6Zi9MP

Offline

#37 2019-02-25 18:30:27

seth
Member
Registered: 2012-09-03
Posts: 10,329

Re: Huge memory leak on linux kernel 4.18

Did you confirm it doesn't leak in userspace (ie. w/ a process)?
If so, what if you unload ath9k (and mac80211)?

Offline

#38 2019-02-25 18:33:06

gcr
Member
Registered: 2019-02-25
Posts: 14

Re: Huge memory leak on linux kernel 4.18

seth wrote:

Did you confirm it doesn't leak in userspace (ie. w/ a process)?
If so, what if you unload ath9k (and mac80211)?

about userspace I can say that I looked in TTY, with killed lightdm without logging in sytem, under root, my user, new test user

Ok, I'll unload ath9k

Offline

#39 2019-02-25 18:38:52

seth
Member
Registered: 2012-09-03
Posts: 10,329

Re: Huge memory leak on linux kernel 4.18

Some process would creep up in "top" (sorted by memory, "SHIFT+m") if it was a userspace leak. The mere fact that there's no display server unfortunately doesn't say anyting itr.

Offline

#40 2019-02-25 19:00:39

gcr
Member
Registered: 2019-02-25
Posts: 14

Re: Huge memory leak on linux kernel 4.18

After half hour it increased from 1120 to 1260 Mbytes and I didn't used laptop. And else, after I closed all apps, RAM usage didn't decreased. This 1,2GB it's just with Xfce and Xfce-terminal

In top with shift+m first one is Xorg.

PID USER      PR  NI    VIRT    RES           SHR  S  %CPU  %MEM     TIME+       COMMAND
534 root      20   0  302592  49760  33380 S    1.3      0.6           2:49.90    Xorg

ps. But I don't see that Xorg is leaking. Memory usage doesn't changes very much

pps. I left laptop once again to ~40 minutes and it leaked about 200MB

Last edited by gcr (2019-02-25 19:51:36)

Offline

#41 2019-02-25 20:35:02

seth
Member
Registered: 2012-09-03
Posts: 10,329

Re: Huge memory leak on linux kernel 4.18

Is this w/ or w/o the ath/mac80211 modules loaded?
(The Xorg memory footprint is perfectly normal, so this is the kernel)

Offline

#42 2019-02-25 20:36:50

gcr
Member
Registered: 2019-02-25
Posts: 14

Re: Huge memory leak on linux kernel 4.18

It's without ath9k (only)

Offline

#43 2019-03-02 06:56:11

gcr
Member
Registered: 2019-02-25
Posts: 14

Re: Huge memory leak on linux kernel 4.18

Well, after last security update didn't changed anything. I tried without all ath drivers, on all the kernels (lts, arch, zen) and it's still leaking..

Offline

#44 2019-03-02 08:19:43

seth
Member
Registered: 2012-09-03
Posts: 10,329

Re: Huge memory leak on linux kernel 4.18

The next best contender is probably the vbox stuff - also try installing an older lts kernel from https://archive.archlinux.org/ (that's a pretty "save" partial update, the kernel is mostly self-contained) to get below 4.18 again to ensure this is really related to the kernel.

Offline

#45 2019-03-02 11:10:28

gcr
Member
Registered: 2019-02-25
Posts: 14

Re: Huge memory leak on linux kernel 4.18

seth wrote:

The next best contender is probably the vbox stuff - also try installing an older lts kernel from https://archive.archlinux.org/ (that's a pretty "save" partial update, the kernel is mostly self-contained) to get below 4.18 again to ensure this is really related to the kernel.

4.18.16 works perfectly. Just installed and few hours later memory didn't increased at any MB.

Offline

#46 2019-03-02 12:15:42

seth
Member
Registered: 2012-09-03
Posts: 10,329

Re: Huge memory leak on linux kernel 4.18

Rule out the vbox modules, then it's time for a bisect to find the offending patch.

Offline

#47 2019-03-02 12:17:54

gcr
Member
Registered: 2019-02-25
Posts: 14

Re: Huge memory leak on linux kernel 4.18

seth wrote:

Rule out the vbox modules, then it's time for a bisect to find the offending patch.

But right now all modules are loaded. Even with vbox* kennel 4.18.16 works good

Offline

#48 2019-03-02 12:22:58

loqs
Member
Registered: 2014-03-06
Posts: 7,264

Re: Huge memory leak on linux kernel 4.18

Try an early 4.19 linux release see if the issues appears there.  Most likely you should bisect 4.18 to to 4.19 but its best to make sure before starting.

Offline

#49 2019-03-02 12:24:49

gcr
Member
Registered: 2019-02-25
Posts: 14

Re: Huge memory leak on linux kernel 4.18

What is "bisect"?

sorry, non English speaker

Offline

#50 2019-03-02 12:28:41

loqs
Member
Registered: 2014-03-06
Posts: 7,264

Re: Huge memory leak on linux kernel 4.18

Bisecting_bugs_with_Git you would need to build the kernel from source (at least 13 times for 4.18 to 4.19).
Edit:
The later builds are much quicker as the number of files needing to be rebuilt goes down.

Last edited by loqs (2019-03-02 12:30:05)

Offline

Board footer

Powered by FluxBB