Re: start-stop-daemon --exec is incorrect on unionfs systems
Forgot to mention: Please CC me your replies, as I don't read the list.
On Wed, Sep 19, 2007 at 08:49:54PM +0200, Tzafrir Cohen wrote:
> Hi
>
> Debian Live is a live CD system based on Debian:
> http://debian-live.alioth.debian.org/
>
> Debian-live uses a unionfs system. The root filesystem is squashfs.
>
> Let's look at exim4 on such a system. The init.d script seems to
> misbehave:
>
> debian:~# cat /var/run/exim4/exim.pid
> 5399
> debian:~# ls -l /proc/5399/exe
> lrwxrwxrwx 1 root root 0 2007-09-19 18:34 /proc/5399/exe ->
> /cow/usr/sbin/exim4
> debian:~# pgrep -l exim4
> 5399 exim4
> debian:~# /etc/init.d/exim4 stop
> Stopping MTA:No /usr/sbin/exim4 found running; none killed.
> exim4_listener.
> debian:~# pgrep -l exim4
> 5399 exim4
> debian:~# /etc/init.d/exim4 restart
> Stopping MTA for restart:.
> Restarting MTA: exim4.
> debian:~# pgrep -l exim4
> 5399 exim4
> 5466 exim4
>
> /etc/init.d/exim4 run eventually:
>
> start-stop-daemon --stop --oknodo --pidfile /var/run/exim4/exim.pid --oknodo --retry 30 --exec /usr/sbin/exim4
>
> It has found the PID file. But (from a later invocation of the exim
> init.d script):
>
> debian:~# ls -l /proc/5620/exe
> lrwxrwxrwx 1 root root 0 2007-09-19 18:45 /proc/5620/exe -> /cow/usr/sbin/exim4
>
> Which means that its executable is not /usr/sbin/exim4 .
> start-stop-daemon thinks that this is a new process that happened to get
> that same PID later on.
>
> (this is /cow , as I have installed the package on the live system. If
> the package was in the squashfs , this would be
> /filesystems.squashfs/usr/sbin/exim4 )
>
>
> What can be done about this?
>
> 1. Avoid using --exec . Probably risking some false kills.
> 2. Ignore the problem, and leave squashfs systems broken.
>
> Any other way out?
>
> --
> Tzafrir Cohen
> icq#16849755 jabber:tzafrir@jabber.org
> +972-50-7952406 mailto:tzafrir.cohen@xorcom.com
> http://www.xorcom.com iax:guest@local.xorcom.com/tzafrir
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir@jabber.org
+972-50-7952406 mailto:tzafrir.cohen@xorcom.com
http://www.xorcom.com iax:guest@local.xorcom.com/tzafrir
Reply to: