MusicPlayerDaemon / MPD

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

Intermittent segfault on song change #773

Open zsitvaij opened 4 years ago

zsitvaij commented 4 years ago

Bug report

Describe the bug

MPD sometimes crashes on song change. Sometimes the same playlist runs unchanged for days without issue, other times crashes almost immediately after server starts. No local audio output, just icecast and httpd. Client used for control is ncmpc.

Expected Behavior

No segfault.

Actual Behavior

Segfault.

Version

Music Player Daemon 0.21.20 (0.21.20)
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

Storage plugins:
 local udisks

Neighbor plugins:
 udisks

Decoders plugins:
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [opus] opus ogg oga
 [dsdiff] dff
 [dsf] dsf
 [hybrid_dsd] m4a
 [faad] aac
 [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
 [pcm]

Filters:
 soxr

Tag plugins:

Output plugins:
 shout null pulse httpd

Encoder plugins:
 null vorbis opus flac

Input plugins:
 file curl ffmpeg

Playlist plugins:
 extm3u m3u pls flac cue embcue

Protocols:
 file:// http:// https:// gopher:// rtp:// rtsp:// rtmp:// rtmpt:// rtmps://

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

Build configuration

Distro is Gentoo with the following USE flags: chromaprint cue curl dbus debug eventfd faad ffmpeg flac icu inotify ipv6 libmpdclient libsoxr network opus pulseaudio signalfd sqlite systemd udisks unicode vorbis -alsa -ao -audiofile -bzip2 -cdio -expat -fifo -fluidsynth -gme -id3tag -jack -lame -libav -libsamplerate -mad -mikmod -mms -modplug -mpg123 -musepack -nfs -openal -oss -pipe -qobuz -recorder -samba (-selinux) -sid -sndfile -soundcloud -test -tidal -twolame -upnp -wavpack -webdav -wildmidi -zeroconf -zip -zlib

This results in the following meson command:

meson --buildtype plain --libdir lib64 --localstatedir /var/lib --prefix /usr --sysconfdir /etc --wrap-mode nodownload -Dbzip2=disabled -Dcdio_paranoia=disabled -Dchromaprint=enabled -Dcue=true -Dcurl=enabled -Ddbus=enabled -Ddebug=true -Deventfd=true -Dexpat=disabled -Dicu=enabled -Did3tag=disabled -Dinotify=true -Dipv6=enabled -Diso9660=disabled -Dlibmpdclient=enabled -Dlibsamplerate=disabled -Dmms=disabled -Dnfs=disabled -Dsignalfd=true -Dsmbclient=disabled -Dsoxr=enabled -Dsqlite=enabled -Dsystemd=enabled -Dtest=false -Dudisks=enabled -Dupnp=disabled -Dwebdav=disabled -Dzeroconf=disabled -Dzlib=disabled -Dzzip=disabled -Dalsa=disabled -Dao=disabled -Dfifo=false -Djack=disabled -Dopenal=disabled -Doss=disabled -Dpipe=false -Dpulse=enabled -Drecorder=false -Dshine=disabled -Dshout=enabled -Dvorbisenc=enabled -Dhttpd=true -Dlame=disabled -Dtwolame=disabled -Dwave_encoder=false -Dadplug=disabled -Daudiofile=disabled -Dfaad=enabled -Dffmpeg=enabled -Dflac=enabled -Dfluidsynth=disabled -Dgme=disabled -Dmad=disabled -Dmikmod=disabled -Dmodplug=disabled -Dmpcdec=disabled -Dmpg123=disabled -Dopus=enabled -Dsidplay=disabled -Dsndfile=disabled -Dvorbis=enabled -Dwavpack=disabled -Dwildmidi=disabled -Dqobuz=disabled -Dsoundcloud=disabled -Dtidal=disabled --libdir=/usr/lib64 -Ddocumentation=false -Dsndio=disabled -Dsolaris_output=disabled -Ddatabase=true -Ddsd=true -Dtcp=true -Dsystemd_system_unit_dir=/lib/systemd/system -Dsystemd_user_unit_dir=/usr/lib/systemd/user -Diconv=enabled /var/tmp/portage/media-sound/mpd-0.21.20/work/mpd-0.21.20 /var/tmp/portage/media-sound/mpd-0.21.20/work/mpd-0.21.20-build       

Log

% mpd --verbose --no-daemon
config_file: loading file /home/jano/.mpdconf
Feb 27 18:31 : exception: bind to '0.0.0.0:6600' failed (continuing anyway, because binding to '[::]:6600' succeeded): Failed to bind socket: Address already in use
Feb 27 18:31 : path: SetFSCharset: fs charset is:
Feb 27 18:31 : soxr: soxr converter 'high'
Feb 27 18:31 : vorbis: Xiph.Org libVorbis 1.3.6
Feb 27 18:31 : opus: libopus 1.3.1
Feb 27 18:31 : hybrid_dsd: The Hybrid DSD decoder is disabled because it was not explicitly enabled
Feb 27 18:31 : simple_db: reading DB
Feb 27 18:31 : curl: version 7.68.0
Feb 27 18:31 : curl: with OpenSSL/1.1.1d
zsh: segmentation fault (core dumped)  mpd --verbose --no-daemon

~/.mpd/log abbreviated:

Feb 27 18:31 : state_file: Loading state file /home/jano/.mpd/state
Feb 27 18:31 : exception: RTIOThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
Feb 27 18:31 : playlist: queue song 16:"akagi/2020-02-07/【歌ってみた】名前のない怪物 Covered by 花鋏キョウ【EGOIST】-UYPJGCQU_v0.mkv"
Feb 27 18:31 : inotify: initializing inotify
Feb 27 18:31 : decoder_thread: probing plugin ffmpeg
Feb 27 18:31 : ffmpeg/matroska,webm: Format matroska,webm probed with size=2048 and score=100
Feb 27 18:31 : ffmpeg: detected input format 'matroska,webm' (Matroska / WebM)
Feb 27 18:31 : ffmpeg/matroska,webm: Before avformat_find_stream_info() pos: 1545 bytes read:8192 seeks:0 nb_streams:2
Feb 27 18:31 : ffmpeg/vp9: Format yuv420p chosen by get_format().
Feb 27 18:31 : ffmpeg/matroska,webm: All info found
Feb 27 18:31 : ffmpeg/matroska,webm: stream 0: start_time: 0.007 duration: -9223372036854776.000
Feb 27 18:31 : ffmpeg/matroska,webm: stream 1: start_time: -0.007 duration: -9223372036854776.000
Feb 27 18:31 : ffmpeg/matroska,webm: format: start_time: -0.007 duration: 213.381 bitrate=709 kb/s
Feb 27 18:31 : ffmpeg/matroska,webm: After avformat_find_stream_info() pos: 2314 bytes read:8192 seeks:0 frames:2
Feb 27 18:31 : ffmpeg: codec 'opus'
Feb 27 18:31 : decoder: audio_format=48000:f:2, seekable=true
Feb 27 18:31 : exception: OutputThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
Feb 27 18:31 : exception: bind to '0.0.0.0:8003' failed (continuing anyway, because binding to '[::]:8003' succeeded): Failed to bind socket: Address already in use
Feb 27 18:31 : exception: OutputThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
Feb 27 18:31 : ffmpeg/matroska,webm: File is broken, keyframes not correctly marked!
Feb 27 18:31 : ffmpeg/opus: Could not update timestamps for skipped samples.
Feb 27 18:31 : ffmpeg/opus: skip 312/960 samples
Feb 27 18:31 : output: opened "MPD Stream" (shout) audio_format=44100:f:2
Feb 27 18:31 : soxr: soxr engine 'cr32s'
Feb 27 18:31 : soxr: samplerate conversion ratio to 0.92
Feb 27 18:31 : output: converting in=48000:f:2 -> f=48000:f:2 -> out=44100:f:2
Feb 27 18:31 : output: opened "Vorbis HTTP Stream" (httpd) audio_format=44100:f:2
Feb 27 18:31 : soxr: soxr engine 'cr32s'
Feb 27 18:31 : soxr: samplerate conversion ratio to 0.92
Feb 27 18:31 : output: converting in=48000:f:2 -> f=48000:f:2 -> out=44100:f:2
Feb 27 18:31 : replay_gain: replay gain mode has changed off->album
Feb 27 18:31 : replay_gain: replay gain mode has changed off->album
Feb 27 18:31 : replay_gain: scale=1.000000
Feb 27 18:31 : replay_gain: scale=1.000000
Feb 27 18:33 : inotify: watching music directory
Feb 27 18:33 : state_file: Saving state file /home/jano/.mpd/state
Feb 27 18:33 : client: [0] opened from [::1]:44596
Feb 27 18:33 : client: [0] process command "status"
Feb 27 18:33 : client: [0] command returned 0
Feb 27 18:33 : client: [0] process command "playlistinfo"
Feb 27 18:33 : client: [0] command returned 0
Feb 27 18:33 : client: [0] process command "idle"
Feb 27 18:33 : client: [0] command returned 1
Feb 27 18:33 : client: [0] process command "status"
Feb 27 18:33 : client: [0] command returned 0
Feb 27 18:33 : client: [0] process command "idle"
Feb 27 18:33 : client: [0] command returned 1
[...]
Feb 27 18:33 : client: [0] process command "playid "16""
Feb 27 18:33 : playlist: play 15:"akagi/2020-02-07/【東方自作アレンジ】Overflow【U.N.オーエンは彼女なのか?】-krDzoZyiZLw.webm"
Feb 27 18:33 : client: [0] command returned 0
Feb 27 18:33 : client: [0] process command "idle"
Feb 27 18:33 : client: [0] command returned 1
Feb 27 18:33 : client: [0] process command "status"
Feb 27 18:33 : client: [0] command returned 0
Feb 27 18:33 : client: [0] process command "status"
Feb 27 18:33 : client: [0] command returned 0
Feb 27 18:33 : client: [0] process command "idle"
Feb 27 18:33 : client: [0] command returned 1
Feb 27 18:33 : state_file: Saving state file /home/jano/.mpd/state
[...]
Feb 27 18:36 : update: spawned thread for update job id 1
Feb 27 18:36 : inotify: updating 'balthazar-yt' job=1
Feb 27 18:36 : update: starting: balthazar-yt
Feb 27 18:36 : client: [0] process command "status"
Feb 27 18:36 : client: [0] command returned 0
Feb 27 18:36 : client: [0] process command "idle"
Feb 27 18:36 : client: [0] command returned 1
Feb 27 18:36 : update: reading balthazar-yt/new/【花映塚 ボーカル】CROW'SCLAW - Yours Is Only Mine「Subbed」-wO4pNpZ9syY.f136.mp4
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'ftyp' parent:'root' sz: 28 8 11848087
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: ISO: File Type Major Brand: dash
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'moov' parent:'root' sz: 682 36 11848087
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'mvhd' parent:'moov' sz: 108 8 674
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: time scale = 90000
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'mvex' parent:'moov' sz: 40 116 674
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'trex' parent:'mvex' sz: 32 8 32
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'trak' parent:'moov' sz: 526 156 674
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'tkhd' parent:'trak' sz: 92 8 518
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'edts' parent:'trak' sz: 36 100 518
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'elst' parent:'edts' sz: 28 8 28
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: track[0].edit_count = 1
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: duration=0 time=15000 rate=1.000000
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'mdia' parent:'trak' sz: 390 136 518
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'mdhd' parent:'mdia' sz: 32 8 382
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'hdlr' parent:'mdia' sz: 45 40 382
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: ctype=[0][0][0][0]
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stype=vide
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'minf' parent:'mdia' sz: 305 85 382
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'dinf' parent:'minf' sz: 36 8 297
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'dref' parent:'dinf' sz: 28 8 28
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: Unknown dref type 0x206c7275 size 12
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'stbl' parent:'minf' sz: 241 44 297
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'stsd' parent:'stbl' sz: 149 8 233
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: size=133 4CC=avc1 codec_type=0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'avcC' parent:'stsd' sz: 47 8 47
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'stts' parent:'stbl' sz: 16 157 233
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: track[0].stts.entries = 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'stsc' parent:'stbl' sz: 16 173 233
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: track[0].stsc.entries = 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'stco' parent:'stbl' sz: 16 189 233
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'stsz' parent:'stbl' sz: 20 205 233
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: sample_size = 0 sample_count = 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'stss' parent:'stbl' sz: 16 225 233
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: keyframe_count = 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'vmhd' parent:'minf' sz: 20 285 297
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'sidx' parent:'root' sz: 536 718 11848087
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'moof' parent:'root' sz: 448 1254 11848087
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: moof offset 4de
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'mfhd' parent:'moof' sz: 16 8 440
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'traf' parent:'moof' sz: 424 24 440
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'tfhd' parent:'traf' sz: 20 8 416
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: frag flags 0x0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'tfdt' parent:'traf' sz: 16 28 416
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'trun' parent:'traf' sz: 380 44 416
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: flags 0xe01 entries 30
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: found sidx time -9223372036854775808, using it for pts
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: first sample flags 0x0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 1, offset 6a6, dts -15000, size 161792, distance 0, keyframe 1
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 2, offset 27ea6, dts 0, size 110660, distance 1, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 3, offset 42eea, dts 15000, size 38629, distance 2, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 4, offset 4c5cf, dts 30000, size 35802, distance 3, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 5, offset 551a9, dts 45000, size 12418, distance 4, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 6, offset 5822b, dts 60000, size 2621, distance 5, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 7, offset 58c68, dts 75000, size 227, distance 6, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 8, offset 58d4b, dts 90000, size 38713, distance 7, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 9, offset 62484, dts 105000, size 914, distance 8, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 10, offset 62816, dts 120000, size 123, distance 9, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 11, offset 62891, dts 135000, size 168, distance 10, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 12, offset 62939, dts 150000, size 74, distance 11, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 13, offset 62983, dts 165000, size 283, distance 12, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 14, offset 62a9e, dts 180000, size 253, distance 13, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 15, offset 62b9b, dts 195000, size 10625, distance 14, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 16, offset 6551c, dts 210000, size 153346, distance 15, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 17, offset 8ac1e, dts 225000, size 4555, distance 16, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 18, offset 8bde9, dts 240000, size 460, distance 17, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 19, offset 8bfb5, dts 255000, size 983, distance 18, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 20, offset 8c38c, dts 270000, size 247, distance 19, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 21, offset 8c483, dts 285000, size 153, distance 20, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 22, offset 8c51c, dts 300000, size 84, distance 21, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 23, offset 8c570, dts 315000, size 44, distance 22, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 24, offset 8c59c, dts 330000, size 44, distance 23, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 25, offset 8c5c8, dts 345000, size 44, distance 24, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 26, offset 8c5f4, dts 360000, size 54, distance 25, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 27, offset 8c62a, dts 375000, size 50, distance 26, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 28, offset 8c65c, dts 390000, size 46, distance 27, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 29, offset 8c68a, dts 405000, size 47, distance 28, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: AVIndex stream 0, sample 30, offset 8c6b9, dts 420000, size 91, distance 29, keyframe 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: type:'mdat' parent:'root' sz: 573558 1702 11848087
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: on_parse_exit_offset=1702
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: Before avformat_find_stream_info() pos: 1702 bytes read:8192 seeks:0 nb_streams:1
Feb 27 18:36 : ffmpeg/h264: nal_unit_type: 7(SPS), nal_ref_idc: 3
Feb 27 18:36 : ffmpeg/h264: nal_unit_type: 8(PPS), nal_ref_idc: 3
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 0, dts -166667
Feb 27 18:36 : ffmpeg/h264: nal_unit_type: 7(SPS), nal_ref_idc: 3
Feb 27 18:36 : ffmpeg/h264: nal_unit_type: 8(PPS), nal_ref_idc: 3
Feb 27 18:36 : ffmpeg/h264: nal_unit_type: 5(IDR), nal_ref_idc: 3
Feb 27 18:36 : ffmpeg/h264: Format yuv420p chosen by get_format().
Feb 27 18:36 : ffmpeg/h264: Reinit context to 1280x720, pix_fmt: yuv420p
Feb 27 18:36 : ffmpeg/h264: no picture
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 1, dts 0
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 2, dts 166667
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 3, dts 333333
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 4, dts 500000
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 5, dts 666667
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 6, dts 833333
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 7, dts 1000000
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 8, dts 1166667
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 9, dts 1333333
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 10, dts 1500000
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 11, dts 1666667
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 12, dts 1833333
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 13, dts 2000000
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 14, dts 2166667
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 15, dts 2333333
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 16, dts 2500000
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 17, dts 2666667
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 18, dts 2833333
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 19, dts 3000000
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 20, dts 3166667
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: All info found
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0: start_time: 0.000 duration: 209.033
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: format: start_time: 0.000 duration: 209.033 bitrate=453 kb/s
Feb 27 18:36 : ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: After avformat_find_stream_info() pos: 574748 bytes read:576542 seeks:0 frames:21
Feb 27 18:36 : update: ignoring unrecognized file balthazar-yt/new/【花映塚 ボーカル】CROW'SCLAW - Yours Is Only Mine「Subbed」-wO4pNpZ9syY.f136.mp4
Feb 27 18:36 : update: finished: balthazar-yt
Feb 27 18:36 : client: [0] process command "status"
Feb 27 18:36 : client: [0] command returned 0
Feb 27 18:36 : client: [0] process command "idle"
Feb 27 18:36 : client: [0] command returned 1
[...]
Feb 27 18:37 : ffmpeg/opus: skip 0 / discard 813 samples due to side data
Feb 27 18:37 : ffmpeg/opus: Could not update timestamps for discarded samples.
Feb 27 18:37 : ffmpeg/opus: discard 813/960 samples
Feb 27 18:37 : client: [0] process command "status"
Feb 27 18:37 : client: [0] command returned 0
Feb 27 18:37 : client: [0] process command "idle"
Feb 27 18:37 : client: [0] command returned 1
Feb 27 18:37 : player: played "akagi/2020-02-07/【東方自作アレンジ】Overflow【U.N.オーエンは彼女なのか?】-krDzoZyiZLw.webm"
Feb 27 18:37 : playlist: play 16:"akagi/2020-02-07/【歌ってみた】名前のない怪物 Covered by 花鋏キョウ【EGOIST】-UYPJGCQU_v0.mkv"
Feb 27 18:37 : playlist: queue song 17:"akagi/2020-02-07/【鬼滅の刃OP】LiSA - 紅蓮華(Gurenge) - COVER by くろくも (kurokumo)-7al_h-9s2Q0.mkv"
Feb 27 18:37 : decoder_thread: probing plugin ffmpeg
Feb 27 18:37 : ffmpeg/matroska,webm: Format matroska,webm probed with size=2048 and score=100
Feb 27 18:37 : ffmpeg: detected input format 'matroska,webm' (Matroska / WebM)
Feb 27 18:37 : ffmpeg/matroska,webm: Before avformat_find_stream_info() pos: 3554 bytes read:8192 seeks:0 nb_streams:2
Feb 27 18:37 : ffmpeg/h264: nal_unit_type: 7(SPS), nal_ref_idc: 3
Feb 27 18:37 : ffmpeg/h264: nal_unit_type: 8(PPS), nal_ref_idc: 3
Feb 27 18:37 : ffmpeg/h264: nal_unit_type: 7(SPS), nal_ref_idc: 3
Feb 27 18:37 : ffmpeg/h264: nal_unit_type: 8(PPS), nal_ref_idc: 3
Feb 27 18:37 : ffmpeg/h264: nal_unit_type: 6(SEI), nal_ref_idc: 0
Feb 27 18:37 : ffmpeg/h264: nal_unit_type: 5(IDR), nal_ref_idc: 3
Feb 27 18:37 : ffmpeg/h264: Format yuv420p chosen by get_format().
Feb 27 18:37 : ffmpeg/h264: Reinit context to 1920x1088, pix_fmt: yuv420p
Feb 27 18:37 : ffmpeg/h264: no picture
Feb 27 18:37 : ffmpeg/matroska,webm: All info found
Feb 27 18:37 : ffmpeg/matroska,webm: stream 0: start_time: 0.007 duration: -9223372036854776.000
Feb 27 18:37 : ffmpeg/matroska,webm: stream 1: start_time: -0.007 duration: -9223372036854776.000
Feb 27 18:37 : ffmpeg/matroska,webm: format: start_time: -0.007 duration: 318.101 bitrate=1652 kb/s
Feb 27 18:37 : ffmpeg/matroska,webm: After avformat_find_stream_info() pos: 4828 bytes read:8192 seeks:0 frames:5
Feb 27 18:37 : ffmpeg: codec 'opus'
Feb 27 18:37 : decoder: audio_format=48000:f:2, seekable=true
Feb 27 18:37 : ffmpeg/opus: Could not update timestamps for skipped samples.
Feb 27 18:37 : ffmpeg/opus: skip 312/960 samples
Feb 27 18:37 : client: [0] process command "status"
Feb 27 18:37 : client: [0] command returned 0
Feb 27 18:37 : client: [0] process command "idle"
Feb 27 18:37 : client: [0] command returned 1

Backtrace

% gdb --core core.output:Vorbis\ H.3349895.1000.1582825030 $(which mpd)                                                                                                                                                                                       
GNU gdb (Gentoo 9.1 vanilla) 9.1                                                                                                                                                                                                                                               
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>                                                      
This is free software: you are free to change and redistribute it.                                                                     
There is NO WARRANTY, to the extent permitted by law.                                                                                  
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.                                                                                   
For bug reporting instructions, please see: 
<https://bugs.gentoo.org/>.                                                                                                                                                                                                                                                    
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.                                                                                                                                                                                                                                                                                             
For help, type "help".                                                                                                                 
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/mpd...                                                                                                                                                                                                                                           Reading symbols from /usr/lib/debug//usr/bin/mpd.debug...
[New LWP 3349902]                                                                                                                      
[New LWP 3349899]
[New LWP 3349898]                                                                                                                                                                                                                                                              [New LWP 3349903]       
[New LWP 3349901]                                                                                                                      
[New LWP 3349895]            
[New LWP 3349900]           
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".                                                                                                                                                                                                                    Core was generated by `mpd --verbose --no-daemon'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f71ab06ba39 in _soxr_deinterleave_f (dest=0x7f719404c4d0, data_type=<optimized out>, src0=0x7f719ebfc938, n=502, ch=<optimized out>) at /usr/src/debug/media-libs/soxr-0.1.3-r1/soxr-0.1.3-Source/src/data-io.c:50
50          case SOXR_FLOAT32: DEINTERLEAVE_FROM(float, 1); break;
[Current thread is 1 (Thread 0x7f719ebfd700 (LWP 3349902))]
(gdb) bt full
#0  0x00007f71ab06ba39 in _soxr_deinterleave_f (dest=0x7f719404c4d0, data_type=<optimized out>, src0=0x7f719ebfc938, n=502, ch=<optimized out>) at /usr/src/debug/media-libs/soxr-0.1.3-r1/soxr-0.1.3-Source/src/data-io.c:50
        i = 0
        j = 0
        src = 0x7f719ebfe054
#1  0x00007f71ab06953e in soxr_input (p=p@entry=0x7f7194061830, in=<optimized out>, in@entry=0x7f719ebfe050, len=len@entry=502) at /usr/src/debug/media-libs/soxr-0.1.3-r1/soxr-0.1.3-Source/src/soxr.c:648
        separated = <optimized out>
        i = <optimized out>
#2  0x00007f71ab06afce in soxr_process (p=0x7f7194061830, in=in@entry=0x7f719ebfe050, ilen0=<optimized out>, ilen0@entry=502, idone0=idone0@entry=0x7f719ebfca28, out=out@entry=0x7f7194090f10, olen=olen@entry=462, odone0=0x7f719ebfca30)
    at /usr/src/debug/media-libs/soxr-0.1.3-r1/soxr-0.1.3-Source/src/soxr.c:781
        ilen = 502
        idone = <optimized out>
        odone = 0
        u = <optimized out>
        flush_requested = <optimized out>
#3  0x0000561fc9ba2653 in SoxrPcmResampler::Resample(ConstBuffer<void>) (this=0x7f7194000f40, src=...) at ../mpd-0.21.20/src/pcm/SoxrResampler.cxx:163
        frame_size = 8
        __PRETTY_FUNCTION__ = "virtual ConstBuffer<void> SoxrPcmResampler::Resample(ConstBuffer<void>)"
        n_frames = 502
        o_frames = 462
        output_buffer = 0x7f7194090f10
        i_done = 94694560499600
        o_done = 94694560499912
        e = <optimized out>
#4  0x0000561fc9ba0659 in PcmConvert::Convert(ConstBuffer<void>) (this=0x7f7194000e48, buffer=...) at ../mpd-0.21.20/src/pcm/PcmConvert.cxx:146
#5  0x0000561fc9bae3da in ApplyFilterChain<std::_List_iterator<ChainFilter::Child> >Python Exception <class 'ValueError'> Cannot find type struct std::_List_iterator<ChainFilter::Child>::_Node: 
 (src=..., end=, begin=...) at /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/g++-v9/bits/unique_ptr.h:352
Python Exception <class 'ValueError'> Cannot find type struct std::_List_iterator<ChainFilter::Child>::_Node: 
        i = 
#6  ChainFilter::FilterPCM(ConstBuffer<void>) (this=0x7f7194000c30, src=...) at ../mpd-0.21.20/src/filter/plugins/ChainFilterPlugin.cxx:158
#7  0x0000561fc9bac996 in AudioOutputSource::Fill(Mutex&) (this=this@entry=0x561fcba40790, mutex=...) at ../mpd-0.21.20/src/output/Source.cxx:230
        unlock = {mutex = @0x561fcba408c8}
#8  0x0000561fc9bacbdc in AudioOutputControl::FillSourceOrClose() (this=0x561fcba40780) at ../mpd-0.21.20/src/output/Thread.cxx:229
#9  0x0000561fc9bad688 in AudioOutputControl::InternalPlay() (this=0x561fcba40780) at ../mpd-0.21.20/src/output/Thread.cxx:288
        at_scope_exit_295 = {<AudioOutputControl::<lambda()>> = {__this = 0x561fcba40780}, enabled = true}
        n = <optimized out>
        lock = {_M_device = @0x561fcba408c8}
#10 AudioOutputControl::Task() (this=0x561fcba40780) at ../mpd-0.21.20/src/output/Thread.cxx:513
        lock = {_M_device = @0x561fcba408c8}
#11 0x0000561fc9b95773 in BoundMethod<void ()>::operator()() const (this=0x561fcba40828, this=0x561fcba40828) at ../mpd-0.21.20/src/util/BindMethod.hxx:76
        thread = 
          @0x561fcba40828: {f = {instance_ = 0x561fcba40780, function = 0x561fc9ba9cc0 <BindMethodDetail::BindMethodWrapperGenerator2<AudioOutputControl, void (AudioOutputControl::*)(), &AudioOutputControl::Task, void>::Invoke(void*)>}, handle = 140125971404544, inside_handle = 140125971404544}
#12 Thread::Run() (this=0x561fcba40828) at ../mpd-0.21.20/src/thread/Thread.cxx:63
        thread = 
          @0x561fcba40828: {f = {instance_ = 0x561fcba40780, function = 0x561fc9ba9cc0 <BindMethodDetail::BindMethodWrapperGenerator2<AudioOutputControl, void (AudioOutputControl::*)(), &AudioOutputControl::Task, void>::Invoke(void*)>}, handle = 140125971404544, inside_handle = 140125971404544}
#13 Thread::ThreadProc(void*) (ctx=0x561fcba40828) at ../mpd-0.21.20/src/thread/Thread.cxx:92
        thread = 
          @0x561fcba40828: {f = {instance_ = 0x561fcba40780, function = 0x561fc9ba9cc0 <BindMethodDetail::BindMethodWrapperGenerator2<AudioOutputControl, void (AudioOutputControl::*)(), &AudioOutputControl::Task, void>::Invoke(void*)>}, handle = 140125971404544, inside_handle = 140125971404544}
#14 0x00007f71aa80c427 in start_thread (arg=<optimized out>) at pthread_create.c:479
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = 
              {cancel_jmp_buf = {{jmp_buf = {140125971404544, 4885672699282161056, 140125992380094, 140125992380095, 8396800, 140125971404544, -4814814122278814304, -4814857699284779616}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
#15 0x00007f71aa737ccf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Config file

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

metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
auto_update     "yes"

zeroconf_enabled                "yes"
zeroconf_name                   "Music Player"

input {
        plugin "curl"
}

audio_output {
        type            "shout"
        encoding        "ogg"                   # optional
        name            "MPD Stream"
        host            "127.0.0.1"
        port            "8000"
        mount           "/mpd.ogg"
        password        "bogus"
        quality         "5.0"
        format          "44100:16:2"
        protocol        "icecast2"              # optional
        user            "source"                # optional
        description     "My Stream Description" # optional
}
audio_output {
        type            "httpd"
        name            "Vorbis HTTP Stream"
        encoder         "vorbis"                # optional, vorbis or lame
        port            "8003"
        quality         "5.0"                   # do not define if bitrate is defined
        format          "44100:16:2"
}
audio_output {
        type            "httpd"
        name            "Flac HTTP Stream"
        encoder         "flac"          # optional, vorbis or lame
        port            "8002"
    compression "8"
        format          "44100:16:2"
}
audio_output {
        type            "pulse"
        name            "My Pulse Output"
replaygain                      "album"
filesystem_charset              "UTF-8"

I have multiple outputs defined, but only icecast and vorbis httpd is enabled. I realize I have zeroconf disabled at build time, I forgot to update my config to reflect it.

MaxKellermann commented 4 years ago

This crash occurs inside libsoxr; it is hard to tell if this is a MPD bug or a libsoxr bug. Please paste a disassembly of the crashing function, at least the region around the current instruction pointer, and a dump of all registers.

zsitvaij commented 4 years ago

Register dump

(gdb) i r
rax            0x0                 0
rbx            0x7f719ebfc938      140125971401016
rcx            0x1f6               502
rdx            0x0                 0
rsi            0x7f719ebfe050      140125971406928
rdi            0x7f719404c4d0      140125791372496
rbp            0x7f719ebfe050      0x7f719ebfe050
rsp            0x7f719ebfc900      0x7f719ebfc900
r8             0x0                 0
r9             0x1                 1
r10            0x0                 0
r11            0x8                 8
r12            0x2                 2
r13            0x7f719404c4d8      140125791372504
r14            0x1f6               502
r15            0x7f719ebfe050      140125971406928
rip            0x7f71ab06ba39      0x7f71ab06ba39 <_soxr_deinterleave_f+121>
eflags         0x10246             [ PF ZF IF RF ]
cs             0x33                51
ss             0x2b                43
ds             0x0                 0
es             0x0                 0
fs             0x0                 0
gs             0x0                 0

Disassembly

(gdb) disass /m
Dump of assembler code for function _soxr_deinterleave_f:
46      {

47      #undef DEINTERLEAVE_TO
48      #define DEINTERLEAVE_TO float
49        switch (data_type & 3) {
   0x00007f71ab06b9c0 <+0>:     push   %r13
   0x00007f71ab06b9c2 <+2>:     and    $0x3,%esi
   0x00007f71ab06b9c5 <+5>:     push   %r12
   0x00007f71ab06b9c7 <+7>:     vxorps %xmm1,%xmm1,%xmm1
   0x00007f71ab06b9cb <+11>:    push   %rbp
   0x00007f71ab06b9cc <+12>:    push   %rbx
   0x00007f71ab06b9cd <+13>:    mov    %rdx,%rbx
   0x00007f71ab06b9d0 <+16>:    sub    $0x8,%rsp
   0x00007f71ab06b9d4 <+20>:    mov    (%rdx),%rbp
   0x00007f71ab06b9d7 <+23>:    cmp    $0x2,%esi
   0x00007f71ab06b9da <+26>:    je     0x7f71ab06ba70 <_soxr_deinterleave_f+176>
   0x00007f71ab06b9e0 <+32>:    cmp    $0x3,%esi
   0x00007f71ab06b9e3 <+35>:    je     0x7f71ab06bb60 <_soxr_deinterleave_f+416>
   0x00007f71ab06b9e9 <+41>:    cmp    $0x1,%esi
   0x00007f71ab06b9ec <+44>:    je     0x7f71ab06bae0 <_soxr_deinterleave_f+288>

50          case SOXR_FLOAT32: DEINTERLEAVE_FROM(float, 1); break;
   0x00007f71ab06b9f2 <+50>:    cmp    $0x1,%r8d
   0x00007f71ab06b9f6 <+54>:    jbe    0x7f71ab06bc72 <_soxr_deinterleave_f+690>
   0x00007f71ab06b9fc <+60>:    test   %rcx,%rcx
   0x00007f71ab06b9ff <+63>:    je     0x7f71ab06ba5e <_soxr_deinterleave_f+158>
   0x00007f71ab06ba01 <+65>:    lea    -0x1(%r8),%r9d
   0x00007f71ab06ba05 <+69>:    mov    %rbp,%rsi
   0x00007f71ab06ba08 <+72>:    xor    %r10d,%r10d
   0x00007f71ab06ba0b <+75>:    lea    0x1(%r9),%r12
   0x00007f71ab06ba0f <+79>:    lea    0x0(,%r12,4),%r11
   0x00007f71ab06ba17 <+87>:    nopw   0x0(%rax,%rax,1)
   0x00007f71ab06ba20 <+96>:    lea    0x0(,%r10,4),%r8
   0x00007f71ab06ba28 <+104>:   xor    %eax,%eax
   0x00007f71ab06ba2a <+106>:   nopw   0x0(%rax,%rax,1)
   0x00007f71ab06ba30 <+112>:   vmovss (%rsi,%rax,4),%xmm0
   0x00007f71ab06ba35 <+117>:   mov    (%rdi,%rax,8),%rdx
=> 0x00007f71ab06ba39 <+121>:   vmovss %xmm0,(%rdx,%r8,1)
   0x00007f71ab06ba3f <+127>:   mov    %rax,%rdx
   0x00007f71ab06ba42 <+130>:   inc    %rax
   0x00007f71ab06ba45 <+133>:   cmp    %rdx,%r9
   0x00007f71ab06ba48 <+136>:   jne    0x7f71ab06ba30 <_soxr_deinterleave_f+112>
   0x00007f71ab06ba4a <+138>:   inc    %r10
   0x00007f71ab06ba4d <+141>:   add    %r11,%rsi
   0x00007f71ab06ba50 <+144>:   cmp    %r10,%rcx
   0x00007f71ab06ba53 <+147>:   jne    0x7f71ab06ba20 <_soxr_deinterleave_f+96>
   0x00007f71ab06ba55 <+149>:   imul   %r12,%rcx
   0x00007f71ab06ba59 <+153>:   lea    0x0(%rbp,%rcx,4),%rbp
   0x00007f71ab06bc72 <+690>:   mov    (%rdi),%rdi
   0x00007f71ab06bc75 <+693>:   lea    0x0(,%rcx,4),%r12
   0x00007f71ab06bc8b <+715>:   jmpq   0x7f71ab06ba5e <_soxr_deinterleave_f+158>

51          case SOXR_FLOAT64: DEINTERLEAVE_FROM(double, 0); break;
   0x00007f71ab06bae0 <+288>:   cmp    $0x1,%r8d
   0x00007f71ab06bae4 <+292>:   jbe    0x7f71ab06bc41 <_soxr_deinterleave_f+641>
   0x00007f71ab06baea <+298>:   test   %rcx,%rcx
   0x00007f71ab06baed <+301>:   je     0x7f71ab06ba5e <_soxr_deinterleave_f+158>
   0x00007f71ab06baf3 <+307>:   lea    -0x1(%r8),%r9d
   0x00007f71ab06baf7 <+311>:   mov    %rbp,%rsi
   0x00007f71ab06bafa <+314>:   xor    %r10d,%r10d
   0x00007f71ab06bafd <+317>:   lea    0x1(%r9),%r12
   0x00007f71ab06bb01 <+321>:   lea    0x0(,%r12,8),%r11
   0x00007f71ab06bb09 <+329>:   nopl   0x0(%rax)
   0x00007f71ab06bb10 <+336>:   lea    0x0(,%r10,4),%r8
   0x00007f71ab06bb18 <+344>:   xor    %eax,%eax
   0x00007f71ab06bb1a <+346>:   nopw   0x0(%rax,%rax,1)
   0x00007f71ab06bb20 <+352>:   mov    (%rdi,%rax,8),%rdx
   0x00007f71ab06bb24 <+356>:   vcvtsd2ss (%rsi,%rax,8),%xmm1,%xmm0
   0x00007f71ab06bb29 <+361>:   vmovss %xmm0,(%rdx,%r8,1)
   0x00007f71ab06bb2f <+367>:   mov    %rax,%rdx
   0x00007f71ab06bb32 <+370>:   inc    %rax
   0x00007f71ab06bb35 <+373>:   cmp    %rdx,%r9
   0x00007f71ab06bb38 <+376>:   jne    0x7f71ab06bb20 <_soxr_deinterleave_f+352>
   0x00007f71ab06bb3a <+378>:   inc    %r10
   0x00007f71ab06bb3d <+381>:   add    %r11,%rsi
   0x00007f71ab06bb40 <+384>:   cmp    %r10,%rcx
   0x00007f71ab06bb43 <+387>:   jne    0x7f71ab06bb10 <_soxr_deinterleave_f+336>
   0x00007f71ab06bb45 <+389>:   imul   %r12,%rcx
   0x00007f71ab06bb49 <+393>:   lea    0x0(%rbp,%rcx,8),%rbp
   0x00007f71ab06bc41 <+641>:   test   %rcx,%rcx
   0x00007f71ab06bc44 <+644>:   je     0x7f71ab06ba5e <_soxr_deinterleave_f+158>
   0x00007f71ab06bc4a <+650>:   mov    (%rdi),%rdx
   0x00007f71ab06bc4d <+653>:   xor    %eax,%eax
   0x00007f71ab06bc4f <+655>:   nop
   0x00007f71ab06bc50 <+656>:   vmovsd 0x0(%rbp,%rax,8),%xmm0
   0x00007f71ab06bc56 <+662>:   inc    %rax
   0x00007f71ab06bc59 <+665>:   vcvtsd2ss %xmm0,%xmm0,%xmm0
   0x00007f71ab06bc5d <+669>:   vmovss %xmm0,-0x4(%rdx,%rax,4)
   0x00007f71ab06bc63 <+675>:   cmp    %rax,%rcx
   0x00007f71ab06bc66 <+678>:   jne    0x7f71ab06bc50 <_soxr_deinterleave_f+656>
   0x00007f71ab06bc68 <+680>:   lea    0x0(%rbp,%rcx,8),%rbp
   0x00007f71ab06bc6d <+685>:   jmpq   0x7f71ab06ba5e <_soxr_deinterleave_f+158>

52          case SOXR_INT32:   DEINTERLEAVE_FROM(int32_t, 0); break;
   0x00007f71ab06ba70 <+176>:   cmp    $0x1,%r8d
   0x00007f71ab06ba74 <+180>:   jbe    0x7f71ab06bbe0 <_soxr_deinterleave_f+544>
   0x00007f71ab06ba7a <+186>:   test   %rcx,%rcx
   0x00007f71ab06ba7d <+189>:   je     0x7f71ab06ba5e <_soxr_deinterleave_f+158>
   0x00007f71ab06ba7f <+191>:   lea    -0x1(%r8),%r9d
   0x00007f71ab06ba83 <+195>:   mov    %rbp,%rsi
   0x00007f71ab06ba86 <+198>:   xor    %r10d,%r10d
   0x00007f71ab06ba89 <+201>:   lea    0x1(%r9),%r12
   0x00007f71ab06ba8d <+205>:   lea    0x0(,%r12,4),%r11
   0x00007f71ab06ba95 <+213>:   data16 nopw %cs:0x0(%rax,%rax,1)
   0x00007f71ab06baa0 <+224>:   lea    0x0(,%r10,4),%r8
   0x00007f71ab06baa8 <+232>:   xor    %eax,%eax
   0x00007f71ab06baaa <+234>:   nopw   0x0(%rax,%rax,1)
   0x00007f71ab06bab0 <+240>:   mov    (%rdi,%rax,8),%rdx
   0x00007f71ab06bab4 <+244>:   vcvtsi2ssl (%rsi,%rax,4),%xmm1,%xmm0
   0x00007f71ab06bab9 <+249>:   vmovss %xmm0,(%rdx,%r8,1)
   0x00007f71ab06babf <+255>:   mov    %rax,%rdx
   0x00007f71ab06bac2 <+258>:   inc    %rax
   0x00007f71ab06bac5 <+261>:   cmp    %r9,%rdx
   0x00007f71ab06bac8 <+264>:   jne    0x7f71ab06bab0 <_soxr_deinterleave_f+240>
   0x00007f71ab06baca <+266>:   inc    %r10
   0x00007f71ab06bacd <+269>:   add    %r11,%rsi
   0x00007f71ab06bad0 <+272>:   cmp    %r10,%rcx
   0x00007f71ab06bad3 <+275>:   jne    0x7f71ab06baa0 <_soxr_deinterleave_f+224>
   0x00007f71ab06bad5 <+277>:   jmpq   0x7f71ab06ba55 <_soxr_deinterleave_f+149>
   0x00007f71ab06bada <+282>:   nopw   0x0(%rax,%rax,1)
   0x00007f71ab06bbe0 <+544>:   test   %rcx,%rcx
   0x00007f71ab06bbe3 <+547>:   je     0x7f71ab06ba5e <_soxr_deinterleave_f+158>
   0x00007f71ab06bbe9 <+553>:   mov    (%rdi),%rsi
   0x00007f71ab06bbec <+556>:   xor    %edx,%edx
   0x00007f71ab06bbee <+558>:   xchg   %ax,%ax
   0x00007f71ab06bbf0 <+560>:   mov    0x0(%rbp,%rdx,4),%eax
   0x00007f71ab06bbf4 <+564>:   inc    %rdx
   0x00007f71ab06bbf7 <+567>:   vcvtsi2ss %eax,%xmm1,%xmm0
   0x00007f71ab06bbfb <+571>:   vmovss %xmm0,-0x4(%rsi,%rdx,4)
   0x00007f71ab06bc01 <+577>:   cmp    %rdx,%rcx
   0x00007f71ab06bc04 <+580>:   jne    0x7f71ab06bbf0 <_soxr_deinterleave_f+560>
   0x00007f71ab06bc06 <+582>:   lea    0x0(%rbp,%rcx,4),%rbp
   0x00007f71ab06bc0b <+587>:   jmpq   0x7f71ab06ba5e <_soxr_deinterleave_f+158>

53          case SOXR_INT16:   DEINTERLEAVE_FROM(int16_t, 0); break;
   0x00007f71ab06ba5e <+158>:   mov    %rbp,(%rbx)
   0x00007f71ab06ba61 <+161>:   add    $0x8,%rsp
   0x00007f71ab06ba65 <+165>:   pop    %rbx
   0x00007f71ab06ba66 <+166>:   pop    %rbp
   0x00007f71ab06ba67 <+167>:   pop    %r12
   0x00007f71ab06ba69 <+169>:   pop    %r13
   0x00007f71ab06ba6b <+171>:   retq   
   0x00007f71ab06ba6c <+172>:   nopl   0x0(%rax)
   0x00007f71ab06bb4e <+398>:   mov    %rbp,(%rbx)
   0x00007f71ab06bb51 <+401>:   add    $0x8,%rsp
   0x00007f71ab06bb55 <+405>:   pop    %rbx
   0x00007f71ab06bb56 <+406>:   pop    %rbp
   0x00007f71ab06bb57 <+407>:   pop    %r12
   0x00007f71ab06bb59 <+409>:   pop    %r13
   0x00007f71ab06bb5b <+411>:   retq   
   0x00007f71ab06bb5c <+412>:   nopl   0x0(%rax)
   0x00007f71ab06bb60 <+416>:   cmp    $0x1,%r8d
   0x00007f71ab06bb64 <+420>:   jbe    0x7f71ab06bc10 <_soxr_deinterleave_f+592>
   0x00007f71ab06bb6a <+426>:   test   %rcx,%rcx
   0x00007f71ab06bb6d <+429>:   je     0x7f71ab06ba5e <_soxr_deinterleave_f+158>
   0x00007f71ab06bb73 <+435>:   lea    -0x1(%r8),%r10d
   0x00007f71ab06bb77 <+439>:   xor    %r11d,%r11d
   0x00007f71ab06bb7a <+442>:   mov    %rbp,%r8
   0x00007f71ab06bb7d <+445>:   lea    0x1(%r10),%r13
   0x00007f71ab06bb81 <+449>:   lea    0x0(%r13,%r13,1),%r12
   0x00007f71ab06bb86 <+454>:   nopw   %cs:0x0(%rax,%rax,1)
   0x00007f71ab06bb90 <+464>:   lea    0x0(,%r11,4),%r9
   0x00007f71ab06bb98 <+472>:   xor    %edx,%edx
   0x00007f71ab06bb9a <+474>:   nopw   0x0(%rax,%rax,1)
   0x00007f71ab06bba0 <+480>:   movswl (%r8,%rdx,2),%eax
   0x00007f71ab06bba5 <+485>:   mov    (%rdi,%rdx,8),%rsi
   0x00007f71ab06bba9 <+489>:   vcvtsi2ss %eax,%xmm1,%xmm0
   0x00007f71ab06bbad <+493>:   mov    %rdx,%rax
   0x00007f71ab06bbb0 <+496>:   vmovss %xmm0,(%rsi,%r9,1)
   0x00007f71ab06bbb6 <+502>:   inc    %rdx
   0x00007f71ab06bbb9 <+505>:   cmp    %rax,%r10
   0x00007f71ab06bbbc <+508>:   jne    0x7f71ab06bba0 <_soxr_deinterleave_f+480>
   0x00007f71ab06bbbe <+510>:   inc    %r11
   0x00007f71ab06bbc1 <+513>:   add    %r12,%r8
   0x00007f71ab06bbc4 <+516>:   cmp    %r11,%rcx
   0x00007f71ab06bbc7 <+519>:   jne    0x7f71ab06bb90 <_soxr_deinterleave_f+464>
   0x00007f71ab06bbc9 <+521>:   imul   %r13,%rcx
   0x00007f71ab06bbcd <+525>:   lea    0x0(%rbp,%rcx,2),%rbp
   0x00007f71ab06bbd2 <+530>:   mov    %rbp,(%rbx)
   0x00007f71ab06bbd5 <+533>:   add    $0x8,%rsp
   0x00007f71ab06bbd9 <+537>:   pop    %rbx
   0x00007f71ab06bbda <+538>:   pop    %rbp
   0x00007f71ab06bbdb <+539>:   pop    %r12
   0x00007f71ab06bbdd <+541>:   pop    %r13
   0x00007f71ab06bbdf <+543>:   retq   
   0x00007f71ab06bc10 <+592>:   test   %rcx,%rcx
   0x00007f71ab06bc13 <+595>:   je     0x7f71ab06ba5e <_soxr_deinterleave_f+158>
   0x00007f71ab06bc19 <+601>:   mov    (%rdi),%rsi
   0x00007f71ab06bc1c <+604>:   xor    %edx,%edx
   0x00007f71ab06bc1e <+606>:   xchg   %ax,%ax
   0x00007f71ab06bc20 <+608>:   movswl 0x0(%rbp,%rdx,2),%eax
   0x00007f71ab06bc25 <+613>:   inc    %rdx
   0x00007f71ab06bc28 <+616>:   vcvtsi2ss %eax,%xmm1,%xmm0
   0x00007f71ab06bc2c <+620>:   vmovss %xmm0,-0x4(%rsi,%rdx,4)
   0x00007f71ab06bc32 <+626>:   cmp    %rdx,%rcx
   0x00007f71ab06bc35 <+629>:   jne    0x7f71ab06bc20 <_soxr_deinterleave_f+608>
   0x00007f71ab06bc37 <+631>:   lea    0x0(%rbp,%rcx,2),%rbp
   0x00007f71ab06bc3c <+636>:   jmpq   0x7f71ab06ba5e <_soxr_deinterleave_f+158>

End of assembler dump.

EDIT: I amended the disassembly with /m to associate source lines with. Thanks for looking into this!

MaxKellermann commented 4 years ago

libsoxr source code is very obscure and riddled with macros... shudder.... This:

   0x00007f71ab06ba30 <+112>:   vmovss (%rsi,%rax,4),%xmm0
   0x00007f71ab06ba35 <+117>:   mov    (%rdi,%rax,8),%rdx
=> 0x00007f71ab06ba39 <+121>:   vmovss %xmm0,(%rdx,%r8,1)

is from data-io.c:

    dest[i][j] = (DEINTERLEAVE_TO)*src++;

Here, dest=%rdi=0x7f719404c4d0 and i=%rax=0 but dest[0]=NULL, so it's trying to write to the NULL pointer. This pointer however is not given by MPD; it is allocated internally by libsoxr:

STATIC real * _soxr_input(rate_t * p, real const * samples, size_t n)
{
  if (p->flushing)
    return 0;
  p->samples_in += (int64_t)n;
  return fifo_write(&p->stages[0].fifo, (int)n, samples);
}

So the null pointer is generated while flushing... the code in version 0.1.2 however looked like this:

static sample_t * rate_input(rate_t * p, sample_t const * samples, size_t n)
{
  p->samples_in += n;
  return fifo_write(&p->stages[0].fifo, (int)n, samples);
}

Which means: this is a breaking libsoxr API change, but I can't find any documentation. Not even the NEWS file mentions anything related.

Bottom line: libsoxr fucked up.

MaxKellermann commented 4 years ago

This very obscure badly documented doing-everything-in-one commit broke it: https://sourceforge.net/p/soxr/code/ci/52888cd410ae356bf3aa26d8fa106754b8fd8990 Given that the code is extremely ugly, and there is no API documentation and no usable changelog, and now this crash bug, maybe the best idea would be to remove libsoxr support from MPD ... or refuse to build with 0.1.3 for now.

zsitvaij commented 4 years ago

Thanks! I'll recompile with another resampling method, I don't remember the rationale for choosing soxr in the first place.

MaxKellermann commented 4 years ago

You can switch at runtime between all resamplers that have been enabled at compile time: https://www.musicpd.org/doc/html/plugins.html#resampler-plugins

zsitvaij commented 4 years ago

I see "internal" would have worked, but I didn't have libsamplerate enabled until now, and a recompile was under a minute.

RobSykes commented 4 years ago

Looking at the backtrace above, I can see that soxr_process is being called with an input size of 502. This doesn’t seem consistent with the analysis ‘the null pointer is generated while flushing’, since when flushing, no input should be being supplied. I wonder, is it possible that MPD is attempting to reuse a soxr context without having called SoxrPcmResampler::Reset()?

MaxKellermann commented 4 years ago

Is that necessary? Where is that documented?

RobSykes commented 4 years ago

It seems so: a simple standalone test where I tried to use a soxr context for two consecutive streams (with flushing) either succeeds or fails with or without using soxr_clear respectively. However, if this is what is happening for the OP, not sure why it would be intermittent. Wondering if seamless transition between tracks with the same sample-rate (e.g. a segue) which should have no flushing, no reset/clear, might be involved here.

The soxr documentation on this is not as explicit as it might be; soxr.h has: setting `in' to NULL when no data is available nor shall be available, and soxr_clear() as: Ready for fresh signal, same config.

MaxKellermann commented 4 years ago

"not as explicit as it might be" is an understatement. The "documentation" is not only not explicit, it is also not even implicit. Nothing in these brief comments tells me that calling soxr_clear() is necessary, ever. This is the kind of thing which is utterly important to document - it is a vital part of the semantic API of a library.

RobSykes commented 4 years ago

Bump, if anyone can help with the following, I'd be very interested to hear: "Looking at the backtrace above, I can see that soxr_process is being called with an input size of 502. This doesn’t seem consistent with the analysis ‘the null pointer is generated while flushing’, since when flushing, no input should be being supplied. I wonder, is it possible that MPD is attempting to reuse a soxr context without having called SoxrPcmResampler::Reset()? However, if this is what is happening for the OP, not sure why it would be intermittent."

RobSykes commented 4 years ago

@MaxKellermann, it would be good to be able get to the bottom of this issue—are you able to help with the above questions?

mrusme commented 2 years ago

I seem to be having a similar issue:

ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 0, dts 0
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: All info found
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0: start_time: 0 duration: 240.043
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 1: start_time: 0 duration: 240.043
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: format: start_time: 0 duration: 240.043 (estimate from stream) bitrate=255 kb/s
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: After avformat_find_stream_info() pos: 67 bytes read:94115 seeks:2 frames:2
ffmpeg: codec 'aac'
decoder: audio_format=48000:f:2, seekable=true
client: [12] command returned 0
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 1, dts 21333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 2, dts 42667
playlist: queue song 18:"infected_mushroom/infected_mushroom-blue_rythmic_night__feat._i._zen_-128kbps.mp3"
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 3, dts 64000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 4, dts 85333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 5, dts 106667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 6, dts 128000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 7, dts 149333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 8, dts 170667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 9, dts 192000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 10, dts 213333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 11, dts 234667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 12, dts 256000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 13, dts 277333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 14, dts 298667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 15, dts 320000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 16, dts 341333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 17, dts 362667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 18, dts 384000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 19, dts 405333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 20, dts 426667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 21, dts 448000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 22, dts 469333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 23, dts 490667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 24, dts 512000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 25, dts 533333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 26, dts 554667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 27, dts 576000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 28, dts 597333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 29, dts 618667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 30, dts 640000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 31, dts 661333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 32, dts 682667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 33, dts 704000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 34, dts 725333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 35, dts 746667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 36, dts 768000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 37, dts 789333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 38, dts 810667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 39, dts 832000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 40, dts 853333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 41, dts 874667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 42, dts 896000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 43, dts 917333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 44, dts 938667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 45, dts 960000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 46, dts 981333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 47, dts 1002667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 48, dts 1024000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 49, dts 1045333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 50, dts 1066667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 51, dts 1088000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 52, dts 1109333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 53, dts 1130667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 54, dts 1152000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 55, dts 1173333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 56, dts 1194667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 57, dts 1216000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 58, dts 1237333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 59, dts 1258667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 60, dts 1280000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 61, dts 1301333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 62, dts 1322667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 63, dts 1344000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 64, dts 1365333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 65, dts 1386667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 66, dts 1408000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 67, dts 1429333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 68, dts 1450667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 69, dts 1472000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 70, dts 1493333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 71, dts 1514667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 72, dts 1536000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 73, dts 1557333
output: opened "mpd pipewire" (pipewire) audio_format=48000:f:2
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 74, dts 1578667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 75, dts 1600000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 76, dts 1621333
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 77, dts 1642667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 78, dts 1664000
soxr: soxr engine 'cr32s'
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 79, dts 1685333
soxr: soxr precision=20, phase_response=50.00, passband_end=0.91, stopband_begin=1.00
soxr: samplerate conversion ratio to 0.92
output: converting in=48000:f:2 -> f=48000:f:2 -> out=44100:16:2
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 80, dts 1706667
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 81, dts 1728000
ffmpeg/mov,mp4,m4a,3gp,3g2,mj2: stream 0, sample 82, dts 1749333
[1]    2254 segmentation fault  mpd --no-daemon --verbose --stdout
 △ ~ mpd --version                                                                                                                                                                                          10m
Music Player Daemon 0.23.9 (0.23.9)
Copyright 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2021 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

Storage plugins:
 local

Decoders plugins:
 [mad] mp3 mp2
 [mpg123] mp3
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [audiofile] wav au aiff aif
 [dsdiff] dff
 [dsf] dsf
 [hybrid_dsd] m4a
 [faad] aac
 [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:
 soxr

Tag plugins:
 id3tag

Output plugins:
 shout null fifo pipe alsa openal pipewire httpd recorder

Encoder plugins:
 null vorbis lame wave flac

Archive plugins:
 [bz2] bz2
 [zzip] zip

Input plugins:
 file io_uring archive alsa qobuz curl ffmpeg

Playlist plugins:
 extm3u m3u pls soundcloud flac cue embcue

Protocols:
 file:// alsa:// ftp:// ftps:// gopher:// hls+http:// hls+https:// http:// https:// mmsh:// mmst:// qobuz:// rtmp:// rtmpe:// rtmps:// rtmpt:// rtmpte:// rtp:// rtsp:// rtsps:// scp:// sftp:// smb:// srtp://

Other features:
 dbus epoll icu inotify ipv6 tcp un
MaxKellermann commented 2 years ago

@mrusme your post was not helpful because it does not contain a backtrace. So far, we only know it's "similar" because it also crashes, but that's useless for debugging this issue.

mrusme commented 2 years ago

@MaxKellermann understood, will update MPD to the latest GitHub commit and try again with gdb/strace or similar tooling. However, if running --verbose is not helpful it might be worth increasing the verbosity in order to at least get a bit more insights out of these kind of crashes. I'd argue that not everyone using mpd is knowledgeable enough to backtrace a segfault, so maybe a little more debug output might be helpful in first place. :-)