Re: kern/89528: [jail] impossible to kill a jail

2007-01-16 Thread Juergen Unger
Hi ! I had this problem on my machines many times now. One additional thing I found: on my machines all jails have their own (virtual) disks mounted to the root-fs of the jail. In the case a zombie jail is left after stopping a jail the entry in the jls output is still visible _and_ it is not

Re: kern/89528: [jail] impossible to kill a jail

2007-01-05 Thread Ed Schouten
* John Baldwin <[EMAIL PROTECTED]> wrote: > Why aren't the pty's destroyed? Once all references to the pty are closed it > > should be destroyed and the resulting devfs_free() should drop the reference. > Is the pty somehow stuck on the dead_cdevsw? Ouch! I found a comment in tty_pty.c that it

Re: kern/89528: [jail] impossible to kill a jail

2007-01-05 Thread John Baldwin
On Thursday 04 January 2007 15:14, Ed Schouten wrote: > Hello everyone, > > I decided to investigate this bug because I think the bug is quite > irritating. After adding some ddb show commands to the source and > reading a lot of code, I think I understand the problem: > > The tty code doesn't le

Re: kern/89528: [jail] impossible to kill a jail

2007-01-04 Thread Ed Schouten
* Coleman Kane <[EMAIL PROTECTED]> wrote: > Does this behavior still occur if you set sysctl kern.pts.enable=1 ? Well, I haven't tested that, but it should be fixed as well, because it also calls make_dev_cred(). > Is this at all related to why I have been experiencing zombies left behind > for a

Re: kern/89528: [jail] impossible to kill a jail

2007-01-04 Thread Coleman Kane
On 1/4/07, Ed Schouten <[EMAIL PROTECTED]> wrote: * Ed Schouten <[EMAIL PROTECTED]> wrote: > As long as pty's have been allocated that have been created by threads > in a jail, the prison structure has more references, causing the zombie > jails to exist. We could change the make_dev_credv() ro

Re: kern/89528: [jail] impossible to kill a jail

2007-01-04 Thread Ed Schouten
* Ed Schouten <[EMAIL PROTECTED]> wrote: > As long as pty's have been allocated that have been created by threads > in a jail, the prison structure has more references, causing the zombie > jails to exist. We could change the make_dev_credv() routine to crcopy() everything except the prison when w

Re: kern/89528: [jail] impossible to kill a jail

2007-01-04 Thread Ed Schouten
Hello everyone, I decided to investigate this bug because I think the bug is quite irritating. After adding some ddb show commands to the source and reading a lot of code, I think I understand the problem: The tty code doesn't leak any ucreds, it's the devfs code that crhold()'s an ucred structur