From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 17 06:35:14 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 602D716A403 for ; Fri, 17 Nov 2006 06:35:14 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id E594D43D53 for ; Fri, 17 Nov 2006 06:35:13 +0000 (GMT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id 800211FFE00; Fri, 17 Nov 2006 07:35:11 +0100 (CET) Received: by transport.cksoft.de (Postfix, from userid 66) id 6499C1FFE6C; Fri, 17 Nov 2006 07:35:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id B3F39444889; Fri, 17 Nov 2006 06:33:34 +0000 (UTC) Date: Fri, 17 Nov 2006 06:33:34 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Dirk Engling In-Reply-To: <455D2A7A.90109@erdgeist.org> Message-ID: <20061117062952.H18512@maildrop.int.zabbadoz.net> References: <455D2A7A.90109@erdgeist.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de Cc: freebsd-hackers@freebsd.org Subject: Re: Phantom Jails X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2006 06:35:14 -0000 On Fri, 17 Nov 2006, Dirk Engling wrote: Hi, > Rumors went around and tales were told about jails magically booing > around in prison list, even after they deceased. ... > My suggestion would be (I will provide a patch, if discussion produces > no major disagreement) to release ucred structs held by sockets as soon > as the process dies. They are being used for accounting purposes only, > anyway. The same may apply to the other types of phantom jails, as well. > I could not create those deliberately and therefore can not exactly spot > the proper location to fix. > > Comments? > > P.S.: if you want to reproduce a phantom jail try the following: > 1) create and start a jail > 2) Start a ssh/web/whatever server within the jail > 3) Connect to that server from the host system. > 4) Keep this connection open while you kill the jail > 5) Do a 'jls' and compare its output to "ps axuu | grep J" > 6) Kill the process that connected to the service. > 7) Do a 'jls' again. while this works you can also reproduce it if you log out of the jail wait for the sockets to go away entirely and then stop the jail because what keeps the jail up is not a socket but is related to devfs and ?tys. http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/89528 -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT