Mediascanner crashes and loops on bad media (webm)
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Canonical System Image |
High
|
Alejandro J. Cura | ||
| | mediascanner2 (Ubuntu) |
High
|
James Henstridge | ||
Bug Description
Updated my retail bq E4.5 phone to OTA-7.
Opened Music app and saw no music. Tailed mediascanner log, found it repeatedly scanning my music over and over. This causes high cpu, high IO, increased disk usage through logging and locks the database so Music app is unusable.
The only way I could make Music appear was to issue:-
stop mediascanner-2.0
Then re-open Music.
Attached mediascanner log (all 369M of it)
Related branches
- Jamie Strandboge (community): Approve on 2015-11-09
- Michi Henning (community): Approve on 2015-11-09
- PS Jenkins bot (community): Approve (continuous-integration) on 2015-11-08
- Jussi Pakkanen (community): Needs Fixing on 2014-12-12
-
Diff: 2036 lines (+1153/-239)27 files modifiedCMakeLists.txt (+6/-0)
debian/mediascanner2.0.install (+2/-0)
debian/rules (+1/-0)
debian/usr.bin.mediascanner-service-2.0 (+0/-55)
debian/usr.lib.mediascanner-2.0.mediascanner-extractor (+119/-0)
src/daemon/CMakeLists.txt (+2/-5)
src/daemon/Scanner.cc (+2/-1)
src/daemon/SubtreeWatcher.cc (+2/-1)
src/daemon/scannerdaemon.cc (+4/-5)
src/extractor/CMakeLists.txt (+55/-0)
src/extractor/DetectedFile.hh (+47/-0)
src/extractor/ExtractorBackend.cc (+14/-79)
src/extractor/ExtractorBackend.hh (+47/-0)
src/extractor/MetadataExtractor.cc (+189/-0)
src/extractor/MetadataExtractor.hh (+6/-18)
src/extractor/com.canonical.MediaScanner2.Extractor.service.in (+3/-0)
src/extractor/dbus-interface.xml (+12/-0)
src/extractor/dbus-marshal.cc (+96/-0)
src/extractor/dbus-marshal.hh (+34/-0)
src/extractor/main.cc (+207/-0)
test/CMakeLists.txt (+22/-4)
test/basic.cc (+48/-29)
test/services/com.canonical.MediaScanner2.Extractor.service.in (+3/-0)
test/services/com.canonical.MediaScanner2.service.in (+3/-0)
test/test_extractorbackend.cc (+124/-0)
test/test_metadataextractor.cc (+89/-28)
test/test_qml.cc (+16/-14)
| Changed in mediascanner2 (Ubuntu): | |
| importance: | Undecided → Critical |
| assignee: | nobody → James Henstridge (jamesh) |
| Changed in canonical-devices-system-image: | |
| assignee: | nobody → Alejandro J. Cura (alecu) |
| importance: | Undecided → Critical |
| summary: |
- Mediascanner runs constantly, rescanning repeatedly + Mediascanner crashes and loops on bad media (webm) |
| Alejandro J. Cura (alecu) wrote : | #3 |
I can reproduce this bug by putting this file in my Videos folder: http://
bq krillin, rc-proposed, r153.
| Alejandro J. Cura (alecu) wrote : | #4 |
Since this seems to be happening only with webm videos, I'm lowering the priority of the bug.
| Changed in canonical-devices-system-image: | |
| importance: | Critical → High |
| Changed in mediascanner2 (Ubuntu): | |
| importance: | Critical → High |
| Changed in canonical-devices-system-image: | |
| milestone: | none → ww46-2015 |
| James Henstridge (jamesh) wrote : | #5 |
The best solution for this is probably to finish off the external-
I've updated the branch to get it building with trunk, but there is still a bit of work to do (there may be conflicts with the branches from the pending silo, and maybe some tweaks to the AppArmor profiles). The in-progress code can be found here though:
https:/
| Changed in canonical-devices-system-image: | |
| status: | New → Confirmed |
| Changed in mediascanner2 (Ubuntu): | |
| status: | New → In Progress |
| James Henstridge (jamesh) wrote : | #6 |
I have some in-progress packages in landing silo 55 at the moment. Using Alan's test files, the main scanner daemon no longer crashes (so the startup directory scan isn't repeated), but it looks like there are still a few corner cases to fix up.
| Changed in canonical-devices-system-image: | |
| status: | Confirmed → In Progress |
| Changed in canonical-devices-system-image: | |
| status: | In Progress → Fix Committed |
| Launchpad Janitor (janitor) wrote : | #7 |
This bug was fixed in the package mediascanner2 - 0.108+16.
---------------
mediascanner2 (0.108+
* Move the metadata extractor to a separate process to isolate bugs in
media codecs. (LP: #1508142)
-- James Henstridge <email address hidden> Mon, 09 Nov 2015 01:56:39 +0000
| Changed in mediascanner2 (Ubuntu): | |
| status: | In Progress → Fix Released |
| Josuรฉ (j2g2rp) wrote : | #8 |
is the fix released now? or it will be released with the next OTA?
I'm answering because I'm having the same problem.
In the bug https:/
I checked but it looks like that I haven't any webm files, but the mediascan file is looped.
| Changed in canonical-devices-system-image: | |
| status: | Fix Committed → Fix Released |


Deleted two of the webm videos from my sd card and now it appears to have stopped looping.
Uploaded to here for "analysis":-
http:// people. canonical. com/~alan/ big_buck_ bunny_1080p_ VP8_VORBIS_ 25fps_7800K_ short.WebM people. canonical. com/~alan/ goat-rage. webm
http://