MusicPlayerDaemon / MPD

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

File with metadata tag "Unknown" makes MPD freeze #1799

Closed akinokonomi closed 1 year ago

akinokonomi commented 1 year ago

Bug report

Describe the bug

If the "Artist" or "Title" (maybe other) tag of an mp3 or flac file contains Unknown, something-something (Unknown), unknown, MPD freezes (until it times out) and refuses to open the folder containing that file.

This only happens with

bind_to_address "127.0.0.1"
port        "6600"

And does not, with

bind_to_address     "~/.config/mpd/socket"

This is a very old problem, but I figured out the source of it only now.

Expected Behavior

Be able to play such file with "127.0.0.1" set too.

Actual Behavior

MPD does not play such file when binding to "127.0.0.1".

Version

Music Player Daemon 0.23.12 (0.23.12)

mpd --version... ``` Music Player Daemon 0.23.12 (0.23.12) Copyright 2003-2007 Warren Dukes Copyright 2008-2021 Max Kellermann 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 udisks nfs curl Neighbor plugins: 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 [openmpt] mptm mod s3m xm it 669 amf ams c67 dbm digi dmf dsm dtm far imf ice j2b m15 mdl med mms mt2 mtm nst okt plm psm pt36 ptm sfx sfx2 st26 stk stm stp ult wow gdm mo3 oxm umx xpk ppm mmcmp [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 [sidplay] sid mus str prg P00 [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 rtp:// rtsp:// rtsps:// [gme] ay gbs gym hes kss nsf nsfe rsn sap spc vgm vgz [pcm] Filters: libsamplerate soxr Tag plugins: id3tag Output plugins: shout null fifo pipe alsa ao oss openal solaris pipewire pulse jack httpd snapcast recorder Encoder plugins: null vorbis opus lame twolame wave flac Archive plugins: [bz2] bz2 [zzip] zip [iso] iso Input plugins: file io_uring archive alsa qobuz curl ffmpeg nfs mms cdio_paranoia Playlist plugins: extm3u m3u pls xspf asx rss soundcloud flac cue embcue Protocols: file:// alsa:// cdda:// ftp:// ftps:// gopher:// hls+http:// hls+https:// http:// https:// mms:// mmsh:// mmst:// mmsu:// nfs:// qobuz:// rtmp:// rtmpe:// rtmps:// rtmpt:// rtmpte:// rtmpts:// rtp:// rtsp:// rtsps:// scp:// sftp:// smb:// srtp:// Other features: avahi dbus udisks epoll icu inotify ipv6 systemd tcp un ```

Configuration

Tested with the default config from /usr/share/doc/mpd/mpdconf.example too. The only uncommented lines are:

music_directory     "~/Music"
playlist_directory      "~/.config/mpd/playlists"
db_file         "~/.config/mpd/database"
log_file            "~/.config/mpd/log"
pid_file            "~/.config/mpd/pid"
state_file          "~/.config/mpd/state"
sticker_file            "~/.config/mpd/sticker.sql"

bind_to_address     "any"
port                "6600"
log_level           "verbose"

input {
        plugin "curl"
}

audio_output {
        type "pipewire"
        name "PipeWire"
}

Log

log_level           "verbose"
May 04 22:15 : event: RTIOThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
May 04 22:15 : state_file: Loading state file /home/pony/.config/mpd/state
May 04 22:15 : client: [0] opened from 127.0.0.1:59838
May 04 22:15 : client: [0] process command "status"
May 04 22:15 : client: [0] command returned 0
May 04 22:15 : client: [0] process command "plchanges "0""
May 04 22:15 : client: [0] command returned 0
May 04 22:15 : client: [0] process command "outputs"
May 04 22:15 : client: [0] command returned 0
May 04 22:15 : client: [0] process command "decoders"
May 04 22:15 : client: [0] command returned 0
May 04 22:15 : client: [0] process command "outputs"
May 04 22:15 : client: [0] command returned 0
May 04 22:15 : client: [0] process command "outputs"
May 04 22:15 : client: [0] command returned 0
May 04 22:15 : client: [0] process command "idle"
May 04 22:15 : client: [0] command returned 1
May 04 22:15 : client: [0] process command "lsinfo """
May 04 22:15 : client: [0] command returned 0
May 04 22:15 : client: [0] process command "idle"
May 04 22:15 : client: [0] command returned 1
May 04 22:15 : client: [0] process command "lsinfo "test""
May 04 22:15 : client: [0] command returned 0
May 04 22:15 : client: [0] closed
May 04 22:15 : client: [1] opened from 127.0.0.1:52888
May 04 22:15 : client: [1] process command "status"
May 04 22:15 : client: [1] command returned 0
May 04 22:15 : client: [1] process command "plchanges "0""
May 04 22:15 : client: [1] command returned 0
May 04 22:15 : client: [1] process command "outputs"
May 04 22:15 : client: [1] command returned 0
May 04 22:15 : client: [1] process command "decoders"
May 04 22:15 : client: [1] command returned 0
May 04 22:15 : client: [1] process command "outputs"
May 04 22:15 : client: [1] command returned 0
May 04 22:15 : client: [1] process command "outputs"
May 04 22:15 : client: [1] command returned 0
May 04 22:15 : client: [1] process command "lsinfo """
May 04 22:15 : client: [1] command returned 0
May 04 22:15 : client: [1] process command "idle"
May 04 22:15 : client: [1] command returned 1
May 04 22:15 : client: [1] closed
akinokonomi commented 1 year ago

Sorry, I meant connect, not bind.

Certainly I can bind to both of them at the same time, all right. But this happens when I connect to MPD via 127.0.0.1. With ncmpcpp, ncmpc, mpc.

MaxKellermann commented 1 year ago

Your bug report is very confusing. The title says "MPD freezes", but in "Actual Behavior" you write "MPD does not play such file", which is different. But it's even more confusing: your log shows that you didn't even try to play anything. Of course MPD doesn't play anything if you don't tell MPD to play something. So what can I do but close this bug report as "bogus"?

akinokonomi commented 1 year ago

but in "Actual Behavior" you write "MPD does not play such file", which is different.

your log shows that you didn't even try to play anything

Isn't that means that it's exactly as I say?

Well, yeah, I think I worded it poorly.

It's that, I cannot play the file, because MPD does not let me open the folder that contains it. When I try to open the folder in ncmpc etc., it just freezes, times out. Log does not have anything at all when that happens, as you see.

So what can I do but close this bug report as "bogus"?

Do as you wish.

MaxKellermann commented 1 year ago

Then get me a full backtrace of all threads when this happens

akinokonomi commented 1 year ago

I have no idea how to do that, and I don't have time to learn how to do that.

I see we'd be better off closing this. Thank you for your time.