From nobody@FreeBSD.org  Mon Nov 26 03:39:37 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5CB1016A41A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 Nov 2007 03:39:37 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 4CDDC13C46A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 Nov 2007 03:39:37 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id lAQ3dXD7087449
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 26 Nov 2007 03:39:33 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id lAQ3dXuh087448;
	Mon, 26 Nov 2007 03:39:33 GMT
	(envelope-from nobody)
Message-Id: <200711260339.lAQ3dXuh087448@www.freebsd.org>
Date: Mon, 26 Nov 2007 03:39:33 GMT
From: Hugo Saro <hugo@barafranca.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ZFS jails remain forever in jls output
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         118256
>Category:       bin
>Synopsis:       ZFS jails remain forever in jls output
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pjd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 26 03:40:00 UTC 2007
>Closed-Date:    Sat Dec 08 01:18:39 UTC 2007
>Last-Modified:  Sat Dec 08 01:18:39 UTC 2007
>Originator:     Hugo Saro
>Release:        FreeBSD 7.0-BETA3
>Organization:
>Environment:
FreeBSD zaurak.bsdlan.org 7.0-BETA3 FreeBSD 7.0-BETA3 #0: Sun Nov 25 03:53:45 WET 2007     klr@zaurak.bsdlan.org:/usr/obj/usr/src/sys/ZAURAK  amd64

>Description:
Jails stopped via /etc/rc.d/jail are not going away from jls output (waited several hours).


JID  IP Address      Hostname                      Path
  1  10.0.90.3       notebook.multiverse.local     /zfsjails/notebook



No jailed processes are running:

# ps aux | grep J
root  1944  0.0  0.1  5888  1240  p0  R+    3:35AM   0:00.00 grep J
>How-To-Repeat:
Configuring jails:.
Starting jails: lab.multiverse.local. [UFS-backed jail]

# jls
JID  IP Address      Hostname                      Path
  2  10.0.90.2       lab.multiverse.local          /ufsjails/lab
  1  10.0.90.3       notebook.multiverse.local     /zfsjails/notebook

# /etc/rc.d/jail stop lab
Stopping jails: lab.multiverse.local.

# jls
   JID  IP Address      Hostname                      Path
     1  10.0.90.3       notebook.multiverse.local     /zfsjails/notebook


UFS-backed "lab" jail vanished as expected, ZFS-backed "notebook" jail remains, even after being stopped.
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->pjd 
Responsible-Changed-By: remko 
Responsible-Changed-When: Mon Nov 26 06:21:09 UTC 2007 
Responsible-Changed-Why:  
Hi Pawel, this might be ZFS related.. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118256 

From: Andrew Thompson <thompsa@FreeBSD.org>
To: bug-followup@FreeBSD.org, hugo@barafranca.com
Cc:  
Subject: Re: bin/118256: ZFS jails remain forever in jls output
Date: Tue, 27 Nov 2007 13:21:13 +1300

 Hi,
 
 
 Does this happen every time, even when starting the lab jail and
 stopping it again, or is it more random than that?
 
 It would be helpful if you could describe how to reproduce the problem
 and also the scenarios in which it doesn't happen. Sending in
 /etc/rc.conf and /zfsjails/notebook/etc/rc.conf would be good too.
 
 
 cheers,
 Andrew

From: Hugo Silva <hugo@barafranca.com>
To: bug-followup@FreeBSD.org,  thompsa@freebsd.org
Cc:  
Subject: Re: bin/118256: ZFS jails remain forever in jls output
Date: Tue, 27 Nov 2007 12:41:48 +0000

 Andrew Thompson wrote:
 > Hi,
 >
 >
 > Does this happen every time, even when starting the lab jail and
 > stopping it again, or is it more random than that?
 >
 > It would be helpful if you could describe how to reproduce the problem
 > and also the scenarios in which it doesn't happen. Sending in
 > /etc/rc.conf and /zfsjails/notebook/etc/rc.conf would be good too.
 >
 >
 > cheers,
 > Andrew
 >   
 
 # jls
    JID  IP Address      Hostname                      Path
      4  10.0.90.3       notebook.multiverse.local     /zfsjails/notebook
      3  10.0.90.2       lab.multiverse.local          /ufsjails/lab
 
 # /etc/rc.d/jail stop lab
 Stopping jails: lab.multiverse.local.
 
 
 # jls
    JID  IP Address      Hostname                      Path
      4  10.0.90.3       notebook.multiverse.local     /zfsjails/notebook
 
 # /etc/rc.d/jail start lab
 Configuring jails:.
 Starting jails: lab.multiverse.local.
 
 # jls
    JID  IP Address      Hostname                      Path
      6  10.0.90.2       lab.multiverse.local          /ufsjails/lab
      4  10.0.90.3       notebook.multiverse.local     /zfsjails/notebook
 
 
 # /etc/rc.d/jail stop lab
 Stopping jails: lab.multiverse.local.
 
 # jls
    JID  IP Address      Hostname                      Path
      4  10.0.90.3       notebook.multiverse.local     /zfsjails/notebook
 
 
 Host rc.conf (relevant settings):
 
 jail_enable="YES"                                                                                       
 #
 jail_set_hostname_allow="NO"                                                                            
 #
                                                                                                         
 #
 
 jail_lab_rootdir="/ufsjails/lab"                                                                        
 #
 jail_lab_hostname="lab.multiverse.local"                                                                
 #
 jail_lab_ip="10.0.90.2"                                                                                 
 #
 jail_lab_interface="tap0"                                                                               
 #
 jail_lab_exec_start="/bin/sh 
 /etc/rc"                                                                   #
 jail_lab_exec_stop="/bin/sh 
 /etc/rc.shutdown"                                                           
 #
 jail_lab_devfs_enable="YES"                                                                             
 #
 jail_lab_flags="-l -s 3 -J /var/run/jail_lab.pid -U 
 root"                                               #
                                                                                                         
 #
 jail_notebook_rootdir="/zfsjails/notebook"                                                              
 #
 jail_notebook_hostname="notebook.multiverse.local"                                                      
 #
 jail_notebook_ip="10.0.90.3"                                                                            
 #
 jail_notebook_interface="tap0"                                                                          
 #
 jail_notebook_exec_start="/bin/sh 
 /etc/rc"                                                              #
 jail_notebook_exec_stop="/bin/sh 
 /etc/rc.shutdown"                                                      #
 jail_notebook_devfs_enable="YES"                                                                        
 #
 jail_notebook_flags="-l -s 3 -J /var/run/jail_notebook.pid -U 
 root"                                     #
                                                                                                         
 #
 
 
 # cat /zfsjails/notebook/etc/rc.conf
 hostname="notebook.multiverse.local"
 
 inetd_enable="NO"
 sendmail_enable="NONE"
 
 clear_tmp_enable="YES"
 
 sshd_enable="YES"
 
 syslogd_enable="YES"
 syslogd_flags="-ss"
 
 lighttpd_enable="YES"
 
 
 
 # zfs mount | grep jails
 SATAZFS/zfsjails                /zfsjails
 SATAZFS/zfsjails/notebook       /zfsjails/notebook
 SATAZFS/zfsjails/notebook/home  /zfsjails/notebook/home
 SATAZFS/zfsjails/notebook/tmp   /zfsjails/notebook/tmp
 SATAZFS/zfsjails/notebook/usr   /zfsjails/notebook/usr
 SATAZFS/zfsjails/notebook/var   /zfsjails/notebook/var
 SATAZFS/misc/trac_data          /zfsjails/notebook/usr/local/www/data/trac
 
 
 # mount | grep nullfs
 /usr/ports on /ufsjails/lab/usr/ports (nullfs, local, noexec, nosuid, 
 read-only)
 /usr/ports on /zfsjails/notebook/usr/ports (nullfs, local, noexec, 
 nosuid, read-only)
 
 
 The two outstanding differences between 'lab' and 'notebook' is that lab 
 is a jail on a directory on a UFS filesystem (/ufsjails), while 
 'notebook' resides on a ZFS filesystem (/zfsjails) and also has a few 
 filesystems of it's own (/home /tmp /usr /var /usr/local/www/data/trac).
 
 Sometimes after stopping 'lab' it might take several seconds until it 
 goes away from jls, but eventually it always does.
 
 I had another ZFS jail set up prior to notebook (also with zfs 
 filesystems mounted inside it), and I had the same problem.
 
 
 Regards,
 
 Hugo

From: Andrew Thompson <thompsa@FreeBSD.org>
To: bug-followup@FreeBSD.org, hugo@barafranca.com
Cc:  
Subject: Re: bin/118256: ZFS jails remain forever in jls output
Date: Fri, 7 Dec 2007 20:27:33 +1300

 Hi,
 
 
 Can you please verify if this is still a problem with the latest FreeBSD
 7.0 sources. Use "ident /usr/src/sys/kern/kern_conf.c" to make sure you
 have revision 1.208.2.1.
 
 
 cheers,
 Andrew

From: Hugo Silva <hugo@barafranca.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/118256: ZFS jails remain forever in jls output
Date: Fri, 07 Dec 2007 16:45:27 +0000

 Hugo Silva wrote:
 > Andrew Thompson wrote:
 >> Hi,
 >>
 >>
 >> Can you please verify if this is still a problem with the latest FreeBSD
 >> 7.0 sources. Use "ident /usr/src/sys/kern/kern_conf.c" to make sure you
 >> have revision 1.208.2.1.
 >>
 >>
 >> cheers,
 >> Andrew
 >>   
 >
 > I no longer seem to have this problem with FreeBSD 7.0-BETA4.
 >
 > /usr/src/sys/kern/kern_conf.c:
 >     $FreeBSD: src/sys/kern/kern_conf.c,v 1.208.2.1 2007/12/07 03:45:16 
 > thompsa Exp $
 >
 >
 > Thank you.
 >
 > Regards,
 >
 > Hugo
 >
 
State-Changed-From-To: open->closed 
State-Changed-By: thompsa 
State-Changed-When: Sat Dec 8 01:17:10 UTC 2007 
State-Changed-Why:  
The same problem as kern/89528 for which a workaround has 
been committed. Thanks for the PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118256 
>Unformatted:
