From owner-freebsd-jail@freebsd.org Thu Sep 19 17:19:14 2019 Return-Path: Delivered-To: freebsd-jail@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BC6E01295B1 for ; Thu, 19 Sep 2019 17:19:14 +0000 (UTC) (envelope-from jamie@freebsd.org) Received: from gritton.org (gritton.org [199.192.165.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46Z3VV0Qy6z439V for ; Thu, 19 Sep 2019 17:19:13 +0000 (UTC) (envelope-from jamie@freebsd.org) Received: from gritton.org ([127.0.0.131]) by gritton.org (8.15.2/8.15.2) with ESMTP id x8JHJ5d7046065; Thu, 19 Sep 2019 11:19:05 -0600 (MDT) (envelope-from jamie@freebsd.org) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 19 Sep 2019 11:19:05 -0600 From: James Gritton To: freebsd-jail@freebsd.org Subject: Re: A process survives a restart of the jail in which the process reside. How so? In-Reply-To: <0f6de6a5-c588-e324-67c3-db43c8bb03bb@gmx.net> References: <0f6de6a5-c588-e324-67c3-db43c8bb03bb@gmx.net> Message-ID: <0a8c8db0dc4b172baec8fb49f1c9cd4c@freebsd.org> X-Sender: jamie@freebsd.org User-Agent: Roundcube Webmail/1.3.8 X-Greylist: inspected by milter-greylist-4.6.2 (gritton.org [127.0.0.131]); Thu, 19 Sep 2019 11:19:05 -0600 (MDT) for IP:'127.0.0.131' DOMAIN:'[127.0.0.131]' HELO:'gritton.org' FROM:'jamie@freebsd.org' RCPT:'' X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (gritton.org [127.0.0.131]); Thu, 19 Sep 2019 11:19:05 -0600 (MDT) X-Rspamd-Queue-Id: 46Z3VV0Qy6z439V X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.99 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:30247, ipnet:199.192.164.0/22, country:US] X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Sep 2019 17:19:14 -0000 On 2019-09-18 13:15, Jazzlover wrote: > Hello there, > > Frankly, I am quite puzzled. I have synapse (matrix) server installed > in > a jail. When I restart the jail, the process not only survives the > restart, but start itself once again as well. > > Before `service jail restart matrix` > > ``` > > So, basically I have two questions so far: > > 1. Just out of curiosity, how is that possible - a residing in the jail > process survives the jail restart. Is it common things and I missed > something about jails? Or it is just for python (maybe another > interpreter)? > 2. How to solve this? Meaning force the jail behave as it should, > meaning the processes in the jail should be restarted as far as the > jail > is restarted. It looks like you've answered #2 yourself, but this is still something that shouldn't be happening. The only time stopping a jail should result in the jail still existing with old processes is if those processes end up completely unkillable (which generally points to a different problem). I wonder if leaving the rc system out of entirely, and just restarting via jail(8) would change anything. Does a "jail -rc jailname" give any different results? > I have posted more details in another thread here on the FreeBSD.org > forum: > https://forums.freebsd.org/threads/py36-matrix-synapse-installation-almost-working.72257/post-439752 >> It turns out, that I made a mistake in /etc/jail.conf - in the new >> jail section didn't wrap the IP in quotes, it looked like this: >>> Code: >>> $ip= 8 ; This fix worries me, because that doesn't look like a line the requires quoting (unless you want the spaces to be part of the value). Also, the fact that the unquoted value caused the symptoms it did without any error messages is wrong even if quoting the value fixes it. I'd like to see the entire jail.conf, and see if I can reproduce and pinpoint this problem. - Jamie