! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Tumbler uses 140% CPU and exponentially growing amounts of memory when thunar...
Status:
RESOLVED: MOVED
Product:
Tumbler
Component:
General

Comments

Description Öyvind Saether 2018-10-16 07:41:39 CEST
Using XFCE4 4.13 on Fedora 29 and tumbler-0.2.3 I noticed that all the RAM was eaten when copying a 50 GB mkv video file with thunar. I can reproduce it.
1) thunar open with a window showing a folder
2) copy a really big video file into that folder
3) watch tumbler use 140% CPU and exponential amounts of RAM, grows very quickly into the many gigabytes of memory
not sure what it's doing but it would appear it wants to make a tumbnail of the changing partial file over and over and something goes wrong. No idea what.

I can reproduce this copying files from nfs to a local hdd and also copying files between local hdds. It easier to see the larger the files are, with a 10 GB video file it uses like 80% CPU and grows to something like 1 GB. With a 50 GB file it ate like 9 GB memory. That's enough to make ramlet's machnies have the oom killer kick in. 

This does seem similar to the 2013 bug https://bugzilla.xfce.org/show_bug.cgi?id=9954 
>Tumbler start to get all resources available, including all CPUs (2 cores) and RAM.
that sounds like the same issue except that it is isolated to a USB device and this seems to be a problem on all devices.

Ideally thunar should somehow detect big files that are changing/growing and leave them alone. The eats-all-your-RAM problem is a big one if it makes you run out of memory (I should not be seeing tumbler using 7 GB memory when copying a file regardless, though) but the IO load is also a bad thing since it probably slows down the copy process.

It's also worth mentioning that competing desktop environments have some setting which prevents files over some size from getting thumbnails generated. Not my preferred solution, though.
Comment 1 Ali Abdallah editbugs 2018-10-16 20:19:08 CEST
Thanks for you report.

Do you have a link for a huge video file? So I can download it to test? I have only videos of 4GB max, and I'm bot able to reproduce the problem.
Comment 2 Ali Abdallah editbugs 2018-10-17 08:00:41 CEST
In any case, I will implement a per-mime type max file size+try to avoid files being copied. Will send you in a couple of days a patch for testing.
Comment 3 Öyvind Saether 2018-10-17 14:30:48 CEST
Thank you for implementing a fix.

As for flies to reproduce.. Perhaps bigger files affected in theory could perhaps be BlueRay rips with HEVC vidoe in mkv containers and if that was the case then that could be subject to copyright and not something wise to post publicly. It also perhaps happens with smaller video files that could in theory be kpop shows like M.Countdown and Show.Champion which are 7-10 GB in size and contain h264 video in .ts files, these would also be subject to copyright. 

Generally it would in theory be possible to make a private torrent or something containing files if you can't get any big video files for testing elsewhere.
Comment 4 Öyvind Saether 2018-10-17 14:54:02 CEST
For reproducing, starting tumblerd on my boxes shows:
Registered thumbailer /usr/bin/gnome-mobi-thumbnailer -s %s %u %o
Registered thumbailer evince-thumbnailer -s %s %u %o
Registered thumbailer /usr/bin/raw-thumbnailer -s %s %u %o
Registered thumbailer /usr/bin/gdk-pixbuf-thumbnailer -s %s %u %o
Registered thumbailer /usr/bin/gnome-epub-thumbnailer -s %s %u %o
Registered thumbailer ffmpegthumbnailer -i %i -o %o -s %s -f
Registered thumbailer /usr/bin/gdk-pixbuf-thumbnailer -s %s %u %o
Registered thumbailer gsf-office-thumbnailer -i %i -o %o -s %s

It's very likely ffmpegthumbnailer that's doing thumbnails on my boxes so you likely need that to reproduce it. Not sure how I would test if this affects other filetypes/ thumbailers (where would I find a 10 GB epub book?)
Comment 5 Ali Abdallah editbugs 2018-10-17 17:06:05 CEST
Could you disable FfmpegThumbnailer and DesktopThumbnailer to use Gstreamer plugin only? 

you need to edit /etc/xdg/tumbler/tumbler.rc to change from "Disabled=false" to true for those plugins.
Comment 6 Öyvind Saether 2018-10-19 09:13:52 CEST
Created attachment 8042 
Picture of tumblerd out of control

[FfmpegThumbnailer]
Disabled=true

and 

[DesktopThumbnailer]
Disabled=true

does not appear to make a difference. Made sure to kill tumblerd and it restarted so those settings would be applied and the behavior did not change.
Comment 7 Ali Abdallah editbugs 2018-10-19 15:28:14 CEST
Ok, now please active FfmpegThumbnailer and disable the Gstreamer plugin. 

Let me know your findings.
Comment 8 Öyvind Saether 2018-10-21 20:36:17 CEST
My ffmpegthumbnailer is clearly broken. I have ffmpegthumbnailer-2.2.0-6.fc29.x86_64. Not only does it NOT make thumbnails, when I enter a folder with video files there's briefly thumbnails and then they are cleared away (like it wants to regenerate them but doesn't).

With Gstreamer disabled and FfmpegThumbnailer enabled in tumbler.rc there is no (high or other) CPU or memory usage when copying files. This probably doesn't say much about what would happen if tumbler actually used ffmpegthumbnailer to do something but it doesn't (or something goes wrong).

This is probably it's own bug since I can run it manually like
ffmpegthumbnailer -i NATURE\ \(네이처\)\ -\ Allegro\ Cantabile.mkv -o prettykpopgirls.jpg
and then I get a functional jpg file with cute koreans.
Comment 9 Git Bot editbugs 2020-05-25 23:19:46 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/tumbler/-/issues/18.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #14763

Reported by:
Öyvind Saether
Reported on: 2018-10-16
Last modified on: 2020-05-25

People

Assignee:
Ali Abdallah
CC List:
0 users

Version

Version:
unspecified

Attachments

Picture of tumblerd out of control (193.23 KB, image/png)
2018-10-19 09:13 CEST , Öyvind Saether
no flags

Additional information