Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 137170 - start-stop-daemon --exec cannot find binary when it is in a unionfs
Summary: start-stop-daemon --exec cannot find binary when it is in a unionfs
Status: VERIFIED LATER
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-18 06:27 UTC by Alexandre Nuno Milheiro
Modified: 2006-06-24 06:02 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Nuno Milheiro 2006-06-18 06:27:53 UTC
I am not sure if it is a unionfs bug, a kernel bug or a start-stop-daemon bug, or simply a  misfeature, but when a daemon binary is in a unionfs mounted file system start-stop-daemon can't stop it.

to spare hd space I have my usr filesystem mount as a unionfs with a squashfs ro part and a rw part on a ext3 fs, which i periodically recompress to the squashfs

for a better understanding her is part of the output of the mount command:

/dev/mapper/mainvg-usr.sqsh on /mnt/ro/usr type squashfs (ro)
unionfs on /usr type unionfs (rw,dirs=/mnt/rw/usr:/mnt/ro/usr=ro)

when start-stop-daemon starts for exemple esd sound daemon it uses the following comandline (from /etc/init.d/esound)
start-stop-daemon --start --quiet --background --exec /usr/bin/esd -- $ESD_START $ESD_OPTIONS

when start-stop-daemon stops the esd daemon it uses the following comandline (from /etc/init.d/esound)
start-stop-daemon --stop --quiet --exec /usr/bin/esd

but it returns (if I strip the --quiet option)
No /usr/bin/esd found running; none killed.

my understanding is that start-stop-daemon looks where /proc/(pidof esd)/exe point at to find the pid of esd and in my system it turns out that it points to:

ls -l /proc/12099/exe
lrwxrwxrwx 1 root root 0 Jun 18 14:24 /proc/12099/exe -> /mnt/ro/usr/bin/esd

this example apply for esd for esd and various other

I coul workaround this bug by changing the /etc/init.d/script but it certainly is not the right place to do it
Comment 1 SpanKY gentoo-dev 2006-06-18 09:14:23 UTC
correct, ssd looks at /proc/*/exe to locate the binary referred to by --exec

not sure there is a way to fix
Comment 2 Roy Marples (RETIRED) gentoo-dev 2006-06-18 09:26:14 UTC
Which baselayout version are you using?

1.11 an earlier use s-s-d to stop, which I think is what you're using.
1.12 on the other hand intercepts the s-s-d calls and is pure bash when stopping and may work for you.

Another option is to see if we could test to see if daemon_path could be in a unionfs and try all possible branches ....... not sure if I like doing that though.
Comment 3 Alexandre Nuno Milheiro 2006-06-21 04:41:53 UTC
sorry I forgot to specify it my version is

sys-apps/baselayout-1.11.14-r8

Really I'm not sure it is a start-stop-daemon.

Since the daemon is started using the original install path it should be reported in proc with this path.

One solution could be for sssd to use strip directories from /proc/<pid>/exe and use only daemon name.
Comment 4 Roy Marples (RETIRED) gentoo-dev 2006-06-21 06:08:52 UTC
(In reply to comment #3)
> sorry I forgot to specify it my version is
> 
> sys-apps/baselayout-1.11.14-r8

Try 1.12.1 :)

> 
> Really I'm not sure it is a start-stop-daemon.
> 
> Since the daemon is started using the original install path it should be
> reported in proc with this path.
> 
> One solution could be for sssd to use strip directories from /proc/<pid>/exe
> and use only daemon name.

Unacceptable as /bin/foo is not the same daemon as /usr/bin/foo

Comment 5 Alexandre Nuno Milheiro 2006-06-24 03:19:49 UTC
(In reply to comment #2)
> Which baselayout version are you using?
> 
> 1.11 an earlier use s-s-d to stop, which I think is what you're using.
> 1.12 on the other hand intercepts the s-s-d calls and is pure bash when
> stopping and may work for you.

You're right with sys-apps/baselayout-1.12.1 I don't have this problem anymore. So for me this bug is resolved so far.

Thanks
Comment 6 Roy Marples (RETIRED) gentoo-dev 2006-06-24 06:02:03 UTC
Closed then :)