Jail stuck in dying

Kristof Provost kp at FreeBSD.org
Thu Mar 9 02:02:00 UTC 2017


Hi,

On a current box (r314933) I can’t seem to stop my jails.

It’s started like this:

	jail -c name=test0 host.hostname=test vnet persist 
vnet.interface=epair0b \
		path=/usr/jails/jail1 exec.start="/bin/sh /etc/rc"

I terminate it with `jail -R test0`, yet the jail stays stuck in dying 
state:

	$ jls -a
	   JID  IP Address      Hostname                      Path
      1                  test                          /usr/jails/jail1

	$ jls -na
	devfs_ruleset=0 dying enforce_statfs=2 host=new ip4=inherit ip6=inherit 
jid=1 name=test0 osreldate=1200023 osrelease=12.0-CURRENT parent=0 
path=/usr/jails/jail1 nopersist securelevel=-1 sysvmsg=disable 
sysvsem=disable sysvshm=disable vnet=new allow.nochflags allow.nomount 
allow.mount.nodevfs allow.mount.nofdescfs allow.mount.nolinprocfs 
allow.mount.nolinsysfs allow.mount.nonullfs allow.mount.noprocfs 
allow.mount.notmpfs allow.mount.nozfs allow.noquotas allow.noraw_sockets 
allow.set_hostname allow.nosocket_af allow.nosysvipc children.cur=0 
children.max=0 cpuset.id=2 host.domainname="" host.hostid=0 
host.hostname=test host.hostuuid=00000000-0000-0000-0000-000000000000 
ip4.addr= ip4.saddrsel ip6.addr= ip6.saddrsel

I’ve tried debugging this, but the most I can say is that there 
appears to be something wrong with the reference counting.
prison_deref() returns because pr->pr_ref is 3. There are no more jailed 
processes running, so I have no idea why this happens.

The problem doesn’t appear to be related to vnet. I can reproduce it 
without setting the vnet flag when creating the jail as well.

Regards,
Kristof


More information about the freebsd-jail mailing list