Subject: Re: [vserver] Ubuntu guest : killall5 error
From: Herbert Poetzl <herbert@13thfloor.at>
Date: Fri, 26 Sep 2008 00:15:34 +0200

On Thu, Sep 25, 2008 at 11:15:35PM +0200, Jean-François Leroux wrote:
> > well, with the sysv init style, you won't get an
> > init process inside the guest, and you should
> > not try to send signals to the host init :)

> That's curious, because inside my hardy guest I have this :
> root@hardy-guest:/# ps aux
> USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
> root         1  0.9  0.0   1596   544 ?        Ss   20:55   0:00 init [3]
								~~~~~~~~~
this init is the host's init, which gets 'shown'
inside the guest to make apps like ps or pstree
happy, it cannot be signalled or manipulated in
any way and it doesn't really belong to the guest
context at all (with sysv)

> syslog    6844  0.0  0.0   1932   640 ?        Ss   20:55   0:00
> /sbin/syslogd -u syslog
> root      6865  0.1  0.0    124    48 pts/0    S+   20:55   0:00 login
> root      6892  0.0  0.0   2880  1596 pts/1    Ss   20:55   0:00
> /bin/bash -login
> root      6906  0.0  0.0   2360   940 pts/1    R+   20:56   0:00 ps aux
> 
> and apps/init/style is set to 'sysv' (just checked again)...
> 
> > either use the 'plain' init style, (then you can
> > signal the guest init) or avoid messing with the
> > blend through init
> 
> When I use 'plain' the vserver doesn't stop. It just hangs for about
> 15 seconds. If I kill the command, then it stops after a while without
> any message.

then your guest shutdown (via init) is not
working properly, which can have various reasons
like:

 - improperly cleaned up scripts, which try to do
   things which cannot be done inside a guest

 - init is not terminating properly

 - your scripts take longer to shutdown than
   you expected (you might even need to raise the
   timout)

> With 'sysv' and sendsigs removed, it says:
> 
> A timeout occured while waiting for the vserver to finish and it will
> be killed by sending a SIGKILL signal. The following process list
> might be useful for finding out the reason of this behavior:
> 
> ----------------------------------------------------------------------
> ----------------------------------------------------------------------

unless you are using _very_ recent tools, this is 
some kind of bug of util-vserver, actually it should
show something there, but it doesn't ... Daniel has
more details on that ...

> I don't understand...

HTH,
Herbert