Bug 88007 - Segfault caused by utilities like iptables, netstat-nat and jnettop after upgrading to systemd 218-1 from 216-3
Summary: Segfault caused by utilities like iptables, netstat-nat and jnettop after upg...
Status: RESOLVED DUPLICATE of bug 87634
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-04 01:06 UTC by Tigran Zakoyan
Modified: 2015-01-05 16:18 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Tigran Zakoyan 2015-01-04 01:06:51 UTC
I am using ArchLinux on my Linux box router. It serves some 100 of companies and takes care of BGP announcements of my IP space so I don't upgrade the OS really often.
After I performed full system upgrade and rebooted the box, I found sshd.service segfaulting very quickly after being started. The version of systemd raised from 216-3 to 218-1
I just disabled it and installed dropbear instead, which worked just well.
But soon I noticed segfaults from different programs like 'iptables -L', 'netstat-nat' and 'jnettop'. They all dropped into segfault after exposing several strings with hostnames.
I tried disabling host name backresolve, and it kind of helped to run 'iptables -L -n', but both jnettop and netstat-nat still went on segfaulting.

Well, I installed gdb and digged deeper.

After applying some efforts (it was the first time I ever ran gdb) I found that all the three utils caused the same segfault like this:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7493dd5 in _int_free () from /usr/lib/libc.so.6

'info s' command of gdb gave me the following:

#0  0x00007ffff7493dd5 in _int_free () from /usr/lib/libc.so.6
#1  0x00007ffff7fd734a in ?? () from /usr/lib/libnss_myhostname.so.2
#2  0x00007ffff7fd7377 in ?? () from /usr/lib/libnss_myhostname.so.2
#3  0x00007ffff7fd7377 in ?? () from /usr/lib/libnss_myhostname.so.2
#4  0x00007ffff7fd7377 in ?? () from /usr/lib/libnss_myhostname.so.2
#5  0x00007ffff7fd7377 in ?? () from /usr/lib/libnss_myhostname.so.2

and really lots of last string repeating (>4000)

libnss_myhostname looked like a good prompt; I found the way to disable that lib calls in /etc/nsswitch.conf by commenting out myhostname in
'hosts: files dns myhostname' ,
and the problem got solved.

Bad thing about reproducing the bug is that a LAMP server I run ArchLinux on operates just great and happily runs iptables and everything.
But I just have to set back 'myhostname' keyword in /etc/nsswitch.conf to have the segfaults back on my router box. 
Will be glad to be helpful in eliminating this problem.

Regards, 
Tigran Zakoyan
Comment 1 Lennart Poettering 2015-01-05 16:18:09 UTC

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


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.