Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Oct 2016 14:28:27 +0200
From:      Peter <pmc@citylink.dinoex.sub.org>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Re: Dying jail
Message-ID:  <nuvg9j$uca$1@oper.dinoex.de>
In-Reply-To: <581064BB.1030500@rdtc.ru>
References:  <581064BB.1030500@rdtc.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Eugene Grosbein wrote:
> Hi!
>
> Recently I've upgraded one of my server running 9.3-STABLE with jail containing 4.11-STABLE system.
> The host was source-upgraded upto 10.3-STABLE first and next to 11.0-STABLE
> and jail configuration migrated to /etc/jail.conf. The jail kept intact.
>
> "service jail start" started the jail successfully
> but "service jail restart" fails due to jail being stuck in "dying" state for long time:
> "jls" shows no running jails and "jls -d" shows the dying jail.

Same issue here. During upgrade to 10 I wrote a proper jail.conf,
and, as this is now a much more transparent handling, I also began to
start+stop my jails individually w/o reboot.
I found the same issue: often jails do not want to fully terminate, but
stay in the "dying" state - sometimes for a minute or so, but sometimes
very long (indefinite).

It seems this is not related to remaining processes or open files (there
are none) but to network connections/sockets which are still present.
Probably these connections can be displayed with netstat, and probably
netstat -x shows some decreasing counters associated with them - I have
not yet found the opportunity to figure out what they exactly mean, but
anyway it seems like there may be long times involved (hours? forever?),
unless one finds the proper connection and terminates both ends.

There seems to be no other way to deliberately "kill" such connections
and thereby terminate the jail, so the proposal to let it have a new 
number might be the only feasible approach. (I dont like it, I got used
to the numbers of my jails.)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?nuvg9j$uca$1>