Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Sep 2019 11:19:05 -0600
From:      James Gritton <jamie@freebsd.org>
To:        freebsd-jail@freebsd.org
Subject:   Re: A process survives a restart of the jail in which the process reside. How so?
Message-ID:  <0a8c8db0dc4b172baec8fb49f1c9cd4c@freebsd.org>
In-Reply-To: <0f6de6a5-c588-e324-67c3-db43c8bb03bb@gmx.net>
References:  <0f6de6a5-c588-e324-67c3-db43c8bb03bb@gmx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0a8c8db0dc4b172baec8fb49f1c9cd4c>