Bug 24375 - M7 Plasma memory leak when using oxygen theme with some intel video cards leading to oom.
Summary: M7 Plasma memory leak when using oxygen theme with some intel video cards lea...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: KDE maintainers
QA Contact:
URL:
Whiteboard:
Keywords: 7beta2
Depends on:
Blocks:
 
Reported: 2019-02-16 22:04 CET by William Kenney
Modified: 2019-03-05 19:14 CET (History)
5 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments
Reboot High Memory usage (4.39 KB, text/plain)
2019-02-17 20:44 CET, William Kenney
Details
htop_before_1 (247.33 KB, image/png)
2019-02-19 22:36 CET, William Kenney
Details
htop_before_2 (238.96 KB, image/png)
2019-02-19 22:37 CET, William Kenney
Details
htop_before_3 (239.37 KB, image/png)
2019-02-19 22:37 CET, William Kenney
Details
htop_before_4 (261.82 KB, image/png)
2019-02-19 22:38 CET, William Kenney
Details
htop_before_5 (200.25 KB, image/png)
2019-02-19 22:38 CET, William Kenney
Details
journalctl_before_1 (86.83 KB, text/plain)
2019-02-19 22:39 CET, William Kenney
Details
sysmon_before_1 (106.66 KB, image/png)
2019-02-19 22:39 CET, William Kenney
Details
htop_after_1 (166.08 KB, image/png)
2019-02-19 22:40 CET, William Kenney
Details
htop_after_2 (198.07 KB, image/png)
2019-02-19 22:40 CET, William Kenney
Details
htop_after_3 (183.76 KB, image/png)
2019-02-19 22:41 CET, William Kenney
Details
htop_after_4 (194.68 KB, image/png)
2019-02-19 22:41 CET, William Kenney
Details
journalctl_after_1 (104.47 KB, text/plain)
2019-02-19 22:42 CET, William Kenney
Details
sysmon_after_1 (88.81 KB, image/png)
2019-02-19 22:42 CET, William Kenney
Details
journalctl after reboot (77.14 KB, text/plain)
2019-02-19 23:05 CET, William Kenney
Details

Description William Kenney 2019-02-16 22:04:34 CET
Description of problem:

Very preliminary testing here tells me that using applications that are
CPU and thread intensive are making M7 hog all of available memory and
swap memory. Applications such as HandBrake and ffmpeg when working one
file into another format consume a lot of CPU(s) and while doing so
M7 eats through all of the available memory and then max's out swap
memory.

I am in the early stages of defining this process. The easiest way to
see this is to use KSysGuard or Htop. Stopping the application
does not free up the memory. Exiting the user space does not free up
the memory. The only way to free up memory is to reboot the system.

So far I have only experienced this on an Intel platform.

More testing is needed.
Comment 1 Marja Van Waes 2019-02-17 09:29:33 CET
Please reproduce the issue and then try to run, as root:
  journalctl -ab > log.txt

and attach log.txt to this report

If that is impossible, then please reboot after reproducing the issue and run (before running any intensive app.), as root:

  journalclt -ab -1 > log.txt

to fetch the logs from when this happened.

CC: (none) => isobuild, marja11
Keywords: (none) => 7beta2, NEEDINFO

Comment 2 William Kenney 2019-02-17 11:54:15 CET
(In reply to Marja Van Waes from comment #1)

> Please reproduce the issue and then try to run, as root:
>   journalctl -ab > log.txt

Thanks. Will do.
Something going on here and I can't quite put my finger on it
Comment 3 Martin Whitaker 2019-02-17 12:33:12 CET
I believe HandBrake and ffmpeg are using the same underlying codec libraries. Are you seeing this problem with any other applications?

CC: (none) => mageia

Comment 4 William Kenney 2019-02-17 15:27:11 CET
I don't think this is specifically related to HandBrake or ffmpeg. For some reason during initial set up or intensive usage DRAM and SWAP memory spike to full usage and stay there. I mentioned at the QA meeting that during initial M7 set up the HD usage was fully saturated and didn't settle down for many minutes. I believe during this time DRAM and SWAP are saturated. I've never seen this in any previous version of Mageia/Mandrake/Mandriva. David mentioned this was due to Akonadi working ( too hard? ). Maybe working overtime.

In the next days I'll try to find a repeatable process to demonstrate this. After awhile it does settle down and go away. But I think comes back.

Thanks for your interest and help.
Comment 5 William Kenney 2019-02-17 20:04:12 CET
On real hardware, M7, Plasma, 64-bit

Hardware:

Intel Core i5-4460 Haswell Quad-Core 3.2GHz LGA 115
Gigabyte GA-B85M-D3H LGA 1150 Intel B85 chipset
Integrated Graphics Processor - Intel HD Graphics support
Audito chipset - Realtek ALC892, 7.1 channels
Corsair Vengeance 8GB ( 2 x 4GB ) 240-pin DDR3 SDRAM 1600

System install is just fine. Using the following command in a terminal:

[wilcal@localhost ~]$ free -m -s 2

Every 2-seconds I get readout of the status of DRAM and SWAP

Reports are as follows:

              total        used        free      shared  buff/cache   available
Mem:           7796        7260         238          70         297         236
Swap:          4093        1708        2384

              total        used        free      shared  buff/cache   available
Mem:           7796        7260         238          70         297         236
Swap:          4093        1708        2384

              total        used        free      shared  buff/cache   available
Mem:           7796        7260         233          70         302         235
Swap:          4093        1708        2384

              total        used        free      shared  buff/cache   available
Mem:           7796        7260         232          70         303         235
Swap:          4093        1708        2384

Applications and launches are sluggish as both DRAM and SWap are max'd out.
Hard drive is running continuously.

KSysGuard indicates that both DRAM and Swap are max'd out

Run the following commands in an su terminal:

sync; echo 1 > /proc/sys/vm/drop_caches
sync; echo 2 > /proc/sys/vm/drop_caches
sync; echo 3 > /proc/sys/vm/drop_caches

Then back to:

[wilcal@localhost ~]$ free -m -s 2

results in the following:

              total        used        free      shared  buff/cache   available
Mem:           7796         338        7153          83         305        7145
Swap:          4093         397        3695

              total        used        free      shared  buff/cache   available
Mem:           7796         339        7123          69         333        7157
Swap:          4093         397        3695

              total        used        free      shared  buff/cache   available
Mem:           7796         341        6986          69         469        7156
Swap:          4093         397        3695

Applications and launches are peppy and quick.
KSysGuard indicates minimal DRAM and Swap memory usage.
Comment 6 William Kenney 2019-02-17 20:22:23 CET
Clear PageCache only:
sync; echo 1 > /proc/sys/vm/drop_caches

Clear dentries and inodes:
sync; echo 2 > /proc/sys/vm/drop_caches

Clear PageCache, dentries and inodes:
sync; echo 3 > /proc/sys/vm/drop_caches
Comment 7 Martin Whitaker 2019-02-17 20:35:27 CET
When in the high memory use state, what is the output of

ps agux --sort -rss | head -30
Comment 8 William Kenney 2019-02-17 20:44:04 CET
Created attachment 10754 [details]
Reboot High Memory usage
Comment 9 William Kenney 2019-02-17 20:44:46 CET
I'm running out of time here today but will get back at it again tomorrow.

Thanks for the help
Comment 10 William Kenney 2019-02-17 20:45:21 CET
(In reply to Martin Whitaker from comment #7)

> When in the high memory use state, what is the output of
> 
> ps agux --sort -rss | head -30

Result attached.
Comment 11 Dave Hodgins 2019-02-18 23:44:16 CET
The firefox usage is going to be controlled by what pages are loaded.

On my m7 vb x86_64 guest fully updates, running plasma with firefox loading
it's default two tabs ...
$ free -m
              total        used        free      shared  buff/cache   available
Mem:           3944         769        2470         130         704        2829
Swap:          4093           0        4093

Try closing firefox, then the echo to the drop_caches files.

CC: (none) => davidwhodgins

Comment 12 William Kenney 2019-02-19 01:43:02 CET
Today I executed a new install to a blank drive using:

Mageia-7-beta2-x86_64.iso  2/15/19  Plasma
md5sum: 4c9df0b5ce8c58585cc85d74566f0a59

Install was clean, boots to a working desktop.
DRAM and Swap are quiet and minimal.

As soon as I started to configure the desktop DRAM and Swap
were completely filled and the install became mostly unusable.

For me this is a serious problem and makes M7 not very usable.

Sorry, I gotta push away from my test computer for awhile on this one.

Dave, I never opened Firefox on this test.

Also the:

sync; echo 1 > /proc/sys/vm/drop_caches
sync; echo 2 > /proc/sys/vm/drop_caches
sync; echo 3 > /proc/sys/vm/drop_caches

no longer clears cache. :-(
Comment 13 William Kenney 2019-02-19 02:08:27 CET
A revisit to the test platform.

As defined in Comment 5
Hardware:

Intel Core i5-4460 Haswell Quad-Core 3.2GHz LGA 115
Gigabyte GA-B85M-D3H LGA 1150 Intel B85 chipset
Integrated Graphics Processor - Intel HD Graphics support
Audito chipset - Realtek ALC892, 7.1 channels
Corsair Vengeance 8GB ( 2 x 4GB ) 240-pin DDR3 SDRAM 1600

The platform features a removable replaceable HD system.
Turn off the computer, unlock HD tray with Drive A and remove it
Slide in another HD tray lets call it Drive B.
Lock drive in place.
Power up test platform with Drive B
run test

I have about a dozen drives in trays some of the SSD's

One contains an M6.1 up-to-date Plasma x86_64 install
and has been working very nicely thank you with no
problems at all. But it is running a Legacy boot
where as all of my testing with M7 is UEFI. So I
have to change the BIOS setting between tests.
I don't think that would effect this testing.
I have a UEFI M6.1 x86_64 Plasma install on
one of my HD trays and it works just fine on
this platform.
Comment 14 William Kenney 2019-02-19 02:17:57 CET
Sorry to belabor this but since an M7 update a couple days ago
I am starting to get sporadic error messages on screen indicating
that the "filesystem is not responding". Of course DRAM and Swap
are maxed out and the HD is running at 1000mph.
Comment 15 Dave Hodgins 2019-02-19 14:30:11 CET
Install htop. Run it as root with "htop -d 100" (the -d 100 sets it's update
freq to 10 seconds, so there's time to copy/paste).

Press the letter K (note uppercase) to toggle showing kernel threads. Press f6
and select M_RESIDENT to sort by the RES field. Wait for the next update, then
copy/paste the output.

I find this easier than getting ps to show which process is grabbing all of
the ram.
Comment 16 William Kenney 2019-02-19 20:00:27 CET
(In reply to Dave Hodgins from comment #15)

> Install htop. Run it as root with "htop -d 100" (the -d 100 sets it's update
> freq to 10 seconds, so there's time to copy/paste).
> 
> Press the letter K (note uppercase) to toggle showing kernel threads. Press
> f6
> and select M_RESIDENT to sort by the RES field. Wait for the next update,
> then
> copy/paste the output.
> 
> I find this easier than getting ps to show which process is grabbing all of
> the ram.

Thanks Dave, working on it today.
Comment 17 William Kenney 2019-02-19 22:36:36 CET
Created attachment 10757 [details]
htop_before_1
Comment 18 William Kenney 2019-02-19 22:37:09 CET
Created attachment 10758 [details]
htop_before_2
Comment 19 William Kenney 2019-02-19 22:37:34 CET
Created attachment 10759 [details]
htop_before_3
Comment 20 William Kenney 2019-02-19 22:38:02 CET
Created attachment 10760 [details]
htop_before_4
Comment 21 William Kenney 2019-02-19 22:38:30 CET
Created attachment 10761 [details]
htop_before_5
Comment 22 William Kenney 2019-02-19 22:39:14 CET
Created attachment 10762 [details]
journalctl_before_1
Comment 23 William Kenney 2019-02-19 22:39:39 CET
Created attachment 10763 [details]
sysmon_before_1
Comment 24 William Kenney 2019-02-19 22:40:18 CET
Created attachment 10764 [details]
htop_after_1
Comment 25 William Kenney 2019-02-19 22:40:38 CET
Created attachment 10765 [details]
htop_after_2
Comment 26 William Kenney 2019-02-19 22:41:10 CET
Created attachment 10766 [details]
htop_after_3
Comment 27 William Kenney 2019-02-19 22:41:32 CET
Created attachment 10767 [details]
htop_after_4
Comment 28 William Kenney 2019-02-19 22:42:01 CET
Created attachment 10768 [details]
journalctl_after_1
Comment 29 William Kenney 2019-02-19 22:42:28 CET
Created attachment 10769 [details]
sysmon_after_1
Comment 30 William Kenney 2019-02-19 22:50:50 CET
I started all over again with a blank drive and did a netinstall with
a repo that was up-to-date. The install went smoothly and the DRAM
and Swap were normal and low. I then using the tips from all above
I captured as much of Htop, ps, journalctl and sysmon screenshots that
made sense. Those shots are attached.

I then set up my Plasma desktop my normal way and did a

ctrl-alt-del

out of the user and then logged back in. DRAM and Swap were
maxed out and the usability of the system had degraded. I was
able to capture the same set of screenshots and logs and they
are attached to this bug. The login was just after 13:00 and you can
see that in the after journalctl log. Hopefully there's something
here that will tell us what is going on.

Feel free to ask for any other screenshots or lots and I'll
do my best to capture them.
Comment 31 Martin Whitaker 2019-02-19 22:57:49 CET
Sounds like it's one of the things you change when configuring your desktop that's triggering this bug. If you create a new user, then do your configuration in small steps, logging out and back in again at each step, that ought to pin down which change is responsible.
Comment 32 William Kenney 2019-02-19 23:05:46 CET
Created attachment 10770 [details]
journalctl after reboot

I rebooted the system then captured the journalctl log from the
time that the reboot started ( 11:51 ). When the system got
back to the working desktop, took some time, DRAM and Swap
were max'd out.
Comment 33 William Kenney 2019-02-19 23:18:10 CET
Well how bout that. Good tip Martin.
I created a 2nd user: test1
Now there are two users on the system wilcal & test1
Without changing anything in test1 its usage of DRAM and Swap are normal.
wilcal remains max'd out when I log back into that.
And I can go back and froth between the two of them and
they remain the same. Wilcal is always maxed out and test1 is normal.
Comment 34 William Kenney 2019-02-19 23:19:04 CET
Done for today.

I'll continue on tomorrow and see if I can narrow it down.
Comment 35 Dave Hodgins 2019-02-20 01:19:18 CET
(In reply to William Kenney from comment #30)
> I started all over again with a blank drive and did a netinstall with
> a repo that was up-to-date. The install went smoothly and the DRAM
> and Swap were normal and low. I then using the tips from all above
> I captured as much of Htop, ps, journalctl and sysmon screenshots that
> made sense. Those shots are attached.
> 
> I then set up my Plasma desktop my normal way and did a
> 
> ctrl-alt-del

Why? That can kill processes leaving config files partially written.

Use logout, then login, not ctrl+alt+del.
Comment 36 William Kenney 2019-02-20 01:38:19 CET
(In reply to Dave Hodgins from comment #35)

> Why? That can kill processes leaving config files partially written.
> 
> Use logout, then login, not ctrl+alt+del.

Yup, it's making me crazy.

Back at it for awhile tomorrow.
Comment 37 William Kenney 2019-02-20 19:25:45 CET
Wow, what a find

Menu bar -> System Settings -> Workspace Theme -> there are four selections
Breeze, Breeze Dark, Oxygen and Mageia
Select Breeze, Breeze Dark or Mageia and I'm fine.
Select Oxygen and that's fine till you get out of the
user space. When you come back in DRAM and Swap
are max'd out. When your max'd out if you select
and apply another Workspace Theme DRAM and Swap almost
immediately return to normal. I can repeat this at will.

So I'm gonna rest for a day and try it again tomorrow to make sure
this is what's going on. I'm pretty sure the Oxygen Theme has been
the source of this problem and many other wonky Plasma things I've
seen but can't put my finger on.

I bet the the Intel platform and QT thingys are part of this.

Also the "filesystem is not responding" errors are gone.

Thanks again for the tips folks.
Comment 38 Thomas Andrews 2019-02-21 18:09:06 CET
Using the Breeze theme here, in general and for the desktop theme, but using Oxygen White for the cursor theme, and Oxygen for the icon theme.

I'm not seeing the problem, so it would seem that the Oxygen icon and cursor themes are cleared.

CC: (none) => andrewsfarm

Comment 39 William Kenney 2019-02-21 19:09:10 CET
I believe this is platform specific as it does not show up in a Vbox client or one of my other Intel ( nvidia ) platforms. But, the platform it does show up on is an extremely common generic Intel platform chosen just for testing purposes. Gotta talk about this at today's QA meeting.
Comment 40 Marja Van Waes 2019-02-24 11:58:34 CET
(In reply to William Kenney from comment #37)
> Wow, what a find
> 
> Menu bar -> System Settings -> Workspace Theme -> there are four selections
> Breeze, Breeze Dark, Oxygen and Mageia
> Select Breeze, Breeze Dark or Mageia and I'm fine.
> Select Oxygen and that's fine till you get out of the
> user space. When you come back in DRAM and Swap
> are max'd out. When your max'd out if you select
> and apply another Workspace Theme DRAM and Swap almost
> immediately return to normal. I can repeat this at will.
> 

So assigning to the KDE maintainers.

Summary: M7 is hogging all of available memory and swap and won't let it go => M7 is hogging all of available memory and swap when using breeze theme and won't let it go
Assignee: bugsquad => kde

Marja Van Waes 2019-02-24 11:59:04 CET

Keywords: NEEDINFO => (none)

Comment 41 William Kenney 2019-02-24 14:10:35 CET
I have placed an entry into: 

https://wiki.mageia.org/en/Mageia_7_Errata

Describing this situation and how to avoid it.
Comment 42 Dave Hodgins 2019-02-24 15:25:32 CET
(In reply to William Kenney from comment #41)
> I have placed an entry into: 
> https://wiki.mageia.org/en/Mageia_7_Errata
> Describing this situation and how to avoid it.

Entry reworded.
Dave Hodgins 2019-02-24 15:36:22 CET

Summary: M7 is hogging all of available memory and swap when using breeze theme and won't let it go => M7 Plasma memory leak when using oxygen theme with some intel video cards leading to oom.

Comment 43 William Kenney 2019-03-05 19:14:47 CET
Lets change this to "Resolved" for now.

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.