Solved update from ports breaks chroot bind, dig - what to do?

Hello,
I have update older ports to the new versions. After that I can no more start bind, named in a chrooted environment. That I figured out:
dig -v
error: "ld-elf.so.1: /usr/local/lib/libfstrm.so.0: version LIBFSTRM_0.2.0 required by /usr/local/lib/bind-tools/libdns-9.20.2.so not defined"

google: /usr/local/lib/bind-tools/libdns-9.20.2.so
--> 282060 – devel/protobuf-c: 1.4.1_6 breaks dig
Inside the bugzilla it's written: Reported: 2024-10-13 16:38 UTC by Niall.oReilly+freebsd
After upgrading to protobuf-c 1.4.1_6, dig fails, apparently because version exposed
by /usr/local/lib/libprotobuf-c.so.1 does not match what is required.
...
pkg info protobuf-c | grep -i ^version
Version : 1.4.1_6
...
Observed on sibling system after reverting to 1.4.1_5:
...
pkg info protobuf-c | grep -i ^version
Version : 1.4.1_5
dig -v works
also starting named /usr/local/etc/rc.d/named start
give this errors
ld-elf.so.1: /usr/local/lib/libfstrm.so.0: version LIBFSTRM_0.2.0 required by /usr/local/lib/libdns-9.18.30.so not defined
/usr/local/etc/rc.d/named: ERROR: named-checkconf for /usr/local/etc/namedb/named.conf failed
in ../log/messages
Oct 27 14:56:42 named[28168]: netmgr/netmgr.c:302:isc__netmgr_create(): fatal error:
Oct 27 14:56:42 named[28168]: uv_loop_init failed: no such file or directory
Oct 27 14:56:42 named[28168]: exiting (due to fatal error in library)
Oct 27 14:56:42 root[29187]: /usr/local/etc/rc.d/named: WARNING: failed to start named

in my reinstall.log I see some warnings
$ cat reinstall.log | grep warning

libtool: warning: '../../lib/isc/libisc.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/dns/libdns.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/ns/libns.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/isccc/libisccc.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/isccfg/libisccfg.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/bind9/libbind9.la' has not been installed in '/usr/local/lib'
libtool: warning: '/usr/ports/dns/bind918/work/bind-9.18.30/lib/ns/libns.la' has not been installed in '/usr/local/lib'
libtool: warning: '/usr/ports/dns/bind918/work/bind-9.18.30/lib/isccfg/libisccfg.la' has not been installed in '/usr/local/lib'
libtool: warning: '/usr/ports/dns/bind918/work/bind-9.18.30/lib/dns/libdns.la' has not been installed in '/usr/local/lib'
libtool: warning: '/usr/ports/dns/bind918/work/bind-9.18.30/lib/isc/libisc.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/isc/libisc.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/dns/libdns.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/isccc/libisccc.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/isccfg/libisccfg.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/bind9/libbind9.la' has not been installed in '/usr/local/lib'
libtool: warning: '/usr/ports/dns/bind918/work/bind-9.18.30/lib/ns/libns.la' has not been installed in '/usr/local/lib'
libtool: warning: '/usr/ports/dns/bind918/work/bind-9.18.30/lib/isccfg/libisccfg.la' has not been installed in '/usr/local/lib'
libtool: warning: '/usr/ports/dns/bind918/work/bind-9.18.30/lib/dns/libdns.la' has not been installed in '/usr/local/lib'
libtool: warning: '/usr/ports/dns/bind918/work/bind-9.18.30/lib/isc/libisc.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/dns/libdns.la' has not been installed in '/usr/local/lib'
libtool: warning: '/usr/ports/dns/bind918/work/bind-9.18.30/lib/isc/libisc.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/isc/libisc.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/isc/libisc.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/isc/libisc.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/dns/libdns.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/ns/libns.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/isccfg/libisccfg.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/bind9/libbind9.la' has not been installed in '/usr/local/lib'
libtool: warning: '/usr/ports/dns/bind918/work/bind-9.18.30/lib/ns/libns.la' has not been installed in '/usr/local/lib'
libtool: warning: '/usr/ports/dns/bind918/work/bind-9.18.30/lib/isccfg/libisccfg.la' has not been installed in '/usr/local/lib'
libtool: warning: '/usr/ports/dns/bind918/work/bind-9.18.30/lib/dns/libdns.la' has not been installed in '/usr/local/lib'
libtool: warning: '/usr/ports/dns/bind918/work/bind-9.18.30/lib/isc/libisc.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/isc/libisc.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/dns/libdns.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/ns/libns.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/isccfg/libisccfg.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/bind9/libbind9.la' has not been installed in '/usr/local/lib'
libtool: warning: '/usr/ports/dns/bind918/work/bind-9.18.30/lib/ns/libns.la' has not been installed in '/usr/local/lib'
libtool: warning: '/usr/ports/dns/bind918/work/bind-9.18.30/lib/isccfg/libisccfg.la' has not been installed in '/usr/local/lib'
libtool: warning: '/usr/ports/dns/bind918/work/bind-9.18.30/lib/dns/libdns.la' has not been installed in '/usr/local/lib'
libtool: warning: '/usr/ports/dns/bind918/work/bind-9.18.30/lib/isc/libisc.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/isc/libisc.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/dns/libdns.la' has not been installed in '/usr/local/lib'
libtool: warning: '/usr/ports/dns/bind918/work/bind-9.18.30/lib/isc/libisc.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/isc/libisc.la' has not been installed in '/usr/local/lib'
libtool: warning: '../../lib/dns/libdns.la' has not been installed in '/usr/local/lib'
libtool: warning: '/usr/ports/dns/bind918/work/bind-9.18.30/lib/isc/libisc.la' has not been installed in '/usr/local/lib'
How to solve that problem?
or
How to downgrade to protobuf-c Version : 1.4.1_5 inside the ports ?
Port: protobuf-c-1.4.1_6
Path: /usr/ports/devel/protobuf-c
 
1.4.1_5 vs 1.4.1_6 is only a bump of the PORTREVISION, not a 'new' version. PORTREVISION isn't related to the version of the upstream code.

There has been an update to devel/protobuf though, its version changed from 28.1 to 28.2.
 
I remember that I got some errors with my /etc/make.conf. So I disabled the file by renaming it.
I reinstalled devel/protobuf-c and /dns/bind-tools.
Now dig -v is working and the
error: "ld-elf.so.1: /usr/local/lib/libfstrm.so.0: version LIBFSTRM_0.2.0 required by /usr/local/lib/bind-tools/libdns-9.20.2.so not defined"
is gone.

I also reinstalled ../dns/bind918 but I still get this error in /var/log/messages:
netmgr/netmgr.c:302:isc__netmgr_create(): fatal error:
uv_loop_init failed: no such file or directory
exiting (due to fatal error in library)
/usr/local/etc/rc.d/named: WARNING: failed to start named
bind is started with named -t <path to chroot> -u bind -c /usr/local/etc/namedb/named.conf
as it is written in /etc/rc.conf and has not been changed.

If I start bind as root with
named
or
named -u root -c /usr/local/etc/namedb/named.conf
bind/named is running?

If have nothing changed in the configuration - test is good
$ named-checkconf -v
9.18.30

In the code of netmgr.c:302 line 302 I see
https://gitlab.isc.org/isc-projects...8/lib/isc/netmgr/netmgr.c?ref_type=heads#L302
291 ...
292 for (int i = 0; i < mgr->nworkers; i++) {
isc__networker_t *worker = &mgr->workers;
int r;

*worker = (isc__networker_t){
.mgr = mgr,
.id = i,
};

301 r = uv_loop_init(&worker->loop);
302 UV_RUNTIME_CHECK(uv_loop_init, r);
...

May be that gives anyone a Idea what is going wrong.
How can I fixed this?
 
What I found was that an update (which I stupidly didn't keep track of) with packages broke bind-tools. I would do a dig whatever, and get a message that it couldn't find a library (or maybe a shared object). At any rate, all I did was pkg remove bind-tools, then pkg install bind-tools and everything worked again. I don't know if it was upgrading something with a port that broke it (the only ports I think I installed recently were dwm and dwl), or something in pkg, but at any rate, as it was quickly and easily fixed I didn't pay much attention to it.
 
Now dig -v is working and the
Code:
error: "ld-elf.so.1: /usr/local/lib/libfstrm.so.0: version LIBFSTRM_0.2.0 required by /usr/local/lib/bind-tools/libdns-9.20.2.so not defined"
is gone.
The library error is different from the one in the PR:
Code:
ld-elf.so.1: /usr/local/lib/libprotobuf-c.so.1: version LIBPROTOBUF_C_1.0.0 required by /usr/local/lib/bind-tools/libdns-9.20.2.so not defined

Yours refers to devel/fstrm:
Code:
% pkg which /usr/local/lib/libfstrm.so.0
/usr/local/lib/libfstrm.so.0 was installed by package fstrm-0.6.1_1
 
I could still not start named
$: named -t "path-to-chroot" -u bind -c /usr/local/etc/namedb/named.conf

bind on fbsd no longer starting (Oct 14 2024)
Bug 282088 - dns/bind918 or dns/920: named no longer starts

I think in libuv.so.1 is a bug. I have now do this:
$ locate libuv.so.1
/usr/local/lib/libuv.so.1
/usr/local/lib/libuv.so.1.0.0
"path-to-jail"/usr/local/lib/libuv.so.1
"path-to-jail"/usr/local/lib/libuv.so.1.0.0

host $: pkg info libuv
--> Version : 1.49.0

jail $: pkg info libuv
--> Version : 1.48.0

$ ll "path-to-jail"/usr/local/lib/libuv.so.1
lrwxr-xr-x 1 root wheel 14 Apr. 5 2024 "path-to-jail"/usr/local/lib/libuv.so.1 -> libuv.so.1.0.0
-->OK "libuv.so.1" is a link from "libuv.so.1.0.0"

I try the following:
$ mv /usr/local/lib/libuv.so.1.0.0 /usr/local/lib/libuv.so.1.0.0.sav
$ cp "path-to-jail"/usr/local/lib/libuv.so.1.0.0 /usr/local/lib/
$ named -t "path-to-chroot" -u bind -c /usr/local/etc/namedb/named.conf
result: named start withou any error
then I try
$ dig -v
error ld-elf.so.1: Shared object "libicudata.so.74" not found, required by "libxml2.so.2"
$ cp /usr/local/lib/libuv.so.1.0.0 /usr/local/lib/libuv.so.1.0.0.old
$ cp /usr/local/lib/libuv.so.1.0.0.sav /usr/local/lib/libuv.so.1.0.0
$ dig -v
result: DiG 9.20.2
$ named -t "path-to-chroot" -u bind -c /usr/local/etc/namedb/named.conf
error: netmgr/netmgr.c:302:isc__netmgr_create(): fatal error:
uv_loop_init failed: no such file or directory
exiting (due to fatal error in library)
WARNING: failed to start named

$ cp /usr/local/lib/libuv.so.1.0.0.old /usr/local/lib/libuv.so.1.0.0
$ named -t "path-to-chroot" -u bind -c /usr/local/etc/namedb/named.conf
result: named starts again
$ dig -v
result: DiG 9.20.2 # is working too ???

I do not understand what is going on here - please help?

The actual Version : 1.49.0 of libuv breaks named from starting. I try to debug with $: named -d 9 ... but there is no other output as in /var/log/messages.

$: pkg info -r libuv
libuv-1.49.1:
bind918-9.18.30
bind-tools-9.20.2
cmake-core-3.30.5

In addition: how can I find out what is the exact version of /usr/local/lib/libuv.so.1.0.0 without pkg command or using ports version?
 
Today 01/11/2024 was an update for libuv to version libuv-1.49.2.
With this update the problem is solved.
named starts again as expected.
 
Ah, well, my DNS started to go down today and I realized bind920 wasn't starting. I use the package manager and I can only assume some recent pkg update has hurt things. I've tried remove/installs of 918, 920, and devel and they all crap out in libuv 1.49.0. I *really* need to get named up again and welcome any thoughts. My last foreground run:

Code:
04-Nov-2024 21:14:54.288 starting BIND 9.20.2 (Stable Release) <id:>
04-Nov-2024 21:14:54.288 running on FreeBSD amd64 14.1-RELEASE-p5 FreeBSD 14.1-RELEASE-p5 GENERIC
04-Nov-2024 21:14:54.288 built with  '--localstatedir=/var' '--sysconfdir=/usr/local/etc/namedb' '--with-libxml2' '--with-openssl=/usr' '--enable-dnsrps' '--with-readline=libedit' '--disable-tracing' '--enable-dnstap' '--disable-fixed-rrset' '--disable-geoip' '--without-maxminddb' '--without-gssapi' '--with-libidn2=/usr/local' '--with-json-c' '--disable-largefile' '--with-lmdb=/usr/local' '--disable-querytrace' '--enable-tcp-fastopen' '--prefix=/usr/local' '--mandir=/usr/local/share/man' '--disable-silent-rules' '--infodir=/usr/local/share/info/' '--build=amd64-portbld-freebsd14.1' 'build_alias=amd64-portbld-freebsd14.1' 'CC=cc' 'CFLAGS=-O2 -pipe  -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing ' 'LDFLAGS= -L/usr/local/lib -ljson-c  -fstack-protector-strong ' 'LIBS=-L/usr/local/lib' 'CPPFLAGS=-DLIBICONV_PLUG -isystem /usr/local/include' 'CPP=cpp' 'PKG_CONFIG=pkgconf' 'PKG_CONFIG_LIBDIR=/wrkdirs/usr/ports/dns/bind920/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig' 'PYTHON=/usr/local/bin/python3.11'
04-Nov-2024 21:14:54.288 running as: named -g -d 5 -t /var/named -u bind -c /etc/namedb/named.conf
04-Nov-2024 21:14:54.288 compiled by CLANG FreeBSD Clang 18.1.5 (https://github.com/llvm/llvm-project.git llvmorg-18.1.5-0-g617a15a9eac9)
04-Nov-2024 21:14:54.288 compiled with OpenSSL version: OpenSSL 3.0.13 30 Jan 2024
04-Nov-2024 21:14:54.288 linked to OpenSSL version: OpenSSL 3.0.13 30 Jan 2024
04-Nov-2024 21:14:54.288 compiled with libuv version: 1.49.0
04-Nov-2024 21:14:54.288 linked to libuv version: 1.49.0
04-Nov-2024 21:14:54.288 compiled with liburcu version: 0.14.0
04-Nov-2024 21:14:54.288 compiled with system jemalloc version: 2020110501
04-Nov-2024 21:14:54.288 compiled with libnghttp2 version: 1.63.0
04-Nov-2024 21:14:54.288 linked to libnghttp2 version: 1.63.0
04-Nov-2024 21:14:54.288 compiled with libxml2 version: 2.11.9
04-Nov-2024 21:14:54.288 linked to libxml2 version: 21109
04-Nov-2024 21:14:54.288 compiled with json-c version: 0.18
04-Nov-2024 21:14:54.288 linked to json-c version: 0.18
04-Nov-2024 21:14:54.288 compiled with zlib version: 1.3.1
04-Nov-2024 21:14:54.288 linked to zlib version: 1.3.1
04-Nov-2024 21:14:54.288 compiled with protobuf-c version: 1.4.1
04-Nov-2024 21:14:54.288 linked to protobuf-c version: 1.4.1
04-Nov-2024 21:14:54.288 ----------------------------------------------------
04-Nov-2024 21:14:54.288 BIND 9 is maintained by Internet Systems Consortium,
04-Nov-2024 21:14:54.288 Inc. (ISC), a non-profit 501(c)(3) public-benefit
04-Nov-2024 21:14:54.288 corporation.  Support and training for BIND 9 are
04-Nov-2024 21:14:54.288 available at https://www.isc.org/support
04-Nov-2024 21:14:54.288 ----------------------------------------------------
04-Nov-2024 21:14:54.288 the limit on open files is already at the maximum allowed value: 87300
04-Nov-2024 21:14:54.288 found 2 CPUs, using 2 worker threads
04-Nov-2024 21:14:54.288 loop.c:201:loop_init(): fatal error:
04-Nov-2024 21:14:54.288 uv_loop_init failed: operation not supported on socket

04-Nov-2024 21:14:54.288 exiting (due to fatal error in library)
Abort trap

918 fails the same, yet different....

Code:
04-Nov-2024 20:54:54.038 found 2 CPUs, using 2 worker threads
04-Nov-2024 20:54:54.038 using 2 UDP listeners per interface
04-Nov-2024 20:54:54.038 netmgr/netmgr.c:302:isc__netmgr_create(): fatal error:
04-Nov-2024 20:54:54.038 uv_loop_init failed: operation not supported on socket
 
Back
Top