music in bind mounted directories are not shown in music scope

Bug #1320784 reported by Laszlo Molnar
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Ubuntu Music App
Fix Released
Low
Unassigned
mediascanner
Invalid
Undecided
Unassigned
mediascanner2 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

If there is music in a directory other than ~/Music, and that directory is then mounted with
"mount --bind" to ~/Music/mountedmusic, those songs are not shown in music scope.
It would be important that music app had the priviliges to read these directories too, mainly because the music from the android userdata could also be mounted under ~/Music for the music app. This would be a nice step towards the using Ubuntu Touch dual-boot-installed nexto to android.
Same goes for Video scopes and Gallery app.

EDIT: Symbolic links do not work either.

Changed in music-app:
status: New → Incomplete
Revision history for this message
Victor Thompson (vthompson) wrote :

Hi, thanks for filing this bug. We need more information in order to determine where the problem exists. Could you report which version of the phone you are using, Trusty or Utopic and which version? Additionally, could you see if the music is listed once the device is restarted and the mediascanner has possibly rescanned the new media?

Also, one thing that would be great to include, if you would be able to do so, would be to login to the phone as a phablet user and see if running "mediascanner-service ~/Music" reports any errors related to the new media files in that directory?

Revision history for this message
Niklas Wenzel (nikwen) wrote :
Download full text (3.7 KiB)

I'm experiencing that bug as well. Using symbolic links for that purpose doesn't work either.

My phone currently runs utopic r38.

This is the output I get when I run mediascanner-service ~/Music with a symbolic link set up in ~/Music pointing to ~/testmusic where I've put some music files (in subdirectories):

mediascanner-service[3032]: WARNING warning/main: No GStreamer support found for MPEG-TS (video/mpegts)
mediascanner-service[3032]: WARNING warning/main: No GStreamer support found for A/52, AC3 (Dolby Digital) Audio (audio/x-ac3; audio/ac3)
mediascanner-service[3032]: WARNING warning/main: No GStreamer support found for DTS Audio (audio/x-dts)
mediascanner-service[3032]: WARNING warning/main: No GStreamer support found for H.262/MPEG-2 Part 2 Video (video/mpeg, mpegversion=(int)2)
mediascanner-service[3032]: WARNING warning/main: No GStreamer support found for VC-1 (Windows Media) Video (video/x-wmv)
mediascanner-service[3032]: INFO info/fs-scanner: Starting to monitor "/home/phablet/Music" mounted at "/"
mediascanner-service[3032]: INFO info/main: Starting the file system scanner
mediascanner-service[3032]: INFO info/fs-walker: Scanning "/home/phablet/Music" using media index at ""/home/phablet/.cache/mediascanner""
mediascanner-service[3032]: INFO info/index: Opening media index index at ""/home/phablet/.cache/mediascanner"".
mediascanner-service[3032]: INFO info/index: Opening child index for ""/home/phablet/Downloads"" at ""/home/phablet/.cache/mediascanner""
mediascanner-service[3032]: INFO info/fs-walker: Scanning directory "/home/phablet/Music"
mediascanner-service[3032]: INFO info/fs-walker: Scanning directory "/home/phablet/Music/Black Ice (2008)"
mediascanner-service[3032]: INFO info/index: Opening child index for ""/home/phablet/Music"" at ""/home/phablet/.cache/mediascanner""
mediascanner-service[3032]: INFO info/index: Opening child index for ""/home/phablet/Pictures"" at ""/home/phablet/.cache/mediascanner""
mediascanner-service[3032]: WARNING warning/index: Ignoring media root "/home/phablet/Pictures" since no index could be created (Cannot open index writer: Read past EOF).
mediascanner-service[3032]: INFO info/index: Opening child index for ""/home/phablet/Videos"" at ""/home/phablet/.cache/mediascanner""
mediascanner-service[3032]: INFO info/index: Opening child index for ""/home/phablet/Music"" at ""/home/phablet/.cache/mediascanner""
mediascanner-service[3032]: INFO info/dbus: Published to D-Bus connection at <unix:path=/tmp/dbus-zMeBMEOH8I,type=3>
mediascanner-service[3032]: INFO info/dbus: D-Bus name lost
mediascanner-service[3032]: INFO info/fs-walker: Scanning directory "/home/phablet/Music/Ozzy Osbourne"
mediascanner-service[3032]: INFO info/fs-walker: Scanning directory "/home/phablet/Music/Ozzy Osbourne/Blizzard Of Ozz"
mediascanner-service[3032]: INFO info/fs-walker: Scanning directory "/home/phablet/Music/SLASH Featuring Myles Kennedy and The Conspirators"
mediascanner-service[3032]: INFO info/fs-walker: Scanning directory "/home/phablet/Music/SLASH Featuring Myles Kennedy and The Conspirators/Apocalyptic Love"
mediascanner-service[3032]: INFO info/fs-walker: Scanning directory "/home/phablet/Music/Guns N...

Read more...

Revision history for this message
Niklas Wenzel (nikwen) wrote :
description: updated
Revision history for this message
Laszlo Molnar (lazlowmiller-deactivatedaccount) wrote :

Hi,
I am on utopic r28 (dual boot installed).
That's another bit of problem, bind mounts are not kept over restarts. I even tried making the image writable with the /userdata/.writable_image command rebooted edited /etc/fstab but it removed the added mounts so how can it be tested whether media is rescanned after reboot?

Running "mediascanner-service ~/Music" reports this cRITCAL error several times:
"critical/dconf: unable to create directory '/run/user/0/dconf': Permission denied. dconf will not work properly."
I don't know whether it has anything to do with the bind mount or the link.
It dies when after this:
Scanning directory "/home/phablet/Music"
Segmentation fault (core dumped)
If I remove the link and the bind mount from Music the scan finshes on ~/Music, although still stops due to segmentation fault. See attached file for full output.
Hope this helps, in case you need some more output just tell me...

Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

The probable reason why this happens is that inotify will not send events when bind mounts are added. Thus the Mediascanner can't know about these added files. Try restarting the service, it should rescan the directories then.

The crash in the log file comes from Mediascanner 1, which is deprecated and will be removed soon.

affects: mediascanner2 → mediascanner
Revision history for this message
Laszlo Molnar (lazlowmiller-deactivatedaccount) wrote :

In which upcoming image is mediascanner 2 going to be/planned to be landed? Will inotify account for links/bind mounts? How to restart mediascanner service?
Thanks!

Revision history for this message
Laszlo Molnar (lazlowmiller-deactivatedaccount) wrote :

Since r~105 utopic image, probably when mediascanner-service-2.0 was introduced the music are indexed even from bind mounts. lso pics and videos show up in gallerry and video scope now. So this bug can be closed I think.

David Planella (dpm)
Changed in music-app:
status: Incomplete → Fix Released
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

affects: mediascanner2 → mediascanner2 (Ubuntu)
Changed in mediascanner2 (Ubuntu):
status: New → Confirmed
Changed in mediascanner2 (Ubuntu):
status: New → Confirmed
Changed in mediascanner:
status: New → Invalid
Revision history for this message
Roascio Paolo (roa) wrote :

I don't know if i'm affected exactly by this bug and if it covers ubuntu touch (i'm on a BQ Aquaris E 4.5), i've found that mediascanner-service-2.0 won't scan my bind mounts at boot, but if i start it manually, all works fine...
A bit annoying to open a terminal every boot :(

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.