Log:
Jan 23 16:57:40 j-dnsmasq-2045570 dnsmasq[2222]: no servers found in /etc/resolv.conf, will retry
root@j-dnsmasq-2045570:~# dig @127.0.0.1 +short ubuntu.com
;; communications error to 127.0.0.1#53: timed out
;; communications error to 127.0.0.1#53: connection refused
;; communications error to 127.0.0.1#53: connection refused
;; no servers could be reached
And the log show a crash:
Jan 23 17:03:12 j-dnsmasq-2045570 dnsmasq[253]: no servers found in /etc/resolv.conf, will retry
Jan 23 17:03:16 j-dnsmasq-2045570 systemd[1]: dnsmasq.service: Main process exited, code=dumped, status=11/SEGV
Jan 23 17:03:16 j-dnsmasq-2045570 systemd[1]: dnsmasq.service: Failed with result 'core-dump'.
(it took about 3 attempts, but it crashed)
With the new package from jammy-proposed:
root@j-dnsmasq-2045570:~# apt-cache policy dnsmasq
dnsmasq:
Installed: 2.86-1.1ubuntu0.5
Candidate: 2.86-1.1ubuntu0.5
Version table:
*** 2.86-1.1ubuntu0.5 500
500 http://br.archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 Packages
100 /var/lib/dpkg/status
2.86-1.1ubuntu0.4 500
500 http://br.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages
2.86-1.1ubuntu0.3 500
500 http://br.archive.ubuntu.com/ubuntu jammy-security/universe amd64 Packages
2.86-1.1 500
500 http://br.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
When I perform the same test as before, I get an immediate empty result, and no crash, when resolv.conf contains no server:
root@j-dnsmasq-2045570:~# dig @127.0.0.1 +short ubuntu.com
root@j-dnsmasq-2045570:~#
And the previous result, which was cached, is still there:
root@j-dnsmasq-2045570:~# dig @127.0.0.1 +short linux.com
23.185.0.3
Logs remain silent:
Jan 23 17:08:14 j-dnsmasq-2045570 dnsmasq[1350]: no servers found in /etc/resolv.conf, will retry
If I revert resolv.conf to a working content:
root@j-dnsmasq-2045570:~# echo "nameserver 1.1.1.1" > /etc/resolv.conf
The log notices that:
Jan 23 17:57:47 j-dnsmasq-2045570 dnsmasq[7370]: reading /etc/resolv.conf
Jan 23 17:57:47 j-dnsmasq-2045570 dnsmasq[7370]: using nameserver 1.1.1.1#53
And the server resumes working:
root@j-dnsmasq-2045570:~# dig @127.0.0.1 +short ubuntu.com
185.125.190.21
185.125.190.29
185.125.190.20
root@j-dnsmasq-2045570:~# dig @127.0.0.1 +short linux.com
23.185.0.3
root@j-dnsmasq-2045570:~#
Reproducing the bug
root@j- dnsmasq- 2045570: ~# apt-cache policy dnsmasq br.archive. ubuntu. com/ubuntu jammy-updates/ universe amd64 Packages dpkg/status 86-1.1ubuntu0. 3 500 br.archive. ubuntu. com/ubuntu jammy-security/ universe amd64 Packages br.archive. ubuntu. com/ubuntu jammy/universe amd64 Packages
dnsmasq:
Installed: 2.86-1.1ubuntu0.4
Candidate: 2.86-1.1ubuntu0.4
Version table:
*** 2.86-1.1ubuntu0.4 500
500 http://
100 /var/lib/
2.
500 http://
2.86-1.1 500
500 http://
# dig @127.0.0.1 +short linux.com
23.185.0.3
# echo "#nameserver 1.1.1.1" > /etc/resolv.conf
#
Log:
Jan 23 16:57:40 j-dnsmasq-2045570 dnsmasq[2222]: no servers found in /etc/resolv.conf, will retry
root@j- dnsmasq- 2045570: ~# dig @127.0.0.1 +short ubuntu.com
;; communications error to 127.0.0.1#53: timed out
;; communications error to 127.0.0.1#53: connection refused
;; communications error to 127.0.0.1#53: connection refused
;; no servers could be reached
And the log show a crash:
Jan 23 17:03:12 j-dnsmasq-2045570 dnsmasq[253]: no servers found in /etc/resolv.conf, will retry
Jan 23 17:03:16 j-dnsmasq-2045570 systemd[1]: dnsmasq.service: Main process exited, code=dumped, status=11/SEGV
Jan 23 17:03:16 j-dnsmasq-2045570 systemd[1]: dnsmasq.service: Failed with result 'core-dump'.
(it took about 3 attempts, but it crashed)
With the new package from jammy-proposed: dnsmasq- 2045570: ~# apt-cache policy dnsmasq br.archive. ubuntu. com/ubuntu jammy-proposed/ universe amd64 Packages dpkg/status 86-1.1ubuntu0. 4 500 br.archive. ubuntu. com/ubuntu jammy-updates/ universe amd64 Packages 86-1.1ubuntu0. 3 500 br.archive. ubuntu. com/ubuntu jammy-security/ universe amd64 Packages br.archive. ubuntu. com/ubuntu jammy/universe amd64 Packages
root@j-
dnsmasq:
Installed: 2.86-1.1ubuntu0.5
Candidate: 2.86-1.1ubuntu0.5
Version table:
*** 2.86-1.1ubuntu0.5 500
500 http://
100 /var/lib/
2.
500 http://
2.
500 http://
2.86-1.1 500
500 http://
When I perform the same test as before, I get an immediate empty result, and no crash, when resolv.conf contains no server: dnsmasq- 2045570: ~# dig @127.0.0.1 +short ubuntu.com dnsmasq- 2045570: ~#
root@j-
root@j-
And the previous result, which was cached, is still there: dnsmasq- 2045570: ~# dig @127.0.0.1 +short linux.com
root@j-
23.185.0.3
Logs remain silent:
Jan 23 17:08:14 j-dnsmasq-2045570 dnsmasq[1350]: no servers found in /etc/resolv.conf, will retry
If I revert resolv.conf to a working content: dnsmasq- 2045570: ~# echo "nameserver 1.1.1.1" > /etc/resolv.conf
root@j-
The log notices that:
Jan 23 17:57:47 j-dnsmasq-2045570 dnsmasq[7370]: reading /etc/resolv.conf
Jan 23 17:57:47 j-dnsmasq-2045570 dnsmasq[7370]: using nameserver 1.1.1.1#53
And the server resumes working: dnsmasq- 2045570: ~# dig @127.0.0.1 +short ubuntu.com dnsmasq- 2045570: ~# dig @127.0.0.1 +short linux.com dnsmasq- 2045570: ~#
root@j-
185.125.190.21
185.125.190.29
185.125.190.20
root@j-
23.185.0.3
root@j-
Jammy verification succeeded.