Hi!
Describe the bug
Sporadic fatal errors possible at unbound start if the root-hints option is used.
The server may become unresponsive as a result.
The copy of the https://www.internic.net/domain/named.root is used for root-hints.
Errors seen (can occur either during one start attempt or be limited to one error per unsuccessful attempt):
error: reading root hints /root.hints 19:1: Empty label
error: reading root hints /root.hints 2:37: Syntax error, could not parse the RR's type
error: reading root hints /root.hints 2:9: Syntax error, could not parse the RR's type
error: reading root hints /root.hints 8:14: Syntax error, could not parse the RR's class
error: reading root hints /root.hints 13:15: Conversion error, ip6 addr expected
and so on..
so it ends up with:
error: Could not set root or stub hints and fatal error: Could not initialize thread (for one or more threads)
The sporadic nature of the errors and their content (error in reading the record type in a comment line, mismatch between the record type and the address type) suggest that there may be a thread race when reading a file?
To reproduce
Steps to reproduce the behavior:
- Use
root-hints option
- Сreate conditions for periodic unbound restart
- Wait
Expected behavior
A clear and concise description of what you expected to happen.
System:
- Unbound version: 1.19.3
- OS: FreeBSD 13.2-RELEASE-p10
unbound -V output:
--with-libexpat=/usr/local --with-ssl=/usr/local --enable-dnscrypt --disable-dnstap --with-libnghttp2 --with-dynlibmodule --enable-ecdsa --disable-event-api --enable-gost --with-libevent --with-pythonmodule=yes --with-pyunbound=yes ac_cv_path_SWIG=/usr/local/bin/swig LDFLAGS=-L/usr/local/lib --disable-subnet --disable-tfo-client --disable-tfo-server --with-pthreads --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/share/man --infodir=/usr/local/share/info/ --build=amd64-portbld-freebsd13.2
Linked libs: libevent 2.1.12-stable (it uses kqueue), OpenSSL 3.0.13 30 Jan 2024
Linked modules: dns64 python dynlib respip validator iterator
DNSCrypt feature available
Additional information
not yet
Thanks!
cc @fichtner
Hi!
Describe the bug
Sporadic fatal errors possible at unbound start if the
root-hintsoption is used.The server may become unresponsive as a result.
The copy of the https://www.internic.net/domain/named.root is used for root-hints.
Errors seen (can occur either during one start attempt or be limited to one error per unsuccessful attempt):
error: reading root hints /root.hints 19:1: Empty labelerror: reading root hints /root.hints 2:37: Syntax error, could not parse the RR's typeerror: reading root hints /root.hints 2:9: Syntax error, could not parse the RR's typeerror: reading root hints /root.hints 8:14: Syntax error, could not parse the RR's classerror: reading root hints /root.hints 13:15: Conversion error, ip6 addr expectedand so on..
so it ends up with:
error: Could not set root or stub hintsandfatal error: Could not initialize thread(for one or more threads)The sporadic nature of the errors and their content (error in reading the record type in a comment line, mismatch between the record type and the address type) suggest that there may be a thread race when reading a file?
To reproduce
Steps to reproduce the behavior:
root-hintsoptionExpected behavior
A clear and concise description of what you expected to happen.
System:
unbound -Voutput:Additional information
not yet
Thanks!
cc @fichtner