Date: Tue, 7 Oct 2025 21:44:42 -0300 From: Jose Luis Duran <jlduran@gmail.com> To: Cy Schubert <Cy.Schubert@cschubert.com> Cc: jlduran+freebsd@freebsd.org, Cy Schubert <cy@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: b2efd602aea8 - main - unbound: Vendor import 1.24.0 Message-ID: <CAPwQLcd8cuttgT4tYcExcQraWYisRECfe49_XkCyvrZ3pW=ZDw@mail.gmail.com> In-Reply-To: <20251007230048.64C8F39B@slippy.cwsent.com> References: <202510071524.597FOTr3063628@gitrepo.freebsd.org> <CAPwQLcep1-Pt4P1QHiJpnZrMXXicG5Bc_tpxa6MtjVZT%2BvpJmg@mail.gmail.com> <20251007221221.22BCC29E@slippy.cwsent.com> <20251007230048.64C8F39B@slippy.cwsent.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 7, 2025 at 8:00=E2=80=AFPM Cy Schubert <Cy.Schubert@cschubert.c= om> wrote: > > In message <20251007221221.22BCC29E@slippy.cwsent.com>, Cy Schubert write= s: > > In message <CAPwQLcep1-Pt4P1QHiJpnZrMXXicG5Bc_tpxa6MtjVZT+vpJmg@mail.gm= ail.c > > om> > > , Jose Luis Duran writes: > > > Hello Cy, > > > > > > According to the changelog: > > > > > > "The default value increase for so-sndbuf is to mitigate a cross-laye= r > > > issue where the UDP socket send buffers are exhausted waiting for > > > ARP/NDP resolution. Thanks to Reflyable for the report. > > > > > > To help the server start more easily, the setsockopt for sndbuf buffe= r > > > size prints a warning instead of a failure to start the server if it > > > can not set the buffer size." > > > > > > This means so-sndbuf is now 4m. Which triggers a warning, detailed in > > > upstream commit 713b5db5 ("- Fix to print warning for when so-sndbuf > > > setsockopt is not granted."). > > > > > > I wonder if we should revert back to using "so-sndbuf: 0" as the > > > default for FreeBSD? Or is there a better solution/workaround? > > > > There are in fact two commits. > > > > 1ef7b4a24 adjusted so-sndbuf to default to 4m. > > > > 03772d10f changed the default from to 1m. > > > > I assume you're suggesting reverting both upstream commits for FreeBSD? > > Looking at the commit that started unbound down this path we see this in > their commit log before bumping the default to 4m: > > > - Change default for so-sndbuf to 1m, to mitigate a cross-layer > issue where the UDP socket send buffers are exhausted waiting > for ARP/NDP resolution. Thanks to Reflyable for the report. > > I use local_unbound on one of my machines here. It has 8 GB RAM. I don't > see any warning messages WRT the socket option not accepted. The first > question that comes to mind, to try to understand your environment, how > much RAM does this machine have and of that how much is allocated to the > kernel? Here is the warning on a fresh VM with 8GB: # sysctl hw.physmem hw.physmem: 8551202816 # service local_unbound onestart Starting local_unbound. [1759883902] local-unbound[3237:0] warning: setsockopt(..., SO_SNDBUF, ...) was not granted: No buffer space available [1759883902] local-unbound[3237:0] warning: so-sndbuf 4194304 was not granted. Got 9216. To fix: start with root permissions(linux) or sysctl bigger net.core.wmem_max(linux) or kern.ipc.maxsockbuf(bsd) values. or set so-sndbuf: 0 (use system value). [1759883902] local-unbound[3237:0] warning: setsockopt(..., SO_SNDBUF, ...) was not granted: No buffer space available [1759883902] local-unbound[3237:0] warning: so-sndbuf 4194304 was not granted. Got 9216. To fix: start with root permissions(linux) or sysctl bigger net.core.wmem_max(linux) or kern.ipc.maxsockbuf(bsd) values. or set so-sndbuf: 0 (use system value). Waiting for nameserver to start... good If we configure it with "so-sndbuf: 0" the warning goes away. But, nevermind if I'm the only one seeing these warnings. It was just a basic local_unbound test. Regards, > > -- > Cheers, > Cy Schubert <Cy.Schubert@cschubert.com> > FreeBSD UNIX: <cy@FreeBSD.org> Web: https://FreeBSD.org > NTP: <cy@nwtime.org> Web: https://nwtime.org > > e**(i*pi)+1=3D0 > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPwQLcd8cuttgT4tYcExcQraWYisRECfe49_XkCyvrZ3pW=ZDw>