rgw:/etc/unbound # freebsd-version -uk 13.2-RELEASE 13.2-RELEASE rgw:/etc/unbound # /usr/sbin/local-unbound -V Version 1.17.1 Configure line: --with-ssl=/usr --with-libexpat=/usr --disable-dnscrypt --disable-dnstap --enable-ecdsa --disable-event-api --enable-gost --with-libevent --disable-subnet --disable-tfo-client --disable-tfo-server --with-pthreads--prefix=/usr --localstatedir=/var/unbound --mandir=/usr/share/man --build=freebsd Linked libs: mini-event internal (it uses select), OpenSSL 1.1.1t-freebsd 7 Feb 2023 Linked modules: dns64 respip validator iterator BSD licensed, see LICENSE in source package for details. Report bugs to unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues ktrace of unbound running process show loop: 1005 local-unbound CALL sendto(0x9,0x2562128aa400,0x2d,0,0,0) 1005 local-unbound RET sendto -1 errno 55 No buffer space available 1005 local-unbound CALL poll(0x25620a5796a8,0x1,0xc8) 1005 local-unbound RET poll 1 1005 local-unbound CALL sendto(0x9,0x2562128aa400,0x2d,0,0,0) 1005 local-unbound RET sendto -1 errno 55 No buffer space available 1005 local-unbound CALL poll(0x25620a5796a8,0x1,0xc8) 1005 local-unbound RET poll 1 1005 local-unbound CALL sendto(0x9,0x2562128aa400,0x2d,0,0,0) 1005 local-unbound RET sendto -1 errno 55 No buffer space available 1005 local-unbound CALL poll(0x25620a5796a8,0x1,0xc8) 1005 local-unbound RET poll 1 1005 local-unbound CALL sendto(0x9,0x2562128aa400,0x2d,0,0,0) 1005 local-unbound RET sendto -1 errno 55 No buffer space available 1005 local-unbound CALL poll(0x25620a5796a8,0x1,0xc8) 1005 local-unbound RET poll 1 1005 local-unbound CALL sendto(0x9,0x2562128aa400,0x2d,0,0,0) 1005 local-unbound RET sendto -1 errno 55 No buffer space available 1005 local-unbound CALL poll(0x25620a5796a8,0x1,0xc8) 1005 local-unbound RET poll 1 1005 local-unbound CALL sendto(0x9,0x2562128aa400,0x2d,0,0,0) 1005 local-unbound RET sendto -1 errno 55 No buffer space available 1005 local-unbound CALL poll(0x25620a5796a8,0x1,0xc8) 1005 local-unbound RET poll 1 1005 local-unbound CALL sendto(0x9,0x2562128aa400,0x2d,0,0,0) 1005 local-unbound RET sendto -1 errno 55 No buffer space available 1005 local-unbound CALL poll(0x25620a5796a8,0x1,0xc8) 1005 local-unbound RET poll 1 1005 local-unbound CALL sendto(0x9,0x2562128aa400,0x2d,0,0,0) 1005 local-unbound RET sendto -1 errno 55 No buffer space available 1005 local-unbound CALL poll(0x25620a5796a8,0x1,0xc8) 1005 local-unbound RET poll 1 .../... I think it's an infinite loop inside netevent.c / comm_point_send_udp_msg() while(sent == -1 && ( .../... variable "pret" never get 0 and we are locked in loop using 100% of CPU, of course in this case unbound is unable to resolve request or reply to command local-unbound-control JC
Already reported by OpenBSD team, it's fixed in current unbound https://github.com/NLnetLabs/unbound/commit/0ee44ef384593ed0382d1ce6048d5a9c9440b45c need to be back-ported in FreeBSD.
Cy, is there any reason not to backport the patch referenced in comment 1?
(In reply to Mark Johnston from comment #2) I just got back from vacation today. The patch has been imported into vendor and I'll test it here.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=6e71235e558ef579605e7f35b02f983b9a246a4a commit 6e71235e558ef579605e7f35b02f983b9a246a4a Merge: 32557d16e2c3 292d51198aa3 Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2023-10-13 00:04:25 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2023-10-13 00:04:25 +0000 unbound: Import upstream 0ee44ef3 when ENOBUFS is returned From upstream 0ee44ef3: - Fix send of udp retries when ENOBUFS is returned. It stops looping and also waits for the condition to go away. Reported by Florian Obser. PR: 274352 MFC after: 3 days Merge commit '292d51198aa319c58f534549851e9c28486abdf4' contrib/unbound/.gitignore (new) | 1 + contrib/unbound/util/netevent.c | 102 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 101 insertions(+), 2 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=05c229e187e0dd8d812db2ebb10f74ca1c423efc commit 05c229e187e0dd8d812db2ebb10f74ca1c423efc Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2023-10-13 02:04:20 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2023-10-13 13:21:05 +0000 dns/unbound: Fix loop when ENOBUFS is returned - Fix send of udp retries when ENOBUFS is returned. It stops looping and also waits for the condition to go away. Reported to upstream by Florian Obser. PR: 274352, 274446 Approved by: jaap@NLnetLabs.nl (maintainer) MFH: 2023Q4 dns/unbound/Makefile | 1 + dns/unbound/files/patch-netevent.c (new) | 159 +++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+)
A commit in branch 2023Q4 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=0706b7c3f62cdf724ca43d361918932202a91fe3 commit 0706b7c3f62cdf724ca43d361918932202a91fe3 Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2023-10-13 02:04:20 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2023-10-13 23:55:41 +0000 dns/unbound: Fix loop when ENOBUFS is returned - Fix send of udp retries when ENOBUFS is returned. It stops looping and also waits for the condition to go away. Reported to upstream by Florian Obser. PR: 274352, 274446 Approved by: jaap@NLnetLabs.nl (maintainer) (cherry picked from commit 05c229e187e0dd8d812db2ebb10f74ca1c423efc) dns/unbound/Makefile | 1 + dns/unbound/files/patch-netevent.c (new) | 159 +++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=8a9416b18f8a894c4bb0c3a284746d5e0bc81152 commit 8a9416b18f8a894c4bb0c3a284746d5e0bc81152 Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2023-10-13 00:04:25 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2023-10-16 04:00:00 +0000 unbound: Import upstream 0ee44ef3 when ENOBUFS is returned From upstream 0ee44ef3: - Fix send of udp retries when ENOBUFS is returned. It stops looping and also waits for the condition to go away. Reported by Florian Obser. PR: 274352 Merge commit '292d51198aa319c58f534549851e9c28486abdf4' (cherry picked from commit 6e71235e558ef579605e7f35b02f983b9a246a4a) contrib/unbound/.gitignore (new) | 1 + contrib/unbound/util/netevent.c | 102 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 101 insertions(+), 2 deletions(-)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=64ac3bca3a6ec8510ae7175cbdd73aa594756e2a commit 64ac3bca3a6ec8510ae7175cbdd73aa594756e2a Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2023-10-13 00:04:25 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2023-10-16 04:00:36 +0000 unbound: Import upstream 0ee44ef3 when ENOBUFS is returned From upstream 0ee44ef3: - Fix send of udp retries when ENOBUFS is returned. It stops looping and also waits for the condition to go away. Reported by Florian Obser. PR: 274352 Merge commit '292d51198aa319c58f534549851e9c28486abdf4' (cherry picked from commit 6e71235e558ef579605e7f35b02f983b9a246a4a) contrib/unbound/.gitignore (new) | 1 + contrib/unbound/util/netevent.c | 102 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 101 insertions(+), 2 deletions(-)
A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=7d9c0fb578931f7f622970bad40d799abd74a76f commit 7d9c0fb578931f7f622970bad40d799abd74a76f Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2023-10-13 00:04:25 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2023-10-13 01:54:35 +0000 unbound: Import upstream 0ee44ef3 when ENOBUFS is returned From upstream 0ee44ef3: - Fix send of udp retries when ENOBUFS is returned. It stops looping and also waits for the condition to go away. Reported by Florian Obser. PR: 274352 Merge commit '292d51198aa319c58f534549851e9c28486abdf4' (cherry picked from commit 6e71235e558ef579605e7f35b02f983b9a246a4a) contrib/unbound/.gitignore (new) | 1 + contrib/unbound/util/netevent.c | 102 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 101 insertions(+), 2 deletions(-)