Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Jul 2011 23:43:22 -0600
From:      Jamie Gritton <jamie@FreeBSD.org>
To:        freebsd-jail@FreeBSD.org
Subject:   Re: New jail(8) with configuration files, not yet in head
Message-ID:  <4E15477A.2000909@FreeBSD.org>
In-Reply-To: <CALBk6yLEnJuBQnwdDracAScGj8hsopoK8enQTE=v5Tr9qSoXmQ@mail.gmail.com>
References:  <4E114EA9.4000605@FreeBSD.org>	<CALBk6y%2BYWzOUzju-yN-bREX=4PY1pfhqX=QhW3K2qAExXkn8Mg@mail.gmail.com>	<4E123594.6030304@FreeBSD.org> <CALBk6yLEnJuBQnwdDracAScGj8hsopoK8enQTE=v5Tr9qSoXmQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
The delay you're seeing is $rcshutdown_timeout (default 30 seconds)
which will kill rc.shutdown if it doesn't successfully stop all the
jail's processes. After that, it will forcibly kill all (jailed) processes.

jail(8) has a similar thing going where after any stop scripts have run,
it will send SIGTERM to remaining processes and then wait up to
stop.timeout (default 10 seconds) for them to die before removing the
jail anyway. If the jail has a stop script like /etc/rc.shutdown,
there's seldom any further delay.

- Jamie


On 07/04/11 16:13, Brandon Gooch wrote:
 > Here's another take on perhaps the same
 > underlying issue.
 >
 > If I've jexec'd into the jail, say something like this:
 >
 > # jexec testjail /bin/tcsh
 >
 > and then I try removing the jail from another terminal (jail -r
 > testjail), the jail -r command hangs for about 15-20 seconds, I
 > suppose waiting for the jexec'd shell to exit, before finally killing
 > the jail off outright. I don't see the aforementioned behavior (jail:
 > testjail: (null): failed).
 >
 > Here's what it looks like:
 >
 > # jail -r ports
 > Stopping ftpd.
 > Waiting for PIDS: 32845.
 > Stopping cron.
 > .
 > Terminated
 > ^T
 > load: 0.19  cmd: jail 32860 [kqread] 1.05r 0.00u 0.00s 0% 1696k
 > ^T
 > load: 0.09  cmd: jail 32475 [kqread] 10.09r 0.00u 0.00s 0% 1692k
 >
 > ...then testjail is finally "Killed". Some sort of race condition maybe?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E15477A.2000909>