MusicPlayerDaemon / MPD

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

exception: Failed to read from file: Bad address #1876

Closed skidoo23 closed 1 year ago

skidoo23 commented 1 year ago

Bug report

Describe the bug

Since recent changes in master MPD rescans at startup all music files.

Expected Behavior

Normal and fast startup without rescanning music files.

Actual Behavior

See above.

Version

Music Player Daemon 0.24 (v0.23.13-965-g34182990e) 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 [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 [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 [sidplay] sid mus str prg P00 [ffmpeg] 264 265 302 3g2 3gp 4xm 669 722 aa aa3 aac aax ac3 ace acm act adf adp ads adx aea afc aiff aix al alias_pix alp amf amr amrnb amrwb ams anm ans apc ape apl apm apng aptx aptxhd aqt argo_asf argo_brp argo_cvg art asc asf asf_o ass ast au avc avi avif avr avs avs2 avs3 bcstm bethsoftvid bfi bfstm bin bink binka bit bitpacked bmp_pipe bmv boa bonk brender_pix brstm c2 c93 caf cdata cdg cdxl cgi cif cine codec2raw concat cri_pipe dash dat data daud dav dbm dds_pipe dfa dff dfpwm dif digi dirac diz dmf dnxhd dpx_pipe dsf dsicin dsm dss dst dtk dtm dts dtshd dv dvbsub dvbtxt dxa ea eac3 ec3 exr_pipe f32be f32le f4v f64be f64le fap far ffmetadata film_cpk fits flac flic flm flv frm fsb fwse g722 g723_1 g726 g726le g729 gdm gdv gem_pipe genh gif gif_pipe gsm gxf h261 h263 h264 h265 h26l hca hcom hdr_pipe hevc hls hnm ice ico idcin idf idx iff ifv ilbc image2 image2pipe imf imx ipmovie ipu ircam ism isma ismv iss it iv8 ivf ivr j2b j2k j2k_pipe jacosub jpeg_pipe jpegls_pipe jpegxl_pipe jv kux kvag laf libgme lmlm4 loas lrc lvf lxf m15 m2a m4a m4b m4v mac mca mcc mdl med mgsts microdvd mj2 mjpeg mjpg mk3d mka mks mkv mlp mlv mm mmcmp mmf mms mo3 mod mods moflex mov mp2 mp3 mp4 mpa mpc mpc8 mpeg mpegts mpegtsraw mpegvideo mpl2 mpo mptm msbc msf msnwctcp msp mt2 mtaf mtm mtv musx mv mvi mxf mxg nfo nist nsp nst nsv nut nuv obu ogg okt oma omg paf pam_pipe pbm_pipe pcx_pipe pfm_pipe pgm_pipe pgmyuv_pipe pgx_pipe phm_pipe photocd_pipe pictor_pipe pjs plm pmp png_pipe pp_bnk ppm ppm_pipe psd_pipe psm psp psxstr pt36 ptm pva pvf qcif qcp qdraw_pipe qoi_pipe r3d rco rcv rgb rka rl2 rm roq rpl rsd rso rt rtp rtsp s16be s24be s24le s32be s32le s337m s3m sami sap sb sbc sbg scc scd sdns sdp sdr2 sds sdx ser sf sfx sfx2 sga sgi_pipe shn sln smi smk smush sol son sox spdif sph srt ss2 st26 stk stl stm stp str sub sunrast_pipe sup svag svg_pipe svs sw swf tak tco tedcaptions thd thp tiertexseq tiff_pipe tmv tta txd txt ty ty+ u16be u24be u24le u32be u32le ub ul ult umx uw v v210 vag vb vbn_pipe vc1 vidc viv vividas vmd voc vpk vqe vqf vql vt vtt w64 wa wav way wc3movie webm webm_dash_manifest webp_pipe wow wsaud wsd wsvqa wtv wv wve xa xbin xbm_pipe xl xm xmd xmv xpk xpm_pipe xvag xwd_pipe xwma y4m yop yuv yuv10 rtp:// rtsp:// rtsps:// [pcm]

Filters: libsamplerate soxr

Tag plugins: id3tag

Output plugins: null fifo pipe alsa httpd snapcast

Encoder plugins: null vorbis opus lame wave flac

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

Input plugins: file io_uring archive alsa curl ffmpeg mms

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

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

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

Configuration

music_directory "/music" playlist_directory "/playlists" log_file "/var/log/mpd/mpd.log" state_file "/var/lib/mpd/state" user "mpd" bind_to_address "any" bind_to_address "/run/mpd/socket" port "6600" log_level "default" restore_paused "yes" auto_update "no" zeroconf_enabled "yes" zeroconf_name "Music Player Daemon @ %h" database { plugin "simple" path "/var/lib/mpd/tag_cache" cache_directory "/var/lib/mpd/cache" compress "no" } audio_output { type "httpd" tags "yes" name "httpd on port 8000" always_on "yes" encoder "lame" port "8000" bitrate "320" format "44100:16:2" max_clients "0" dscp_class "CS3" } audio_output { type "snapcast" name "SnapCast" format "48000:16:2" mixer_type "software" } audio_output { type "null" name "Null" mixer_type "none" } filesystem_charset "UTF-8" decoder { plugin "sidplay" songlength_database "/var/lib/mpd/Songlengths.md5" default_genre "SID" kernal "/var/lib/mpd/kernal" basic "/var/lib/mpd/basic" filter "true" } decoder { plugin "mad" enabled "yes" } decoder { plugin "mpg123" enabled "no" } decoder { plugin "ffmpeg" enabled "no" } decoder { plugin "mpcdec" enabled "yes" } audio_output { type "alsa" name "Intel HDA, ALC662" device "hw:CARD=Intel,DEV=0" mixer_type "hardware" mixer_device "hw:Intel" mixer_control "Master" } decoder { plugin "dsdiff" enabled "no" } decoder { plugin "dsf" enabled "no" } decoder { plugin "fluidsynth" enabled "no" } decoder { plugin "mikmod" enabled "no" } decoder { plugin "modplug" enabled "no" } decoder { plugin "wildmidi" enabled "no" } resampler { plugin "soxr" quality "high" threads "0" }

Log

(...) sndfile: libsndfile-1.2.2 simple_db: reading DB exception: Failed to read from file: Bad address curl: version 8.3.0 curl: with GnuTLS/3.8.1 (...)

OS Debian testing on x64 hardware. Music files on separate ext4 partion. Mount options nosuid,noatime,commit=600

MaxKellermann commented 1 year ago

Your bug title and the full text describe two different problems. So ... which one is the problem?

MaxKellermann commented 1 year ago

e521b58b01ea973206af81aed041226976885521 is a fix candidate for one of your two problems

skidoo23 commented 1 year ago

I will try the fix and let you know the result. After a coffee I will try to understand why there are two problems.

skidoo23 commented 1 year ago

e521b58 is a fix candidate for one of your two problems

(Both) issues fixed. No exceptions anymore and no rescans of music files. Thanks Max for your fix and your very fast response.