Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Jun 2019 18:50:16 +0200
From:      Stefan Hegnauer <stefan.hegnauer@gmx.ch>
To:        freebsd-stable@freebsd.org
Cc:        kostikbel@gmail.com, kevans@freebsd.org, re@freebsd.org
Subject:   Re: ps -J0 broken?
Message-ID:  <bd4f6d94-6101-43e7-c5cc-4343ccc10914@gmx.ch>
In-Reply-To: <mailman.20066.1559558156.52789.freebsd-stable@freebsd.org>
References:  <mailman.20066.1559558156.52789.freebsd-stable@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 02.06.2019 15:51, Kyle Evans wrote:
>> On Sun, Jun 2, 2019 at 8:05 AM Konstantin Belousov <kostikbel@gmail.com> wrote:
>>> On Sun, Jun 02, 2019 at 02:30:49PM +0200, Stefan Hegnauer wrote:
>>>> Hi,
>>>>
>>>> after a recent full update to 12.0-STABLE r348382 it seems that '/bin/ps
>>>> -J 0' is broken: 'ps: Invalid jail id: 0'.
>>>> It did work on stable for the last couple years prior to this update
>>>> (last update without this error was about 5 weeks ago), and should still
>>>> work according to ps(1):
>>>>      -J      Display information about processes which match the specified
>>>>              jail IDs.  This may be either the jid or name of the jail.
>>>> **Use**
>>>> **             -J 0 to display only host processes*.*  This flag implies
>>>> -x by
>>>>              default.
>>>>
>>>> My system runs several jails with JID's currently in the range 80-100.
>>>> The source code of ps did not change for the last 7 month as far as I
>>>> can tell. A fresh 'make clean & make & make install' of just ps did not
>>>> help either, which was not really surprising to me.
>>>> Any pointers where to look further?
>>> Is your libjail up to date ?  Do you have r348297 ?
>> kern_jail_get refuses to do lookups for jid=0, presumably because
>> prison 0 is special. I'll commit quick fix- libjail should go back to
>> just return (jid) if jid == 0, because this will always exist. It's a
>> trivial patch, I intend to request permission for immediate MFC to
>> both stable/1{1,2} from re@ because it restores previous working
>> behavior for this.
> Thanks. I will follow up as soon as the patch is in stable/12 and I had
> a chance to test it.
>
I am happy to report success - with r348538 the old behaviour is
restored. Thank you all for the extremely quick reaction!

-Stefan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bd4f6d94-6101-43e7-c5cc-4343ccc10914>