• getaddrinfo() is unable to resolve the IPv4 localhost hostname in situation, when an unrelated IPv4 line in /etc/hosts has 29 entries for an unrelated IP. (Example of such line is at the bottom of this bug report.)
• When any 1 of the aliases is removed, this behavior disappears.
• When "x" is put instead of the alias removed in the previous point, this behavior returns.
• Above behavior has been observed with glibc-2.22-62.6.2.x86_64, glibc-2.22-62.13.2.x86_64 and glibc-2.22-100.15.4.x86_64.
• Vendor (SUSE) refuses to continue to troubleshoot this, because according to them limits hit here "are well beyond the scope of a proper use case for /etc/hosts", which seems to be a reasonable argument.
184.108.40.206 xxxxxxxxxx12 xxxxxxxxxx12.3456.7890.xxx.xx.xxx xxxxxxxxxx12.xx.xxxxxxxx.xxxxx xxxxxxxxxx12.xxxx.xxxxxxxx.xxxxx xxx-xxxx-x12.xxxx.xxxxxxxx.xxxxx xxx-xxxx-x12.xxxxxxx.xxx xxx-xxx1-x23.xxxx.xxxxxxxx.xxxxx xxx-xxx1-x23.xxxxxxx.xxx xxx.xxxxxxx.xxx xxx-xxxx-x12.xxxx.xxxxxxxx.xxxxx xxxxx.xxxxxxx.xxx xxx-xxxx-x12.xxxx.xxxxxxxx.xxxxx xxx-xxxxxx-x12.xxxx.xxxxxxxx.xxxxx xxx-xx-x12.xxxx.xxxxxxxx.xxxxx xxx-xx-x12.xx.xxxxxxxx.xxxxx xxx-xxxxx-xx.xxxxxxx.xxx xxx-xxxxx-xx xxx-xxxxx-xx.xx.xxxxxxxx.xxxxx xxxxxx12.xxxxxxx.xxx xxxxxx_xxx xxxxxx_xxx.xxxxxxx.xxx xxxxxxxxx.xxxxxxx.xxx xxxxxxx.xxxxxxx.xxx xxx-xxxxx-x12.xxxxxxxxxx.xxxxxxxx xxx-xxxxxx-x12.xx.xxxxxxxx.xxxxx xxx-xxxxxx-x12.xxxx.xxxxxxxx.xxxxx xxx-xxxxx-x12.xxxx.xxxxxxxx.xxxxx xxx-xxxxx-x12.xx.xxxxxxxx.xxxxx xxxxxxx.xxxxxxx.xxx
I believe this is bug 18991. This was fixed in glibc 2.28. Can you test that glibc version (or the current master version) to see if this fixes the bug as well?
Due to inability to test later glibc version in a prod environment I did below testing only. (getent ahostsv4 localhost)
OS version glibc version Issue observed Note
openSUSE Leap 15.1 2.26-lp151.18.7 No live CD
Ubuntu 18.04.4 LTS 2.27-3ubuntu1 No installed desktop
Ubuntu 19.10 2.30-0ubuntu2 No live CD
Thanks for the feedback, closing as a duplicate.
*** This bug has been marked as a duplicate of bug 18991 ***