ubuntu@foufoune:~$ lsb_release -rd
Description:    Ubuntu 17.10
Release:        17.10
ubuntu@foufoune:~$ apt-cache policy systemd
systemd:
  Installed: 234-2ubuntu12.3
  Candidate: 234-2ubuntu12.3
  Version table:
 *** 234-2ubuntu12.3 500
        500 http://azure.archive.ubuntu.com/ubuntu artful-updates/main amd64 
Packages
        100 /var/lib/dpkg/status
     234-2ubuntu12.1 500
        500 http://security.ubuntu.com/ubuntu artful-security/main amd64 
Packages
     234-2ubuntu12 500
        500 http://azure.archive.ubuntu.com/ubuntu artful/main amd64 Packages


ubuntu@foufoune:~$ time ping  __cloud_init_expected_not_found
ping: __cloud_init_expected_not_found: Temporary failure in name resolution

real    0m15.016s
user    0m0.000s
sys     0m0.003s

After applying the workaround from comment #11, I see fast lookups
again.

ubuntu@foufoune:~$ cat /etc/systemd/resolved.conf 
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See resolved.conf(5) for details

[Resolve]
#DNS=
#FallbackDNS=
#Domains=
#LLMNR=yes
#MulticastDNS=yes
#DNSSEC=no
#Cache=yes
#DNSStubListener=udp
LLMNR=no

ubuntu@foufoune:~$ time ping  __cloud_init_expected_not_found
ping: __cloud_init_expected_not_found: Name or service not known

real    0m0.006s
user    0m0.000s
sys     0m0.001s

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1739672

Title:
  Regression in getaddrinfo(): calls block for much longer on Bionic
  (compared to Xenial), please disable LLMNR

Status in glibc package in Ubuntu:
  Invalid
Status in linux package in Ubuntu:
  Invalid
Status in systemd package in Ubuntu:
  Fix Released
Status in glibc source package in Artful:
  New
Status in linux source package in Artful:
  New
Status in systemd source package in Artful:
  New
Status in glibc source package in Bionic:
  Invalid
Status in linux source package in Bionic:
  Invalid
Status in systemd source package in Bionic:
  Fix Released

Bug description:
  When testing MAAS on Bionic, we noticed sluggish performance that we
  could not immediately explain.

  After comparing the results from a run of the test suite on Xenial to
  a run on Bionic, we determined that the slowdowns had to do with DNS
  lookups. In particular, if MAAS attempts to resolve a hostname using
  getaddrinfo() and the call fails, on Xenial the negative result is
  returned in a fraction of a second. On Bionic, the negative result is
  returned in ~1.6 seconds, according to some measures.

  ### To run the test ###

  git clone https://github.com/mpontillo/test-getaddrinfo
  cd test-getaddrinfo
  make

  ### Results on Xenial ###
  $ time ./test not-a-real-hostname
  Trying to resolve: not-a-real-hostname
      getaddrinfo errno: Success
      getaddrinfo() return value: -2 (Name or service not known)

  real  0m0.015s
  user  0m0.000s
  sys   0m0.000s

  ### Results on Bionic ###
  $ time ./test not-a-real-hostname
  Trying to resolve: not-a-real-hostname
      getaddrinfo errno: Resource temporarily unavailable
      getaddrinfo() return value: -3 (Temporary failure in name resolution)

  real  0m1.609s
  user  0m0.004s
  sys   0m0.000s

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1739672/+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

Reply via email to