Thanks for all the details, I tried to reproduce on 17.04 as that is the release it shows up for you.
In a new zesty container first without dnsmasq installed I see the follwing base config in /etc/resolve.conf: - 10.0.4.1 is my local dns which forwards to my provider - 127.0.0.53 of systemd-resolv on second place. Neither of those can resolve the host as expected. $ nslookup cf.shareasimage.com $ nslookup cf.shareasimage.com 127.0.0.53 [...] both don't find it. Installing dnsmasq changes resolv conf to: - 127.0.0.1 which s dnsmasq In turn dnsmasq has the old two dns servers in its /run/dnsmasq/resolv.conf Still none of the tries to resolve work - as expected - but also none fall into a loop. I placed the adblock config you had, but still no loop. I enabled log-queries as you had and here is what I get to compare: dnsmasq[1217]: query[A] cf.shareasimage.com from 127.0.0.1 dnsmasq[1217]: forwarded cf.shareasimage.com to 10.0.4.1 dnsmasq[1217]: forwarded cf.shareasimage.com to 127.0.0.53 dnsmasq[1217]: query[A] cf.shareasimage.com from 127.0.0.1 dnsmasq[1217]: forwarded cf.shareasimage.com to 10.0.4.1 If I re-lookup very fast it only ahs one forward end replies the not-found. If I wait a while it asks both again. Now compared to your setup mine asks systemd-resolvd on 127.0.0.53 AND my provider via the router on 10.0.4.1. In you initial log I never saw this. Maybe there is the issue, what had your /etc/resolv.conf before installing? And in turn what has you /run/dnsmasq/resolv.conf? Trying to force that with an intentionally broken /run/dnsmasq/resolv.conf taking out the uplink DNS and only leaving systemd-resolvd there and then reloading the service recreates your case I think. After a while nslookup and such give up with: $ nslookup cf.shareasimage.com ;; connection timed out; no servers could be reached But the log has about 20 forwarding entries, it seems that systemd-resolvd gives an answer causing this - we know it can't resolve the dns already. But it is not looping forever, once the client gives up it stops - or vice versa I assume once dnsmasq gives up on trying it returns the timeout. Now for case I'd almost consider that a broken DNS config, pelase check your /run/dnsmasq/resolv.conf and why it might miss the uplink DNS. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to dnsmasq in Ubuntu. https://bugs.launchpad.net/bugs/1688364 Title: Non existent host causes 100% cpu utilization by systemd-resolved and dnsmasq Status in dnsmasq package in Ubuntu: Incomplete Bug description: May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] cf.shareasimage.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded cf.shareasimage.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] cf.shareasimage.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded cf.shareasimage.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] googletagservices.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded googletagservices.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] cf.shareasimage.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded cf.shareasimage.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] cf.shareasimage.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded cf.shareasimage.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] googletagservices.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded googletagservices.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] cf.shareasimage.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded cf.shareasimage.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] cf.shareasimage.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded cf.shareasimage.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] googletagservices.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded googletagservices.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] cf.shareasimage.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded cf.shareasimage.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] cf.shareasimage.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded cf.shareasimage.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] googletagservices.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded googletagservices.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] cf.shareasimage.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded cf.shareasimage.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] cf.shareasimage.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded cf.shareasimage.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] googletagservices.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded googletagservices.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] cf.shareasimage.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded cf.shareasimage.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] cf.shareasimage.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded cf.shareasimage.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] googletagservices.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded googletagservices.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] cf.shareasimage.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded cf.shareasimage.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] cf.shareasimage.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded cf.shareasimage.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] googletagservices.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded googletagservices.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] cf.shareasimage.com from 127.0.0.1 May 04 13:32:07 cannon-fodder dnsmasq[8101]: forwarded cf.shareasimage.com to 127.0.0.53 May 04 13:32:07 cannon-fodder dnsmasq[8101]: query[A] cf.shareasimage.com from 127.0.0.1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dnsmasq/+bug/1688364/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp