MusicPlayerDaemon / MPD

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

Crash when using the "rangeid" command #901

Closed elomatreb closed 4 years ago

elomatreb commented 4 years ago

Bug report

I'm having an issue with MPD crashing whenever I attempt to use the rangeid command. It seems to be entirely reproducible and happens with no matter the combination of arguments or file formats I try.

Expected Behavior

The command works as described by https://www.musicpd.org/doc/html/protocol.html#command-reference

Actual Behavior

MPD crashes.

Version

version ``` Music Player Daemon 0.21.23 (0.21.23) Copyright 2003-2007 Warren Dukes Copyright 2008-2018 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 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 ```

Log

Jun 10 23:11:47 elomatreb-pc-linux systemd[803]: Starting Music Player Daemon...
Jun 10 23:11:47 elomatreb-pc-linux mpd[62774]: libsamplerate: libsamplerate converter 'Fastest Sinc Interpolator'
Jun 10 23:11:47 elomatreb-pc-linux mpd[62774]: vorbis: Xiph.Org libVorbis 1.3.6
Jun 10 23:11:47 elomatreb-pc-linux mpd[62774]: opus: libopus 1.3.1
Jun 10 23:11:47 elomatreb-pc-linux mpd[62774]: sndfile: libsndfile-1.0.28
Jun 10 23:11:47 elomatreb-pc-linux mpd[62774]: hybrid_dsd: The Hybrid DSD decoder is disabled because it was not explicitly enabled
Jun 10 23:11:47 elomatreb-pc-linux mpd[62774]: exception: Decoder plugin 'wildmidi' is unavailable: configuration file does not exist: /etc/timidity/timidity.cfg
Jun 10 23:11:47 elomatreb-pc-linux mpd[62774]: simple_db: reading DB
Jun 10 23:11:47 elomatreb-pc-linux mpd[62774]: exception: Input plugin 'tidal' is unavailable: No Tidal application token configured
Jun 10 23:11:47 elomatreb-pc-linux mpd[62774]: exception: Input plugin 'qobuz' is unavailable: No Qobuz app_id configured
Jun 10 23:11:47 elomatreb-pc-linux mpd[62774]: curl: version 7.70.0
Jun 10 23:11:47 elomatreb-pc-linux mpd[62774]: curl: with OpenSSL/1.1.1g
Jun 10 23:11:47 elomatreb-pc-linux mpd[62774]: state_file: Loading state file /home/elomatreb/.cache/mpd/state
Jun 10 23:11:47 elomatreb-pc-linux mpd[62774]: exception: RTIOThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
Jun 10 23:11:47 elomatreb-pc-linux mpd[62774]: playlist: queue song 1:"Various Artists/2020-01-30 - Acts of Mad Men, Volume 2/02 Cyantific - Take Me In.flac"
Jun 10 23:11:47 elomatreb-pc-linux mpd[62774]: exception: OutputThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
Jun 10 23:11:47 elomatreb-pc-linux systemd[803]: Started Music Player Daemon.
Jun 10 23:11:47 elomatreb-pc-linux mpd[62774]: decoder_thread: probing plugin flac
Jun 10 23:11:47 elomatreb-pc-linux mpd[62774]: decoder: audio_format=44100:16:2, seekable=true
Jun 10 23:11:57 elomatreb-pc-linux mpd[62774]: client: [0] opened from [::1]:42990
Jun 10 23:12:00 elomatreb-pc-linux mpd[62774]: client: [0] process command "playlistinfo"
Jun 10 23:12:00 elomatreb-pc-linux mpd[62774]: client: [0] command returned 0
Jun 10 23:12:08 elomatreb-pc-linux mpd[62774]: client: [0] process command "rangeid 16 2.0:5.0"
Jun 10 23:12:08 elomatreb-pc-linux mpd[62774]: mpd: ../src/queue/Playlist.cxx:133: void playlist::UpdateQueuedSong(PlayerControl&, const DetachedSong*): Assertion `(queued < 0) == (prev == nullptr)' failed.
Jun 10 23:12:09 elomatreb-pc-linux systemd[803]: mpd.service: Main process exited, code=dumped, status=6/ABRT
Jun 10 23:12:09 elomatreb-pc-linux systemd[803]: mpd.service: Failed with result 'core-dump'.

I can also provide a crashdump file if that's helpful here.

elomatreb commented 4 years ago

Can confirm that the crash no longer occurs with the above patch :+1: