DNS stops working when changing networks

Bug #1642973 reported by gpothier
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dnsmasq (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Since upgrading to 16.10 I am having frequent DNS failures. It usually happens when I change networks and after resume from suspend, for example going to home from work, or vice versa. When this happens, connectivity is fine (I can ping 8.8.8.8 for instance), but I cannot resolve names (eg. google.com).
Restarting network-manager instantaneously fixes the issue.

Curiously I have not found this bug on Launchpad. Here is some related stuff I've seen:

https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/1640286
(as described, it seems specific to Chrome)

https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1592721
(DNS resolution issues with VPNs, but it looks like it has been solved; at least I am not affected anymore)

http://askubuntu.com/questions/838948/16-10-fail-to-resolve-dns
(forum post that describes a similar issue, but again for VPNs)

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: resolvconf 1.79ubuntu1
ProcVersionSignature: Ubuntu 4.8.0-27.29-generic 4.8.1
Uname: Linux 4.8.0-27-generic x86_64
ApportVersion: 2.20.3-0ubuntu8
Architecture: amd64
CurrentDesktop: GNOME
Date: Fri Nov 18 11:07:53 2016
InstallationDate: Installed on 2015-01-23 (664 days ago)
InstallationMedia: Ubuntu-GNOME 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
PackageArchitecture: all
SourcePackage: resolvconf
UpgradeStatus: Upgraded to yakkety on 2016-10-30 (19 days ago)

Revision history for this message
gpothier (gpothier) wrote :
Revision history for this message
Steve Langasek (vorlon) wrote :

When this happens, what are the complete contents of /run/resolvconf ? (please attach as a tarball)

When this happens, do you have a dnsmasq process running for NetworkManager?

If you send dnsmasq SIGUSR1 (pkill -SIGUSR1 dnsmasq), what does it log to /var/log/syslog?

Changed in resolvconf (Ubuntu):
status: New → Incomplete
Revision history for this message
gpothier (gpothier) wrote :

Ok, here it goes. /run/resolvconf is attached.

It looks like there are several dnsmasq processes, but it is also the case when things work. Here are the processes when it doesn't work:

gpothier@tadzim3:addons$ ps aux |grep dnsmasq
libvirt+ 1614 0.0 0.0 50200 1324 ? S nov14 0:00 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
root 1615 0.0 0.0 50172 20 ? S nov14 0:00 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
nobody 24365 0.0 0.0 54308 3768 ? S 11:05 0:00 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/var/run/NetworkManager/dnsmasq.pid --listen-address=127.0.1.1 --cache-size=0 --conf-file=/dev/null --proxy-dnssec --enable-dbus=org.freedesktop.NetworkManager.dnsmasq --conf-dir=/etc/NetworkManager/dnsmasq.d
gpothier 32400 0.0 0.0 15448 976 pts/6 S+ 13:54 0:00 grep --color=auto dnsmasq

And here's what syslog says with the pkill:

Nov 18 13:56:01 tadzim3 dnsmasq[24365]: time 1479488161
Nov 18 13:56:01 tadzim3 dnsmasq[1614]: time 1479488161
Nov 18 13:56:01 tadzim3 dnsmasq[24365]: cache size 0, 0/0 cache insertions re-used unexpired cache entries.
Nov 18 13:56:01 tadzim3 dnsmasq[1614]: cache size 150, 0/0 cache insertions re-used unexpired cache entries.
Nov 18 13:56:01 tadzim3 dnsmasq[24365]: queries forwarded 6542, queries answered locally 3
Nov 18 13:56:01 tadzim3 dnsmasq[1614]: queries forwarded 0, queries answered locally 0
Nov 18 13:56:01 tadzim3 dnsmasq[24365]: queries for authoritative zones 0
Nov 18 13:56:01 tadzim3 dnsmasq[1614]: queries for authoritative zones 0
Nov 18 13:56:01 tadzim3 dnsmasq[1614]: server 127.0.1.1#53: queries sent 0, retried or failed 0
Nov 18 13:56:01 tadzim3 dnsmasq[24365]: server 192.168.0.2#53: queries sent 129, retried or failed 103

Revision history for this message
Steve Langasek (vorlon) wrote :

Thanks.

 Nov 18 13:56:01 tadzim3 dnsmasq[24365]: server 192.168.0.2#53: queries sent 129, retried or failed 103

Is 192.168.0.2 the correct DNS server for your current network connection, when this happens?

Revision history for this message
gpothier (gpothier) wrote :

Yes, 192.168.0.2 is the gateway and DNS server for this connection.

Revision history for this message
gpothier (gpothier) wrote :

Any idea of how I could help debug this issue? It is 100% reproducible, so I can do whatever testing is needed.

Revision history for this message
Steve Langasek (vorlon) wrote :

Sorry for not following up sooner. no further ideas how to debug, but I think it's reasonably clear this is a dnsmasq issue rather thana resolvconf issue. Reassigning.

affects: resolvconf (Ubuntu) → dnsmasq (Ubuntu)
Changed in dnsmasq (Ubuntu):
status: Incomplete → New
Revision history for this message
Robie Basak (racb) wrote :

I'm afraid I don't know how to help debug this either. At the moment, I don't think it's clear whether this is a bug or not, as opposed to some kind of local configuration issue, especially as we seem to have only one report of this problem.

If you can provide steps that somebody else can use to reproduce, please do so. Otherwise, I'm afraid that it doesn't seem likely that this report can make further progress, so I'm marking it Incomplete for now to make this clear.

To get community help, there are pointers at http://www.ubuntu.com/support/community - though it looks like you know about these already.

Changed in dnsmasq (Ubuntu):
status: New → Incomplete
Revision history for this message
Robie Basak (racb) wrote :

Though could this be the same as bug 1631241? There's a patch linked in that bug.

Revision history for this message
gpothier (gpothier) wrote :

The problem seems to have been resolved in 17.04, I haven't hit it since I upgraded.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for dnsmasq (Ubuntu) because there has been no activity for 60 days.]

Changed in dnsmasq (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.