Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 May 2021 15:15:43 +0100
From:      Jessica Clarke <jrtc27@freebsd.org>
To:        Marcin Wojtas <mw@semihalf.com>
Cc:        shawn.webb@hardenedbsd.org, Marcin Wojtas <mw@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@freebsd.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@freebsd.org>
Subject:   Re: git: af949c590bd8 - main - Disable stack gap for ntpd during build.
Message-ID:  <02078965-24BE-4F23-92D5-5E8E54A0C3E7@freebsd.org>
In-Reply-To: <CAPv3WKeV1Oz8Gbv0LBFD03J6k3k%2B2XMBEvi28DuMM8LVq8cjrQ@mail.gmail.com>
References:  <202105211334.14LDYqoa004343@gitrepo.freebsd.org> <04F25FD0-7863-4AC1-A257-EF0F1EB90659@freebsd.org> <CAPv3WKeV1Oz8Gbv0LBFD03J6k3k%2B2XMBEvi28DuMM8LVq8cjrQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> On 21 May 2021, at 15:11, Marcin Wojtas <mw@semihalf.com> wrote:
>=20
> Hi Jess
>=20
> pt., 21 maj 2021 o 15:39 Jessica Clarke <jrtc27@freebsd.org> =
napisa=C5=82(a):
>>=20
>> On 21 May 2021, at 14:34, Marcin Wojtas <mw@FreeBSD.org> wrote:
>>>=20
>>> The branch main has been updated by mw:
>>>=20
>>> URL: =
https://cgit.FreeBSD.org/src/commit/?id=3Daf949c590bd8a00a5973b5875d7e0fa6=
832ea64a
>>>=20
>>> commit af949c590bd8a00a5973b5875d7e0fa6832ea64a
>>> Author:     Marcin Wojtas <mw@FreeBSD.org>
>>> AuthorDate: 2021-05-21 09:29:22 +0000
>>> Commit:     Marcin Wojtas <mw@FreeBSD.org>
>>> CommitDate: 2021-05-21 13:33:06 +0000
>>>=20
>>>   Disable stack gap for ntpd during build.
>>>=20
>>>   When starting, ntpd calls setrlimit(2) to limit maximum size of =
its
>>>   stack. The stack limit chosen by ntpd is 200K, so when stack gap
>>>   is enabled, the stack gap is larger than this limit, which results
>>>   in ntpd crashing.
>>=20
>> Isn=E2=80=99t the bug that the unusable gap counts as usage?
>>=20
>> Jess
>>=20
>=20
> An alternative solution was submitted
> (https://reviews.freebsd.org/D29832), so that to extend the limit for
> ntpd, but eventually it was recommended to simple disable the stack
> gap for it until it's fixed upstream (see the last comment in the
> linked revision).

That=E2=80=99s my point, there is nothing to =E2=80=9Cfix=E2=80=9D =
upstream. NTPD uses less than 200K
of stack, thus it is perfectly reasonable for it to set its limit to =
that. The
fact that FreeBSD decides to count an arbitrary, non-deterministic =
amount of
additional unusable virtual address space towards that limit is not its =
fault,
but a bug in FreeBSD that needs to be fixed as it=E2=80=99s entirely =
unreasonable for
applications to have to account for that.

Jess




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?02078965-24BE-4F23-92D5-5E8E54A0C3E7>