For whatever reason the PID that mpd starts with (the one that gets written to /var/run/mpd) isn't the PID of the active mpd process(es) after being started. As a result, when the init script trys to kill mpd with "start-stop-daemon" it refers to a PID that no longer exists and fails. This isn't such a big deal unless you're using the state saving feature of mpd. If mpd is killed cleanly then the state gets saved fine and it picks up exactly where it left off upon next start - neat! :) However as the init script has failed to kill it cleanly it dies when the system goes down and fails to save state which causes it to restart in whatever state it managed to save at some point in the past. As a workaround I've commented out the "start-stop-daemon" line in the stop() function of the init script and substituted a killall but I don't know if this is really the right fix. Reproducible: Always Steps to Reproduce: 1. Enable state saving by defining "state_file" in /etc/mpd.conf 2. Start mpd via the mpd init script 3. Use mpd like you normally would 4. Stop mpd via the init script. 5. Start mpd via the init script. 6. :( Actual Results: It restarts at the same state everytime from whenever it last saved state. Expected Results: Expected it to save state upon stop and then start where it left off upon next being run. Portage 2.0.50-r6 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.6-rc3-love4) ================================================================= System uname: 2.6.6-rc3-love4 i686 AMD Athlon(tm) Processor Gentoo Base System version 1.4.10 distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-mcpu=athlon-tbird -march=athlon-tbird -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-mcpu=athlon-tbird -march=athlon-tbird -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distcc sandbox userpriv" GENTOO_MIRRORS="http://gentoo.seren.com/gentoo http://gentoo.mirrors.pair.com/ http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://192.168.23.1/gentoo-portage" USE="3dnow X aalib alsa apm audiofile avi berkdb cdr crypt cups curl dvd encode flac foomaticdb gif gimpprint gphoto2 gstreamer gtk gtk2 imagemagick imap imlib java jpeg kde libg++ libwww mad maildir mmx moznocompose moznoirc moznomail mpeg ncurses oggvorbis opengl pam pda pdflib perl png python qt quicktime readline samba sdl slang spell ssl svga tcpd truetype usb x86 xml2 xmms xv zlib"
Created attachment 31076 [details] Here's a copy of my /etc/mpd.conf
wgat version of mpd are you using?
Created attachment 31161 [details] mpd version
here's another one for youu Jon.
Created attachment 31958 [details, diff] mpd init script patch Here's what I've done to patch the initscript If that helps any. I changed it to not bother to record the pid on start since it quickly becomes irrelevant. It stops based on start-stop-daemon's --name functionality instead.
Actually, I went with --exec :) Marking it as a dupe of 51748, end result being it's fixed. *** This bug has been marked as a duplicate of 51748 ***