Bug 156178 - Slides with videos leak memory (Linux-only)
Summary: Slides with videos leak memory (Linux-only)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.3.7.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Memory
  Show dependency treegraph
 
Reported: 2023-07-06 11:19 UTC by aquafilt
Modified: 2024-08-19 14:01 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
An odp file that we tried the bug with (55 bytes, text/plain)
2023-07-06 11:23 UTC, aquafilt
Details
Presentation File (2.61 MB, application/vnd.oasis.opendocument.presentation)
2024-08-19 13:01 UTC, acerzw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aquafilt 2023-07-06 11:19:07 UTC
Description:
LibreOffice crashes after 2 hours of playing slides constantly. This issue can be recreated if you change slides quickly. The presentation uses 5 videos(largest: 920,1 MB , smallest: 14,3 MB). If you try to recreate this bug, it will fill up your RAM and even the Swap too.

Steps to Reproduce:
1.Open the attached file in LibreOffice Impress
2.Open an htop as well to monitor the memory usage
3.Change slide as quick as you can for 5 minutes
(If you just let it play its slides it will automatically crash after a few hours)

Actual Results:
LibreOffice Impress crashed without auto-saving.

Expected Results:
Erase its space from the RAM after a while.


Reproducible: Always


User Profile Reset: No

Additional Info:
The file that is needed to the test, can be downloaded from here: 

https://iroda.aqua-filt.hu/index.php/s/e6oDCfanq6kc7rz?

password: BugReport1@

The folder will destroy itself after two weeks (today is 07.06.2023)
Comment 1 aquafilt 2023-07-06 11:23:36 UTC
Created attachment 188232 [details]
An odp file that we tried the bug with

The file that is needed to be able to recreate the issue is too big for the default max size attachment.

Here is a shared folder where you can download the file

The password to the folder is: BugReport1@

https://iroda.aqua-filt.hu/index.php/s/e6oDCfanq6kc7rz?


The folder will destroy itself after two weeks (Today is 07.06.2023)
Comment 2 Julien Nabet 2023-07-07 09:22:01 UTC
What Linux distrib and which version do you use?
Indeed, LO 7.3 is EOL. Please give a try to LO 7.5.4
Comment 3 aquafilt 2023-07-11 05:59:32 UTC
(In reply to Julien Nabet from comment #2)
> What Linux distrib and which version do you use?
> Indeed, LO 7.3 is EOL. Please give a try to LO 7.5.4


I use Linux Mint 21.1, and I gave a try to LO 7.5.4.2 after you mentioned it to do, the problem is still unsolved and the memory just fills up with its data after a while. 54 minutes after the start it consumes 7.13 GB Ram out of 7.64 GB. So it uses the swap instead and it hold up 2.2GB of that also. Any other recommendations?
Comment 4 Julien Nabet 2023-07-11 11:13:25 UTC
Nope, no other recommendation.
I'm away from my main machine for 1 week but I'll give it a try with Valgrind (a tool which may allow to find mem leaks).
Comment 5 Telesto 2023-07-11 11:48:24 UTC
Slightly off-topic (but related to embedded video's)
Scrolling/resizing the the slide panel on a Windows machine is slow (CPU spikes + lag) and generally memory hogging. Slide-panel uses around 1,6-1,8 GB RAM and lags when scrolling across the embedded video's 

Everything is smooth after deleting the embedded video's. Catching is apparently not working for video content. So instead of catching the (first frame) it keeps extracting it from the video stream each time scroll across it (at least that would be my explanation)

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 30ee52e6c284be1095fdf278439b4c0a7c5982f0
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded
Comment 6 aquafilt 2023-07-12 08:53:42 UTC
(In reply to Telesto from comment #5)
> Slightly off-topic (but related to embedded video's)
> Scrolling/resizing the the slide panel on a Windows machine is slow (CPU
> spikes + lag) and generally memory hogging. Slide-panel uses around 1,6-1,8
> GB RAM and lags when scrolling across the embedded video's 
> 
> Everything is smooth after deleting the embedded video's. Catching is
> apparently not working for video content. So instead of catching the (first
> frame) it keeps extracting it from the video stream each time scroll across
> it (at least that would be my explanation)
> 
> Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
> Build ID: 30ee52e6c284be1095fdf278439b4c0a7c5982f0
> CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
> Locale: nl-NL (nl_NL); UI: en-US
> Calc: CL threaded

top - 09:21:36 up  2:16,  2 users,  load average: 0,80, 0,88, 0,95
Tasks: 196 total,   1 running, 195 sleeping,   0 stopped,   0 zombie
%Cpu(s): 10,4 us,  2,3 sy,  0,0 ni, 85,8 id,  1,5 wa,  0,0 hi,  0,0 si,  0,0 st
MiB Mem :   7821,6 total,    376,3 free,   2688,8 used,   4756,4 buff/cache
MiB Swap:  81920,0 total,  68393,5 free,  13526,5 used.    573,5 avail Mem 


    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                                                
   1385 adminis+  20   0   16,7g   2,8g 811044 S  20,9  37,2  20:43.93 soffice.bin                                                                                                                                                            
    870 root      20   0  862908  66276  51992 S  22,9   0,8  17:28.87 Xorg                                                                                                                                                                   
   1400 adminis+  20   0  664952  17048   8740 S   0,0   0,2   0:00.31 mintUpdate                                                                                                                                                             
    364 root      19  -1   88556  10656  10152 S   0,0   0,1   0:00.35 systemd-journal                                                                                                                                                        
   7880 root      20   0   19128  10396   8036 S   0,0   0,1   0:00.08 sshd                                                                                                                                                                   
   1217 adminis+  20   0  466656   9252   6948 S   0,0   0,1   0:00.12 panel-10-xapp-s                                                                                                                                                        
   1202 adminis+  20   0  458568   8696   6324 S   0,0   0,1   0:00.41 xfce4-panel                                                                                                                                                            
    909 adminis+   9 -11  904136   8528   5432 S   0,0   0,1   0:14.23 pulseaudio                                                                                                                                                             
   1221 adminis+  20   0  657324   7764   4984 S   0,0   0,1   0:08.91 panel-12-pulsea                                                                                                                                                        
   7934 adminis+  20   0   19260   7636   5048 S   0,3   0,1   0:00.31 sshd                                                                                                                                                                   
   1181 adminis+  20   0  637224   7220   6616 S   1,7   0,1   1:18.28 xfwm4                                                                                                                                                                  
    910 adminis+  20   0  525064   6196   5452 S   0,0   0,1   0:00.34 xfce4-session                                                                                                                                                          
   3033 root      20   0  436244   6100   2224 S   0,0   0,1   0:01.08 fwupd                                                                                                                                                                  
   1247 adminis+  20   0  466468   6076   4264 S   0,0   0,1   0:00.09 xfce4-notifyd                                                                                                                                                          
      1 root      20   0  166300   6028   3744 S   0,0   0,1   0:00.66 systemd                                                                                                                                                                
   1269 adminis+  20   0  476364   5696   4616 S   0,0   0,1   0:00.09 nm-applet                                                                                                                                                              
    816 root      20   0  283808   5572   4624 S   0,0   0,1   0:00.98 anydesk                                                                                                                                                                
   1220 adminis+  20   0  467056   5468   4208 S   0,0   0,1   0:00.08 panel-11-power-                                                                                                                                                        
   1216 adminis+  20   0  327748   5196   4156 S   0,0   0,1   0:00.07 panel-9-notific                                                                                                                                                        
   1214 adminis+  20   0  403088   5112   4364 S   0,0   0,1   0:00.46 panel-1-whisker                                                                                                                                                        
    732 root      20   0  237236   5092   2940 S   0,0   0,1   0:00.14 polkitd                                                                                                                                                                
   7935 adminis+  20   0   13928   4820   3348 S   0,0   0,1   0:00.02 bash                                                                                                                                                                   
    719 root      20   0  337760   4784   3508 S   0,3   0,1   0:02.10 NetworkManager                                                                                                                                                         
   1215 adminis+  20   0  378180   4636   4052 S   0,0   0,1   0:00.05 panel-8-systray                                                                                                                                                        
   1191 adminis+  20   0  232044   4340   3792 S   0,0   0,1   0:00.10 xfsettingsd                                                                                                                                                            
   1211 adminis+  20   0  401104   4200   3908 S   0,0   0,1   0:00.39 xfdesktop                                                                                                                                                              
   1281 adminis+  20   0  227168   4188   3700 S   0,0   0,1   0:00.22 xfce4-power-man                                                                                                                                                        
   1461 adminis+  20   0  375988   4132   3112 S   0,0   0,1   0:00.03 xdg-desktop-por                                                                                                                                                        
<b>   8089 adminis+  20   0   16124   4132   3268 R   0,3   0,1   0:00.07 top                                                                                                                                                                    </b>
   1206 adminis+  20   0  379132   4060   3944 S   0,0   0,1   0:00.05 Thunar                                                                                                                                                                 
   1282 adminis+  20   0  226232   4016   3612 S   0,0   0,1   0:00.02 polkit-gnome-au                                                                                                                                                        
    754 root      20   0  392856   3604   2280 S   0,0   0,0   0:00.96 udisksd                                                                                                                                                                
    711 root      20   0  243128   3464   2656 S   0,0   0,0   0:00.27 accounts-daemon                                                                                                                                                        
    730 root      20   0   43976   3280   2200 S   0,0   0,0   0:00.06 networkd-dispat                                                                                                                                                        
   1444 adminis+  20   0  405604   3160   2568 S   0,0   0,0   0:00.21 xdg-desktop-por                                                                                                                                                        
   1299 adminis+  20   0  449772   3096   2852 S   0,0   0,0   0:00.13 xfce4-volumed                                                                                                                                                          
   1297 colord    20   0  248368   3044   2140 S   0,0   0,0   0:00.10 colord                                                                                                                                                                 
    735 root      20   0   48224   2964   2424 S   0,0   0,0   0:00.07 systemd-logind                                                                                                                                                         
   1489 root      20   0  173380   2952   2412 S   0,0   0,0   0:00.06 cups-browsed                                                                                                                                                           
    827 root      20   0  306740   2924   2316 S   0,0   0,0   0:00.01 lightdm                                                                                                                                                                
    806 root      20   0   76028   2692   2248 S   0,0   0,0   0:00.03 cupsd                                                                                                                                                                  
   2678 adminis+  20   0  156964   2436   2040 S   0,0   0,0   0:00.00 dconf-service                                                                                                                                                          
    658 systemd+  20   0   25660   2424   1868 S   0,0   0,0   0:00.19 systemd-resolve                                                                                                                                                        
    718 message+  20   0    9888   2408   1196 S   0,0   0,0   0:00.27 dbus-daemon                                                                                                                                                            
   1347 adminis+  20   0  318924   2400   1616 S   0,0   0,0   0:00.04 gvfs-udisks2-vo                                                                                                                                                        
    839 root      20   0   15420   2396   2204 S   0,0   0,0   0:00.00 sshd                                                                                                                                                                   
   1283 adminis+  20   0  848900   2352   2352 S   0,0   0,0   0:00.03 xiccd                                                                                                                                                                  
   1448 adminis+  20   0  466056   2348   1972 S   0,0   0,0   0:00.18 xdg-document-po                                                                                                                                                        
    824 root      20   0  244224   2328   1880 S   0,0   0,0   0:00.04 ModemManager                                                                                                                                                           
    928 adminis+  20   0    8908   2284   1552 S   0,0   0,0   0:02.60 dbus-daemon 


I attached the output of the top command while LibreOffice 7.5 was running through slides.
The only video player app on the pc is the mpv with these details:

mpv 0.34.1 Copyright © 2000-2021 mpv/MPlayer/mplayer2 projects
 built on UNKNOWN
FFmpeg library versions:
   libavutil       56.70.100
   libavcodec      58.134.100
   libavformat     58.76.100
   libswscale      5.9.100
   libavfilter     7.110.100
   libswresample   3.9.100
FFmpeg version: 4.4.2-0ubuntu0.22.04.1
Comment 7 Buovjaga 2023-09-04 16:23:55 UTC
The linked file is now gone.

I tried with two small videos and changed back and forth quickly in a slideshow. It seems I was able to increase the memory use consistently. I could not reproduce this on Windows.

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: cc7d6211bc01e5ec84dbad542605d2e93dea925c
CPU threads: 2; OS: Windows 10.0 Build 22621; UI render: default; VCL: win
Locale: en-US (en_FI); UI: en-US
Calc: threaded

Arch Linux 64-bit, X11
Version: 7.6.0.3 (X86_64) / LibreOffice Community
Build ID: 60(Build:3)
CPU threads: 8; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
7.6.0-2
Calc: threaded
Comment 8 acerzw 2024-08-19 13:01:17 UTC Comment hidden (off-topic)
Comment 9 acerzw 2024-08-19 13:04:58 UTC Comment hidden (off-topic)