On Wed, Dec 09, 2020 at 02:00:37PM +1100, Dewayne Geraghty wrote: ! On a jail with config: ! exec.start = "/bin/sh -x /etc/rc"; ! exec.stop = "/bin/sh /etc/rc.shutdown"; ! exec.clean; ! ! test_prod { jid=7; persist; ip4.addr ! "10.0.7.96,10.0.5.96,127.0.5.96"; devfs_ruleset = "6"; ! host.hostuuid=00000000-0000-0000-0001-000000000302; host.hostid=000302; } ! ! I successfully performed ! for i in `seq 10`; do jail -vc test_prod; sleep 3; jail -vr test_prod; done But, this is not a VIMAGE jail, is it? Old-style jails are unaffected by this issue. Only VIMAGE jails, using epair or netgraph, might be affected. (In that case, you would not have an "ip4.addr" configured, and rather a "vnet.interface".) ! I think the normal use of jail.conf is to NOT explicitly use a jid in ! the definition, which may be why this may not have been picked up? ! (Maybe a clue). This is an interesting point. When you stop a jail, it may stay for a more or less long time in a "dying" state (visible with "jls -d"), keeping the jid occupied. During that time, the jail cannot be restarted with that same jid. Once ago, I read people complaining about this, and the advice was to just not define the jid in the definition, so that the jail can be restarted immediately (and will probably grab another jid). I did not find a solid explanation for what is happening in that "dying" state (and why it does take more or less long), even less an approach to fix that. I found some theories circling the net, but these don't really figure. So I would need to look into the source myself - and I did postpone that indefinitely. ;) But what I found out, with the VIMAGE jails (those that can carry their own network interfaces), when you make a slight mistake with managing and handling the interfaces, then the jail will stay in the dying state forever. If you don't make a mistake, then it will finally die within some time. So I decided to keep the jid, so that rightaway nothing is allowed to linger from misconfigured unnoticed. (The tradeoff is obviousely that one might have to wait before restarting.) cheerio, PMc P.S. 41 celsius is phantastic! I envy You! :)