From nobody@FreeBSD.org  Wed May  3 19:30:08 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id BAFAB16A400
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  3 May 2006 19:30:08 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7BCA443D48
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  3 May 2006 19:30:08 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k43JU8eg078451
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 3 May 2006 19:30:08 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k43JU8ec078450;
	Wed, 3 May 2006 19:30:08 GMT
	(envelope-from nobody)
Message-Id: <200605031930.k43JU8ec078450@www.freebsd.org>
Date: Wed, 3 May 2006 19:30:08 GMT
From: Gergely Czuczy <phoemix@harmless.hu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: jails still in the system after stopping them
X-Send-Pr-Version: www-2.3

>Number:         96729
>Category:       kern
>Synopsis:       [jail] jails still in the system after stopping them
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 03 19:40:17 GMT 2006
>Closed-Date:    Wed May 03 19:58:10 GMT 2006
>Last-Modified:  Wed May 03 19:58:10 GMT 2006
>Originator:     Gergely Czuczy
>Release:        6.0-RELEASE-p6
>Organization:
Harmless Digital
>Environment:
FreeBSD trillian.harmless.hu 6.0-RELEASE-p6 FreeBSD 6.0-RELEASE-p6 #1: Mon Apr 10 20:09:00 CEST 2006     root@trillian.harmless.hu:/usr/obj/usr/src/sys/TRILLIAN  i386

>Description:
Jails keep on stucking in the system after stopping them. As i have experienced it mostly occurs when i leave something in the jail when stopping them.
i use to start/stop jails the rc.d script. i go inside a running jail with ``jexec <id> /usr/local/bin/bash'' (so, a standard shell), and when i'm in, i stop the jail. after i leave the shell i still can see the jail listed with jls.
i was unable to find any utilities to purge these unused entries from the jail "registry".
i have tried to put back it's id to /var/run/<id file>, and invoke the /etc/rc.d/jail/stop script again, but it had no effect on them.

>How-To-Repeat:
1) start up a jail
2) using jexec, enter into it with a shell
3) stop the jail
4) leave the jail with the jexec shell
5) check it with jls, the jail will be still around

>Fix:

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Wed May 3 19:56:21 UTC 2006 
State-Changed-Why:  
Known problem.  Look at kern/89528 for more information: 

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

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