Bug 1084419

Summary: Glibc update to 2.27 causes segfault during name resolution
Product: [openSUSE] openSUSE Tumbleweed Reporter: James Smith <smithjd15>
Component: Upgrade ProblemsAssignee: E-mail List <bnc-team-screening>
Status: RESOLVED DUPLICATE QA Contact: Jiri Srain <jsrain>
Severity: Critical    
Priority: P5 - None CC: afaerber, agraf, forgotten_BUDQVzyqB-, mbrugger, schwab, tuliom
Version: Current   
Target Milestone: ---   
Hardware: aarch64   
OS: Linux   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 1084812    
Attachments: dmesg output

Description James Smith 2018-03-08 04:39:01 UTC
Major components including yast, zypper, ping, are now not functioning.

Local resolution is unaffected; e.g. ping localhost doesn't segfault.
Comment 1 James Smith 2018-03-08 04:44:51 UTC
Created attachment 763050 [details]
dmesg output
Comment 2 Forgotten User BUDQVzyqB- 2018-03-08 23:08:45 UTC
Yes. Same here. Also aarch64. 

Name resolution via glibc/gethostbyname() is segfaulting (sometimes depending on which hostname is being queried). nslookup/dig (via lwres) is unaffected.

To reproduce:

=========

# ping download.opensuse.org
Segmentation fault (core dumped)

# nslookup download.opensuse.org
Server:         192.168.178.1
Address:        192.168.178.1#53

Non-authoritative answer:
Name:   download.opensuse.org
Address: 195.135.221.134
Name:   download.opensuse.org
Address: 2001:67c:2178:8::13

# ping 195.135.221.134
PING 195.135.221.134 (195.135.221.134) 56(84) bytes of data.
64 bytes from 195.135.221.134: icmp_seq=1 ttl=54 time=33.0 ms
64 bytes from 195.135.221.134: icmp_seq=2 ttl=54 time=26.8 ms
...

# ping 2001:67c:2178:8::13
PING 2001:67c:2178:8::13(2001:67c:2178:8::13) 56 data bytes
64 bytes from 2001:67c:2178:8::13: icmp_seq=1 ttl=53 time=25.5 ms
64 bytes from 2001:67c:2178:8::13: icmp_seq=2 ttl=53 time=24.2 ms
...

=========

# gdb ping
GNU gdb (GDB; openSUSE Tumbleweed) 8.0.1
(gdb) run download.opensuse.org
Program received signal SIGSEGV, Segmentation fault.
0x0000ffffbdf1400c in gaih_getanswer_slice.isra () from /lib64/libnss_dns.so.2
(gdb) bt
#0  0x0000ffffbdf1400c in gaih_getanswer_slice.isra () from /lib64/libnss_dns.so.2
#1  0x0000ffffbdf149dc in _nss_dns_gethostbyname4_r () from /lib64/libnss_dns.so.2
#2  0x0000ffffbe148780 in gaih_inet.constprop () from /lib64/libc.so.6
#3  0x0000ffffbe149330 in getaddrinfo () from /lib64/libc.so.6
#4  0x0000aaaae427e230 in ?? ()
#5  0x0000ffffbe0a86e0 in __libc_start_main () from /lib64/libc.so.6
#6  0x0000aaaae427ed04 in ?? ()

=========

glibc-2.27-1.1.aarch64: fails

glibc-2.26-9.3.aarch64: okay

=========

This also skews the update mechanism (download.opensuse.org, ftp.gwdg.de, etc. won't resolve, either).

The obvious workaround is disabling dns lookup in /etc/nsswitch.conf, adding the relevant IP addresses and hostnames to /etc/hosts and restarting nscd.
Comment 3 Forgotten User BUDQVzyqB- 2018-03-12 22:00:20 UTC
The intermediate fix by Stefan BrĂ¼ns in #1084812 (https://bugzilla.opensuse.org/show_bug.cgi?id=1084812#c4) works for me, too. Thanks a lot!

I'd consider this bug a duplicate to #1084812.
Comment 4 Chenzi Cao 2018-03-16 10:46:54 UTC
Mark as duplicate of bas#1084812 now, thanks.

*** This bug has been marked as a duplicate of bug 1084812 ***