Summary: | media-sound/mpd-0.17.4-r2 crashes on boot | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | aditsu <aditsu> |
Component: | Current packages | Assignee: | Christoph Mende (RETIRED) <angelos> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | hwoarang, romockee, sound |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
aditsu
2013-07-01 19:03:49 UTC
It should have printed something relevant in your syslog (or /var/lib/mpd/log by default). (In reply to Jeroen Roovers from comment #1) > It should have printed something relevant in your syslog (or > /var/lib/mpd/log by default). Maybe it should have, but it didn't. I even enabled verbose logging in mpd.conf Well, sorry, but I can't help you without any error message/backtrace/anything. I guess it doesn't crash if you don't start it on boot and start it manually? (In reply to Christoph Mende from comment #3) > Well, sorry, but I can't help you without any error > message/backtrace/anything. Well, you have the steps to reproduce it, it happens 100% of the time. In fact, now I found a new and better way to reproduce it: # /etc/init.d/net.wifi stop * Stopping sshd ... [ ok ] * Unmounting network filesystems ... [ ok ] * Bringing down interface wifi * Stopping dhcpcd on wifi ... [ ok ] * Stopping wpa_cli on wifi ... [ ok ] * Stopping wpa_supplicant on wifi ... [ ok ] # /etc/init.d/mpd stop * Stopping Music Player Daemon ... [ ok ] # /etc/init.d/mpd start * Bringing up interface wifi * Starting wpa_supplicant on wifi ... ioctl[SIOCSIWAP]: Operation not permitted [ ok ] * Starting wpa_cli on wifi ... [ ok ] * Backgrounding ... ... * WARNING: net.wifi has started, but is inactive * WARNING: netmount is scheduled to start when net.wifi has started * Starting Music Player Daemon ... [ ok ] # rc-status|grep mpd mpd [ crashed ] > I guess it doesn't crash if you don't start it on boot and start it manually? If I start it when I'm online, everything is fine. I can't reproduce this on 0.18.9, please reopen if it still happens. # /etc/init.d/net.wifi stop * Stopping noip ... [ ok ] * Setting noip addresses to 0.0.0.0 ... [ ok ] * Stopping nginx ... [ ok ] * Unmounting network filesystems ... [ ok ] * Bringing down interface wifi * Stopping dhcpcd on wifi ... [ ok ] * Stopping wpa_cli on wifi ... [ ok ] * Stopping wpa_supplicant on wifi ... [ ok ] # /etc/init.d/mpd stop * Stopping Music Player Daemon ... [ ok ] # /etc/init.d/mpd start * Bringing up interface wifi * Starting wpa_supplicant on wifi ... Successfully initialized wpa_supplicant ioctl[SIOCSIWAP]: Operation not permitted [ ok ] * Starting wpa_cli on wifi ... [ ok ] * Backgrounding ... ... * WARNING: net.wifi has started, but is inactive * WARNING: netmount is scheduled to start when net.wifi has started * Starting Music Player Daemon ... [ ok ] # rc-status|grep mpd mpd [ crashed ] # eix -e media-sound/mpd [I] media-sound/mpd Available versions: 0.17.4-r2 0.17.6 ~0.18.4 ~0.18.5 ~0.18.7 ~0.18.8 (~)0.18.9 {aac adplug +alsa ao audiofile bzip2 cdio +curl debug faad +ffmpeg +fifo flac fluidsynth gme +id3tag inotify ipv6 jack lame lastfmradio libmpdclient libsamplerate +mad mikmod mms modplug mpg123 musepack +network ogg openal opus oss pipe pulseaudio recorder sid sndfile soundcloud soup sqlite systemd tcpd twolame unicode vorbis wavpack wildmidi zeroconf zip} Installed versions: 0.18.9(04:34:38 23/03/2014)(alsa bzip2 curl ffmpeg fifo flac id3tag ipv6 mad network ogg opus tcpd unicode vorbis -adplug -ao -audiofile -cdio -debug -faad -fluidsynth -gme -inotify -jack -lame -libmpdclient -libsamplerate -mikmod -mms -modplug -mpg123 -musepack -openal -oss -pipe -pulseaudio -recorder -sid -sndfile -soundcloud -sqlite -systemd -twolame -wavpack -wildmidi -zeroconf -zip) Homepage: http://www.musicpd.org Description: The Music Player Daemon (mpd) What if you stop network and start mpd by hand instead of the init script? If that also crashes, you should be able to get a backtrace. (In reply to Christoph Mende from comment #7) > What if you stop network and start mpd by hand instead of the init script? > If that also crashes, you should be able to get a backtrace. If I do that, all I get is: socket: Failed to bind to '<my.local.ip.address>:6600': Cannot assign requested address Just to clarify, it's a 10.x.y.z address, not 127.x.y.z Oh, now I get it. MPD doesn't really crash. s-s-d just doesn't catch its error. I've added --wait to the init script so instead of showing a successful startup, you'll now see an error. The fact that mpd doesn't start is not a bug at all though. You're telling mpd to listen on a specific interface, so you need to ensure it is up. This can be done by either setting rc_depend_strict to YES in /etc/rc.conf or by overriding the dependencies in /etc/conf.d/mpd with rc_need="!net net.wifi". I'm not sure if s-s-d behavior (requiring --wait or just claiming startup was successful) is intended here. I'll ask the openrc people and file a bug for that if it's not. (In reply to Christoph Mende from comment #10) > The fact that mpd doesn't start is not a bug at all though. You're telling > mpd to listen on a specific interface, so you need to ensure it is up. This > can be done by either setting rc_depend_strict to YES in /etc/rc.conf or by > overriding the dependencies in /etc/conf.d/mpd with rc_need="!net net.wifi". Well, several things here: 1. When I start mpd, it actually already starts net.wifi automatically as you can see above. However, it doesn't seem to wait until it is fully started (including getting an ip address). 2. rc-status is only showing net.wifi, no other net.* service (although net.lo is also started). rc_depends_strict is not making any difference (I tried it now), or do I need to restart something else? 3. rc_need="!net net.wifi" in /etc/conf.d/mpd (new file) actually works - it schedules mpd to start when net.wifi is ready Thanks for the help (In reply to aditsu from comment #11) > Well, several things here: > 1. When I start mpd, it actually already starts net.wifi automatically as > you can see above. However, it doesn't seem to wait until it is fully > started (including getting an ip address). That's because it also starts net.lo which satisfied the "net" dependency. > 2. rc-status is only showing net.wifi, no other net.* service (although > net.lo is also started). rc_depends_strict is not making any difference (I > tried it now), or do I need to restart something else? In case you really used "rc_depends_strict", it's "rc_depend_strict", you got an extra "s". Otherwise, not sure why that didn't make a difference. > 3. rc_need="!net net.wifi" in /etc/conf.d/mpd (new file) actually works - it > schedules mpd to start when net.wifi is ready That's actually the proper solution (preferred over rc_depend_strict) anyway. (In reply to Christoph Mende from comment #12) > In case you really used "rc_depends_strict", it's "rc_depend_strict", you > got an extra "s". Typo, sorry. It was rc_depend_strict. > Otherwise, not sure why that didn't make a difference. I tested again, indeed it doesn't. Maybe it considers it started even though it's still inactive? Anyway, it works now with rc_need; I wonder if a note should be added for users that want mpd to listen on a specific ip? (In reply to aditsu from comment #13) > Anyway, it works now with rc_need; I wonder if a note should be added for > users that want mpd to listen on a specific ip? This issue is not specific to mpd, it is specific to openrc and every service that binds to a specific IP address. It is also documented in the official Gentoo wiki: https://wiki.gentoo.org/wiki/OpenRC#Dependency_behaviour |