Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 181730 - incorrect stop of mpd (Music Player Daemon)
Summary: incorrect stop of mpd (Music Player Daemon)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Andrej Kacian (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-12 09:46 UTC by Alexey B.
Modified: 2013-09-14 13:14 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to fix a problem this mpd stop and restart (mpd-script.patch,235 bytes, patch)
2007-06-12 09:54 UTC, Alexey B.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey B. 2007-06-12 09:46:43 UTC
This bug detected in mpd starting script. When I try to restart or stop mpd, I take the error:

#/etc/init.d/mpd stop
 * Stopping Music Player Daemon ...
no pid_file specified in the config file

It occurs because of the mistake in function stop() in the script. There is no config file parameter at the commandline. I fix this trouble and attach the patch.

Reproducible: Always

Steps to Reproduce:
1.#/etc/init.d/mpd start
2.#/etc/init.d/mpd stop

Actual Results:  
 * Stopping Music Player Daemon ...
no pid_file specified in the config file

Expected Results:  
 * Stopping Music Player Daemon ...                                                            [ ok ]
Comment 1 Alexey B. 2007-06-12 09:54:37 UTC
Created attachment 121791 [details, diff]
patch to fix a problem this mpd stop and restart
Comment 2 Dawid Węgliński (RETIRED) gentoo-dev 2007-06-12 12:02:57 UTC
The /etc/mpd.conf file hould includes:
pid_file                        "/var/run/mpd/mpd.pid"

You are probably missing that line. Reopen if i'm wrong and reassign to bug-wranglers. Even if, that's not a Bugzilla bug.
Comment 3 Alexey B. 2007-06-12 13:40:52 UTC
Now I can see that the problem not in the script.

# strace -e trace=open mpd --kill
open("/etc/ld.so.cache", O_RDONLY)      = 3
open("/lib/libnsl.so.1", O_RDONLY)      = 3
open("/usr/lib/libasound.so.2", O_RDONLY) = 3
open("/lib/libm.so.6", O_RDONLY)        = 3
open("/lib/libpthread.so.0", O_RDONLY)  = 3
open("/usr/lib/libid3tag.so.0", O_RDONLY) = 3
open("/lib/libz.so.1", O_RDONLY)        = 3
open("/usr/lib/libmad.so.0", O_RDONLY)  = 3
open("/usr/lib/libmikmod.so.2", O_RDONLY) = 3
open("/lib/libdl.so.2", O_RDONLY)       = 3
open("/lib/libc.so.6", O_RDONLY)        = 3
open("/home/core/.mpdconf", O_RDONLY)   = 3
no pid_file specified in the config file
Process 11934 detached

Local config file, which was empty, open by mpd instead of global config file /etc/mpd.conf
When I remove this file, daemon stop procedure take a place without errors.
Comment 4 Alexey B. 2007-06-12 13:45:49 UTC
Where i can reassign this problem to fix it?
Comment 5 Andrej Kacian (RETIRED) gentoo-dev 2007-06-12 22:49:52 UTC
Fixed in CVS, thanks. I wonder why my mpd goes straight for /etc/mpd.conf unlike yours...