MusicPlayerDaemon / MPD

Music Player Daemon
https://www.musicpd.org/
GNU General Public License v2.0
2.18k stars 352 forks source link

udisks plugin fails to mount and wrong URI resolution #481

Closed muesli4 closed 5 years ago

muesli4 commented 5 years ago
Music Player Daemon 0.21.4 (0.21.4)

Copyright 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2018 Max Kellermann <max.kellermann@gmail.com>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins:
 simple proxy upnp

Storage plugins:
 local smbclient udisks nfs curl

Neighbor plugins:
 smbclient upnp udisks

Decoders plugins:
 [mad] mp3 mp2
 [mpg123] mp3
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [opus] opus ogg oga
 [sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2
 [audiofile] wav au aiff aif
 [dsdiff] dff
 [dsf] dsf
 [hybrid_dsd] m4a
 [faad] aac
 [mpcdec] mpc
 [wavpack] wv
 [modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm
 [mikmod] amf dsm far gdm imf it med mod mtm s3m stm stx ult uni xm
 [wildmidi] mid
 [fluidsynth] mid
 [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 adx afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve
 [gme] ay gbs gym hes kss nsf nsfe sap spc vgm vgz
 [pcm]

Filters:
 libsamplerate soxr

Tag plugins:
 id3tag

Output plugins:
 shout null fifo pipe alsa ao oss openal solaris pulse jack httpd recorder

Encoder plugins:
 null vorbis opus lame twolame wave flac

Archive plugins:
 [bz2] bz2
 [zzip] zip
 [iso] iso

Input plugins:
 file archive alsa tidal qobuz curl ffmpeg smbclient nfs mms cdio_paranoia

Playlist plugins:
 extm3u m3u pls xspf asx rss soundcloud flac cue embcue

Protocols:
 file:// alsa:// tidal:// qobuz:// http:// https:// gopher:// rtp:// rtsp:// rtmp:// rtmpt:// rtmps:// smb:// nfs:// mms:// mmsh:// mmst:// mmsu:// cdda://

Other features:
 avahi dbus udisks epoll icu inotify ipv6 systemd tcp un

I initially had a look at this issue because it was very similar: https://github.com/MusicPlayerDaemon/MPD/issues/288

I noticed that the first issue I had was with PolicyKit, as I did not have the permission to mount. The error message was barely visible and only in the log file with the verbose option. (The issue is that it still lists the mount.)

My collection is in udisks://by-id-usb-SanDisk_Cruzer_Blade_4C530103120907102233-0:0-part1/library/. However, mounting just that will result in this error:

Feb 16 09:10 : client: [4] process command "mount withpath udisks://by-id-usb-SanDisk_Cruzer_Blade_4C530103120907102233-0:0-part1/library/"
Feb 16 09:10 : exception: Failed to open '/home/alarm/.mpd/cache/udisks___by-id-usb-SanDisk_Cruzer_Blade_4C530103120907102233-0_0-part1_library_': No such file or directory

I then tried mounting just udisks://by-id-usb-SanDisk_Cruzer_Blade_4C530103120907102233-0:0-part1. This seemed to work. However there are several issues:

MaxKellermann commented 5 years ago

Please write a separate bug report for the segfault and include a backtrace.

MaxKellermann commented 5 years ago

Your command log doesn't show how the URI udisks://by-id-usb-SanDisk_Cruzer_Blade_4C530103120907102233-0:0-part1/library/folder/file.mp3 managed its way into your queue. It is an invalid song URI. It shows only how you mount the device, but never how you added the song.

muesli4 commented 5 years ago

I will try to split this into several issues and give you some detailed instruction logs and backtraces.

muesli4 commented 5 years ago

I compiled it from GitHub and some of the issues are gone. I can no longer reproduce the segfault. I opened 2 new issues:

https://github.com/MusicPlayerDaemon/MPD/issues/485 https://github.com/MusicPlayerDaemon/MPD/issues/486

MaxKellermann commented 5 years ago

Thanks. I have been debugging the plugin yesterday, and found various issues which will be fixed soon.

muesli4 commented 5 years ago

That's fantastic to hear and I appreciate any effort very much.