Skip to content

systemd-resolved slow and appears to be using disabled interfaces #30577

Open

Description

@agowa

systemd version the issue has been seen with

255

Used distribution

ArchLinux

Linux kernel version used

6.6.3-arch1-1

CPU architectures issue was seen on

x86_64

Component

resolvectl, systemd-resolved

Expected behaviour you didn't see

systemd-resolved should use the available DNS servers. And "resolvectl query" behavior should match the configuration.
Also systemd-resolved is very slow and sluggish with dns responses. When I add the for DefaultRoute configured dns servers directly to my /etc/resolv.conf everything is way faster. I get 0 time outs within web browsers with these dns servers configured directly. But I get countless reloads, slow downs and timeouts (which vanish shortly after, probably an automatic retry).

Edit: I now restarted systemd-resolved.service after adding the SYSTEMD_LOG_LEVEL=debug env var. And now it doesn't use the vlan10 at all anymore. It only uses vlan20 as it says and as it should. wtf?!?
Edit2: Bug only happens when there is a cache miss on the configured DNS server. I don't understand what it is doing, but I'm going to attach the log below now. Why does it use vlan10???

Unexpected behaviour you saw

[root@PC001 user]# resolvectl 
Global
           Protocols: -LLMNR +mDNS DNSOverTLS=opportunistic DNSSEC=no/unsupported
    resolv.conf mode: stub
  Current DNS Server: 2001:4860:4860::8888
         DNS Servers: 2606:4700:4700::1111 2001:4860:4860::8888 2606:4700:4700::1001 2001:4860:4860::8844
Fallback DNS Servers: 1.1.1.1 8.8.8.8 1.0.0.1 8.8.4.4

Link 2 (eth2)
    Current Scopes: none
         Protocols: -DefaultRoute -LLMNR -mDNS DNSOverTLS=opportunistic DNSSEC=no/unsupported

Link 3 (bond0)
    Current Scopes: none
         Protocols: -DefaultRoute -LLMNR -mDNS DNSOverTLS=opportunistic DNSSEC=no/unsupported

Link 4 (eth0)
    Current Scopes: none
         Protocols: -DefaultRoute -LLMNR -mDNS DNSOverTLS=opportunistic DNSSEC=no/unsupported

Link 5 (ovs-system)
    Current Scopes: none
         Protocols: -DefaultRoute -LLMNR -mDNS DNSOverTLS=opportunistic DNSSEC=no/unsupported

Link 6 (vlan10)
    Current Scopes: mDNS/IPv4 mDNS/IPv6
         Protocols: -DefaultRoute -LLMNR +mDNS DNSOverTLS=opportunistic DNSSEC=no/unsupported

Link 7 (vlan20)
    Current Scopes: DNS mDNS/IPv6
         Protocols: +DefaultRoute -LLMNR +mDNS DNSOverTLS=opportunistic DNSSEC=no/unsupported
Current DNS Server: fddd:cc66:fdd6:aa06:82fa:fdec:38eb:fb8
       DNS Servers: fddd:cc66:fdd6:aa06:82fa:fdec:38eb:fb8

Link 8 (ovsbr0)
    Current Scopes: none
         Protocols: -DefaultRoute -LLMNR -mDNS DNSOverTLS=opportunistic DNSSEC=no/unsupported

Link 9 (vlan30)
    Current Scopes: none
         Protocols: -DefaultRoute -LLMNR -mDNS DNSOverTLS=opportunistic DNSSEC=no/unsupported

Link 10 (eth1)
    Current Scopes: none
         Protocols: -DefaultRoute -LLMNR -mDNS DNSOverTLS=opportunistic DNSSEC=no/unsupported

Link 11 (vnet0)
    Current Scopes: none
         Protocols: -DefaultRoute -LLMNR -mDNS DNSOverTLS=opportunistic DNSSEC=no/unsupported

Link 12 (vnet1)
    Current Scopes: none
         Protocols: -DefaultRoute -LLMNR -mDNS DNSOverTLS=opportunistic DNSSEC=no/unsupported
[root@PC001 user]# resolvectl query google.de
google.de: 172.217.18.3                        -- link: vlan10
           2a00:1450:4001:80b::2003            -- link: vlan10

-- Information acquired via protocol DNS in 33.6ms.
-- Data is authenticated: no; Data was acquired via local or encrypted transport: yes
-- Data from: network
[root@PC001 user]# resolvectl query google.de.
google.de.: 142.250.184.195                    -- link: vlan20
            2a00:1450:4001:830::2003           -- link: vlan20
            (google.de)

-- Information acquired via protocol DNS in 21.4ms.
-- Data is authenticated: no; Data was acquired via local or encrypted transport: no
-- Data from: network
[root@PC001 user]# resolvectl query google.com.
google.com.: 2a00:1450:4001:82b::200e          -- link: vlan10
             142.250.186.46                    -- link: vlan10
             (google.com)

-- Information acquired via protocol DNS in 18.2ms.
-- Data is authenticated: no; Data was acquired via local or encrypted transport: yes
-- Data from: network
[root@PC001 user]# resolvectl query google.com.
google.com.: 2a00:1450:4001:82b::200e          -- link: vlan10
             142.250.186.46                    -- link: vlan10
             (google.com)

-- Information acquired via protocol DNS in 897us.
-- Data is authenticated: no; Data was acquired via local or encrypted transport: yes
-- Data from: cache

Steps to reproduce the problem

I don't know. The configuration I see using resolvectl does not match what resolvctl query outputs when actually tried.
And it isn't deterministic either. Sometimes when I run multiple queries it flips without me changing anything on the configuration to vlan20 (as it should be).
I don't even know which server systemd-resolved thinks it is asking on vlan10 as it itself says there is none configured. And I doubt that it uses mDNS for queries to e.g. google...

I don't know where this behavior originates from, so I don't have a debu log (yet).
Until now on the info level I see, but nothing for today (21st) where I had a bunch of dns related issues.

Dec 16 21:10:40 PC001 systemd-resolved[95914]: Using degraded feature set UDP+EDNS0 instead of TLS+EDNS0 for DNS server fddd:cc66:fdd6:aa06:82fa:fdec:38eb:fb8.
Dec 17 03:28:35 PC001 systemd-resolved[95914]: Using degraded feature set UDP+EDNS0 instead of TLS+EDNS0 for DNS server 2001:4860:4860::8844.
Dec 17 03:29:09 PC001 systemd-resolved[95914]: Using degraded feature set UDP instead of UDP+EDNS0 for DNS server 2001:4860:4860::8844.
Dec 17 03:52:13 PC001 systemd-resolved[95914]: Using degraded feature set TCP instead of UDP for DNS server 2001:4860:4860::8844.
Dec 17 11:59:57 PC001 systemd-resolved[95914]: Using degraded feature set UDP+EDNS0 instead of TLS+EDNS0 for DNS server fddd:cc66:fdd6:aa06:82fa:fdec:38eb:fb8.
Dec 18 11:20:30 PC001 systemd-resolved[95914]: Using degraded feature set UDP+EDNS0 instead of TLS+EDNS0 for DNS server fddd:cc66:fdd6:aa06:82fa:fdec:38eb:fb8.
Dec 19 00:18:01 PC001 systemd-resolved[95914]: Using degraded feature set UDP+EDNS0 instead of TLS+EDNS0 for DNS server fddd:cc66:fdd6:aa06:82fa:fdec:38eb:fb8.
Dec 19 11:49:21 PC001 systemd-resolved[95914]: Grace period over, resuming full feature set (TLS+EDNS0) for DNS server 2606:4700:4700::1001.
Dec 20 02:24:28 PC001 systemd-resolved[95914]: Using degraded feature set UDP+EDNS0 instead of TLS+EDNS0 for DNS server fddd:cc66:fdd6:aa06:82fa:fdec:38eb:fb8.
Dec 20 02:27:01 PC001 systemd-resolved[95914]: Using degraded feature set UDP+EDNS0 instead of TLS+EDNS0 for DNS server fddd:cc66:fdd6:aa06:82fa:fdec:38eb:fb8.
Dec 20 02:28:00 PC001 systemd-resolved[95914]: Using degraded feature set UDP+EDNS0 instead of TLS+EDNS0 for DNS server fddd:cc66:fdd6:aa06:82fa:fdec:38eb:fb8.
Dec 20 02:28:12 PC001 systemd-resolved[95914]: Using degraded feature set UDP+EDNS0 instead of TLS+EDNS0 for DNS server fddd:cc66:fdd6:aa06:82fa:fdec:38eb:fb8.

Additional program output to the terminal or log subsystem illustrating the issue

# journalctl -fe --unit systemd-resolved.service | grep "bbc.co.uk"
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: idn2_lookup_u8: bbc.co.uk → bbc.co.uk
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Looking up RR for bbc.co.uk IN A.
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Looking up RR for bbc.co.uk IN AAAA.
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Cache miss for bbc.co.uk IN AAAA
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Firing regular transaction 3236 for <bbc.co.uk IN AAAA> scope dns on */* (validate=yes).
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Cache miss for bbc.co.uk IN A
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Firing regular transaction 20722 for <bbc.co.uk IN A> scope dns on */* (validate=yes).
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Cache miss for bbc.co.uk IN AAAA
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Firing regular transaction 27195 for <bbc.co.uk IN AAAA> scope dns on vlan20/* (validate=yes).
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Cache miss for bbc.co.uk IN A
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Firing regular transaction 24031 for <bbc.co.uk IN A> scope dns on vlan20/* (validate=yes).
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Added positive unauthenticated non-confidential cache entry for bbc.co.uk IN A 300s on vlan10/INET6/fd65:a570:a1ef:3841:94c5:8804:802c:e388
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Added positive unauthenticated non-confidential cache entry for bbc.co.uk IN A 300s on vlan10/INET6/fd65:a570:a1ef:3841:94c5:8804:802c:e388
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Added positive unauthenticated non-confidential cache entry for bbc.co.uk IN A 300s on vlan10/INET6/fd65:a570:a1ef:3841:94c5:8804:802c:e388
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Added positive unauthenticated non-confidential cache entry for bbc.co.uk IN A 300s on vlan10/INET6/fd65:a570:a1ef:3841:94c5:8804:802c:e388
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Regular transaction 20722 for <bbc.co.uk IN A> on scope dns on */* now complete with <success> from network (unsigned; non-confidential).
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Added positive unauthenticated non-confidential cache entry for bbc.co.uk IN AAAA 300s on vlan10/INET6/fd65:a570:a1ef:3841:94c5:8804:802c:e388
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Added positive unauthenticated non-confidential cache entry for bbc.co.uk IN AAAA 300s on vlan10/INET6/fd65:a570:a1ef:3841:94c5:8804:802c:e388
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Added positive unauthenticated non-confidential cache entry for bbc.co.uk IN AAAA 300s on vlan10/INET6/fd65:a570:a1ef:3841:94c5:8804:802c:e388
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Added positive unauthenticated non-confidential cache entry for bbc.co.uk IN AAAA 300s on vlan10/INET6/fd65:a570:a1ef:3841:94c5:8804:802c:e388
Dec 22 00:08:09 PC-001 systemd-resolved[1674629]: Regular transaction 3236 for <bbc.co.uk IN AAAA> on scope dns on */* now complete with <success> from network (unsigned; non-confidential).

# resolveconf when this hapens
Global
           Protocols: -LLMNR +mDNS DNSOverTLS=opportunistic
                      DNSSEC=no/unsupported
    resolv.conf mode: stub
  Current DNS Server: fd65:a570:a1ef:3841:94c5:8804:802c:e388
         DNS Servers: fddd:cc66:fdd6:aa06:82fa:fdec:38eb:fb8
                      fd65:a570:a1ef:3841:94c5:8804:802c:e388
Fallback DNS Servers: 1.1.1.1#cloudflare-dns.com 9.9.9.9#dns.quad9.net
                      8.8.8.8#dns.google 2606:4700:4700::1111#cloudflare-dns.com
                      2620:fe::9#dns.quad9.net 2001:4860:4860::8888#dns.google

Link 2 (eth2)
    Current Scopes: none
         Protocols: -DefaultRoute -LLMNR -mDNS DNSOverTLS=opportunistic
                    DNSSEC=no/unsupported

Link 3 (bond0)
    Current Scopes: none
         Protocols: -DefaultRoute -LLMNR -mDNS DNSOverTLS=opportunistic
                    DNSSEC=no/unsupported

Link 4 (eth0)
    Current Scopes: none
         Protocols: -DefaultRoute -LLMNR -mDNS DNSOverTLS=opportunistic
                    DNSSEC=no/unsupported

Link 5 (ovs-system)
    Current Scopes: none
         Protocols: -DefaultRoute -LLMNR -mDNS DNSOverTLS=opportunistic
                    DNSSEC=no/unsupported

Link 6 (vlan10)
    Current Scopes: mDNS/IPv4 mDNS/IPv6
         Protocols: -DefaultRoute -LLMNR +mDNS DNSOverTLS=opportunistic
                    DNSSEC=no/unsupported

Link 7 (vlan20)
    Current Scopes: DNS mDNS/IPv6
         Protocols: +DefaultRoute -LLMNR +mDNS DNSOverTLS=opportunistic
                    DNSSEC=no/unsupported
Current DNS Server: fddd:cc66:fdd6:aa06:82fa:fdec:38eb:fb8
       DNS Servers: fddd:cc66:fdd6:aa06:82fa:fdec:38eb:fb8

Link 8 (ovsbr0)
    Current Scopes: none
         Protocols: -DefaultRoute -LLMNR -mDNS DNSOverTLS=opportunistic
                    DNSSEC=no/unsupported

Link 9 (vlan30)
    Current Scopes: none
         Protocols: -DefaultRoute -LLMNR -mDNS DNSOverTLS=opportunistic
                    DNSSEC=no/unsupported

Link 10 (eth1)
    Current Scopes: none
    Current Scopes: none
         Protocols: -DefaultRoute -LLMNR -mDNS DNSOverTLS=opportunistic
                    DNSSEC=no/unsupported

Link 11 (vnet0)
    Current Scopes: none
         Protocols: -DefaultRoute -LLMNR -mDNS DNSOverTLS=opportunistic
                    DNSSEC=no/unsupported

Link 12 (vnet1)
    Current Scopes: none
         Protocols: -DefaultRoute -LLMNR -mDNS DNSOverTLS=opportunistic
                    DNSSEC=no/unsupported

Activity

  1. added
    bug 🐛
    on Dec 21, 2023
  2. rpigott commented on Dec 23, 2023

    @rpigott
    Contributor

    You're using the fallback servers. That would indicate that the servers configured for vlan20 are not reachable on that link. Does a query with dig that is bound to a source address on that iface work?

  3. agowa commented on Dec 23, 2023

    @agowa
    Author

    The strange thing is they are. And even with logging turned on I still cannot find anything in the logs. I now explicitly set the FallbackDNS to the vlan20 IPs and that appears to workaround the issue...

    Edit: could it be related to systemd-networkd updating the interface config because it re-received a router advertisement containing it? Because the difference now is that it is static in the global config compared to being populated dynamically by systemd-networkd...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛resolve

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions