Re: git: b2efd602aea8 - main - unbound: Vendor import 1.24.0
- Reply: Lexi Winter : "Re: git: b2efd602aea8 - main - unbound: Vendor import 1.24.0"
- Reply: Gleb Smirnoff : "Re: git: b2efd602aea8 - main - unbound: Vendor import 1.24.0"
- In reply to: Cy Schubert : "Re: git: b2efd602aea8 - main - unbound: Vendor import 1.24.0"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 08 Oct 2025 00:44:42 UTC
On Tue, Oct 7, 2025 at 8:00 PM Cy Schubert <Cy.Schubert@cschubert.com> wrote:
>
> In message <20251007221221.22BCC29E@slippy.cwsent.com>, Cy Schubert writes:
> > In message <CAPwQLcep1-Pt4P1QHiJpnZrMXXicG5Bc_tpxa6MtjVZT+vpJmg@mail.gmail.c
> > om>
> > , Jose Luis Duran writes:
> > > Hello Cy,
> > >
> > > According to the changelog:
> > >
> > > "The default value increase for so-sndbuf is 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.
> > >
> > > To help the server start more easily, the setsockopt for sndbuf buffer
> > > 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=0
>
>