Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Oct 2024 15:36:28 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>, freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Review D38047 ... and then there was one....
Message-ID:  <43F7106E-C5C5-4467-9B72-1D7C51E5430B@yahoo.com>
References:  <43F7106E-C5C5-4467-9B72-1D7C51E5430B.ref@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Marek Zarychta <zarychtam_at_plan-b.pwste.edu.pl> wrote on
Date: Sun, 06 Oct 2024 20:13:58 UTC :

> W dniu 6.10.2024 o 22:04, David Cross pisze:
> > Here=E2=80=99s the thing. The current implementation of nscd =
DOESN=E2=80=99T WORK at all. There is a symbol that nscd exports that =
libc is supposed to use as a flag to bypass lookups for nscd itself. But =
that symbol isn=E2=80=99t exported right.
> >
> > You will need to recompile libc and nscd. (I just do a buildworld to =
make sure i get everything as there are makefile changes related to the =
aforementioned symbol changes.
>=20
> Yes, without world installed this patched nscd won't even start:
>=20
> [host] /usr/src# service nscd start
> Starting nscd.
> limits: setrlimit pipebuf: Invalid argument
> /etc/rc.d/nscd: WARNING: failed to start nscd
. . .

This note is only about the "limits: setrlimit pipebuf:
Invalid argument" notice.

The main [so: 15] pipebuf related commits were done during
2024-Sep-20 UTC. If one has a kernel that predates those but
a world for which limits now tries to use the new pipebuf
material, the result is messages like that:

limits: setrlimit pipebuf: Invalid argument

(or related such messages).


For reference for main [so: 15]:

Fri, 20 Sep 2024
    . . .=20
    =E2=80=A2 git: 3458bbd39778 - main - kernel: add RLIMIT_PIPEBUF =
Konstantin Belousov=20
    =E2=80=A2 git: 54a8d1fbbf65 - main - getrlimit(2): document =
RLIMIT_PIPEBUF Konstantin Belousov=20
    =E2=80=A2 git: a4c04958f526 - main - libutil: support RLIMIT_PIPEBUF =
Konstantin Belousov=20
    =E2=80=A2 git: 5d92f20c7d31 - main - bin/sh: support RLIMIT_PIPEBUF =
Konstantin Belousov=20
    =E2=80=A2 git: f54f41403d14 - main - usr.bin/limits: support =
RLIMIT_PIPEBUF Konstantin Belousov=20
    =E2=80=A2 git: b029e29e0d8b - main - login.conf: add a placeholder =
for the pipebuf limit Konstantin Belousov=20
    =E2=80=A2 git: 80133d678ecb - main - procstat: support =
RLIMIT_PIPEBUF Konstantin Belousov=20
    =E2=80=A2 git: 8ae779832c6f - main - privs: add PRIV_PIPEBUF =
Konstantin Belousov=20
    =E2=80=A2 git: 7672cbef2c1e - main - pipes: reserve configured =
percentage of buffers zone to superuser Konstantin Belousov
    . . .=20
    =E2=80=A2 git: d6074f73af5c - main - pipe: use pipe subsystem KVA =
counter instead of pipe_map size Konstantin Belousov=20
    =E2=80=A2 git: 40769168a5ee - main - pipespace_new(): decrease =
uidinfo pipebuf usage if reservation check failed Konstantin Belousov
    . . .=20
    =E2=80=A2 git: a52b30ff98cd - main - sys_pipe: consistently use =
cr_ruidinfo for accounting of pipebuf Konstantin Belousov=20
    =E2=80=A2 git: af96ccc6a508 - main - uifree(9): report non-zero =
values for all shared resources Konstantin Belousov=20
    =E2=80=A2 git: 2c1963d46335 - main - procfs rlimit: handle pipebuf =
Konstantin Belousov=20
    =E2=80=A2 git: c84d8db0ab3d - main - procfs: ensure that =
RLIMIT_IDENT is properly updated when a limit is added Konstantin =
Belousov

The combination of an older kernel and a newer world will not be
nicely behaved when any non-kernel code from the above ends up
involved.


stable/14 has now also had the commits:

Sat, 05 Oct 2024
    =E2=80=A2 git: 1508dce2502d - stable/14 - procfs: ensure that =
RLIMIT_IDENT is properly updated when a limit is added Konstantin =
Belousov=20
    . . .
    =E2=80=A2 git: b7eecc86c3bd - stable/14 - kernel: add RLIMIT_PIPEBUF =
Konstantin Belousov=20
    =E2=80=A2 git: d20f0dae2f97 - stable/14 - getrlimit(2): document =
RLIMIT_PIPEBUF Konstantin Belousov=20
    =E2=80=A2 git: a03f7c040ce7 - stable/14 - libutil: support =
RLIMIT_PIPEBUF Konstantin Belousov=20
    =E2=80=A2 git: d5ed8778bf3b - stable/14 - bin/sh: support =
RLIMIT_PIPEBUF Konstantin Belousov=20
    =E2=80=A2 git: 25902860b270 - stable/14 - usr.bin/limits: support =
RLIMIT_PIPEBUF Konstantin Belousov=20
    =E2=80=A2 git: 524b9810de6a - stable/14 - login.conf: add a =
placeholder for the pipebuf limit Konstantin Belousov=20
    =E2=80=A2 git: 6600090e678e - stable/14 - procstat: support =
RLIMIT_PIPEBUF Konstantin Belousov=20
    =E2=80=A2 git: fd9babb1b85f - stable/14 - privs: add PRIV_PIPEBUF =
Konstantin Belousov=20
    =E2=80=A2 git: d532d9926ee7 - stable/14 - pipes: reserve configured =
percentage of buffers zone to superuser Konstantin Belousov=20
    =E2=80=A2 git: 6536b979b856 - stable/14 - pipe: use pipe subsystem =
KVA counter instead of pipe_map size Konstantin Belousov=20
    =E2=80=A2 git: a8c663bb4261 - stable/14 - pipespace_new(): decrease =
uidinfo pipebuf usage if reservation check failed Konstantin Belousov=20
    =E2=80=A2 git: c15b2e046e8c - stable/14 - sys_pipe: consistently use =
cr_ruidinfo for accounting of pipebuf Konstantin Belousov=20
    . . .
    =E2=80=A2 git: fc9070bf1d16 - stable/14 - procfs rlimit: handle =
pipebuf Konstantin Belousov=20
    . . .

Again, the combination of an older kernel and a newer world will not be
nicely behaved.

=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43F7106E-C5C5-4467-9B72-1D7C51E5430B>