mediascanner-service-2.0 using large amounts of CPU
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | mediascanner2 (Ubuntu) |
High
|
Unassigned | ||
Bug Description
Each time I plug my external USB hard disk the mediascanner-
I have the same problem in utopic and vivid
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: mediascanner2.0 0.105+15.
ProcVersionSign
Uname: Linux 3.16.0-25-generic x86_64
ApportVersion: 2.14.7-0ubuntu10
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Dec 3 00:29:43 2014
InstallationDate: Installed on 2011-05-26 (1286 days ago)
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
SourcePackage: mediascanner2
UpgradeStatus: Upgraded to vivid on 2013-11-26 (371 days ago)
| Nizar Kerkeni (nizarus) wrote : | #1 |
| Changed in mediascanner2 (Ubuntu): | |
| importance: | Undecided → High |
| Jussi Pakkanen (jpakkane) wrote : | #3 |
This should only happen once: the first time you insert the drive. It might happen again if you unplug the disk before scanning is finished. After the first scan the results are cached and further connections should be fast again.
If you wish to prevent Mediascanner from scanning your external drive, place a file called .nomedia in the root dir of your drive and it won't be scanned.
| Nizar Kerkeni (nizarus) wrote : | #4 |
Thanks Jussi for the tip, I confirm that adding .nomedia file prevent the scanning of my external drive.
| Jussi Lind (jussi-lind) wrote : | #5 |
Jussi, on my Bq Aquarius the scanning never stops (without .nomedia). I have about 10 GB of music on the SD card and mediascanner-
| Jussi Lind (jussi-lind) wrote : | #6 |
I think that in my case mediascanner-
| Jussi Lind (jussi-lind) wrote : | #7 |
Attached .crash file.
| Anton Yakutovich (dr-akulavich) wrote : | #8 |
The same bug for me.
Ubuntu 15.04, amd64.
I've installed unity8-
When I plug-in my 500GB usb harddrive, mediascanner-
| Vincent Legoll (vincent-legoll) wrote : | #9 |
Is there a global way to disable that thing other than "apt-get purge" ?
I don't want my CPU to be hogged every time I plug a removable drive.
Please stop blindly abusing our resources without giving us a way to escape from it, pretty please.
What would be acceptable is a (***not hidden away***) config option where one can choose to "always scan", "always ask" or "never scan"...
The same we we can choose to auto-run, auto-launch, auto-open, etc...
| Cédric Bellegarde (gnumdk) wrote : | #10 |
Same here on Meizu MX4, crash loop and so
- apport run every seconds...
- CPU/Battery killer
| Cédric Bellegarde (gnumdk) wrote : | #11 |
Here to files making mediascanner segfault:
https:/
| Cédric Bellegarde (gnumdk) wrote : | #12 |
Extracting metadata from /home/phablet/
(mediascanner-
(mediascanner-
(mediascanner-
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string:
Aborted (core dumped)
| Cédric Bellegarde (gnumdk) wrote : | #13 |
On Ubuntu 15.04 for pc i do not get:
terminate called after throwing an instance of 'std::logic_error'
| Cédric Bellegarde (gnumdk) wrote : | #14 |
Seems because year is -1 in tags
| Cédric Bellegarde (gnumdk) wrote : | #15 |
Fixing tags fix issue
But should be fixed in code
| tags: | added: rls-w-incoming |
| Neil McPhail (njmcphail) wrote : | #16 |
Since pulling in mediascanner2.0 on wily with the ubuntu-sdk package, I have mediascanner-
To put things in perspective, firefox with 15 open tabs is currently consuming 3.3% of CPU.
Something is badly broken here.
Every time I plug in my external 1TB HDD this process consumes up to 101.8%(!) of my CPU and prevents me from doing anything on the computer unless I physically turn off the HDD. I thought that after its first scan data is cached? Instead, the issue appears to be ongoing for me. I'm currently using Ubuntu 14.10 LTS and I haven't purged the package since I use the Ubuntu SDK and apparently the "mediascanner-
| tags: |
added: rls-x-incoming removed: rls-w-incoming |
| James Henstridge (jamesh) wrote : | #18 |
The recent 0.111 release in xenial and the Ubuntu Phone vivid overlay should improve things somewhat:
1. we are using taglib directly for scanning of music files (videos still go through GStreamer).
2. batch index updates during the "initial scan" phase when the daemon starts up or removable media is mounted, resulting in fewer flushes.
While this might not reduce CPU usage much (although it probably will while scanning music), it reduced flushes should make it play better with other IO on the system. It seems a lot less intrusive when I let it rescan my music collection from scratch.
| Vincent Legoll (vincent-legoll) wrote : | #19 |
I was searching for a way to disable this, I hope I have found the right place in configuration settings...
I opened in menus :
Applications
System tools
Preferences
Searching & indexing
I unchecked everything in "semantics"
It looks like there's an option missing in "limits", I would like to choose "never" for "background content indexing", but this option is not provided here...
This is manual translation from my installed lang to english so may not be 100% accurate
| tags: | added: xenial |
| themusicgod1 (themusicgod1) wrote : | #20 |
Upgrading to 16.10 (yakkety) seems to have resolved this(?).


Status changed to 'Confirmed' because the bug affects multiple users.