can't install kvm -- libvirtd brings segfault [solved]

Discussion in 'Installation/Configuration' started by jeensg, Aug 1, 2017.

  1. jeensg

    jeensg New Member

    Anybody has a clue what to do with a segfault in libvirtd?
    ------------------------------
    installed new server @ hetzner
    different partitions incl. LVM for virtualization disks
    ---------------------
    progs installed: htop mc fail2ban locate apticron mailutils postfix bash-completion bridge-utils ntp rkhunter smartmontools ntp
    additionally configured: hostname and hosts, ipv6-leaveout for debian-mirror, fail2ban for ssh, firewall (iptables), rkhunter, smartd Mailing, RAID Mailing, bridge for virtualization (hetzner suggestion)
    ..........
    then: apt install qemu-kvm libvirt-daemon-system
    resulting in:
    ...
    Code:
    Setting up libvirt-daemon-system (3.0.0-4) ...
    Job for libvirtd.service failed because a fatal signal was delivered to the control process.
    See "systemctl status libvirtd.service" and "journalctl -xe" for details.
    invoke-rc.d: initscript libvirtd, action "start" failed.
    ‚óŹ libvirtd.service - Virtualization daemon
      Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
      Active: activating (auto-restart) (Result: signal) since Tue 2017-08-01 18:19:09 CEST; 7ms ago
      Docs: man:libvirtd(8)
      http://libvirt.org
      Process: 2787 ExecStart=/usr/sbin/libvirtd $libvirtd_opts (code=killed, signal=SEGV)
    Main PID: 2787 (code=killed, signal=SEGV)
    
    Aug 01 18:19:09 harry systemd[1]: libvirtd.service: Unit entered failed state.
    Aug 01 18:19:09 harry systemd[1]: libvirtd.service: Failed with result 'signal'.
    dpkg: error processing package libvirt-daemon-system (--configure):
    subprocess installed post-installation script returned error exit status 1
    ...
    Errors were encountered while processing:
    libvirt-daemon-system
    .........
    systemctl status libvirtd.service brings:
    Code:
    Aug 01 18:19:10 harry systemd[1]: Failed to start Virtualization daemon.
    Aug 01 18:19:10 harry systemd[1]: libvirtd.service: Unit entered failed state.
    Aug 01 18:19:10 harry systemd[1]: libvirtd.service: Failed with result 'signal'.
    Aug 01 18:19:11 harry systemd[1]: libvirtd.service: Service hold-off time over, scheduling restart.
    Aug 01 18:19:11 harry systemd[1]: Stopped Virtualization daemon.
    Aug 01 18:19:11 harry systemd[1]: libvirtd.service: Start request repeated too quickly.
    Aug 01 18:19:11 harry systemd[1]: Failed to start Virtualization daemon.
    Aug 01 18:19:11 harry systemd[1]: libvirtd.service: Unit entered failed state.
    Aug 01 18:19:11 harry systemd[1]: libvirtd.service: Failed with result 'signal'.
    ..................
    grep libvirtd /var/log/syslog brings one by one retrying again and again -- segfault:
    Code:
    Aug  1 18:19:09 harry kernel: [  358.621561] libvirtd[2787]: segfault at 0 ip 00007fd7966db24f sp 00007ffe4abaea40 error 4 in libc-2.24.so[7fd796609000+195000]
    Aug  1 18:19:10 harry kernel: [  358.870880] libvirtd[2794]: segfault at 0 ip 00007f6e9635a24f sp 00007ffff97561d0 error 4 in libc-2.24.so[7f6e96288000+195000]
    Aug  1 18:19:10 harry kernel: [  359.120821] libvirtd[2797]: segfault at 0 ip 00007f3e1d66124f sp 00007ffe65174d20 error 4 in libc-2.24.so[7f3e1d58f000+195000]
    .............................
    wanted to install package libvirt0-dbg, but it doesn't exist for stretch!? https://wiki.debian.org/libvirt/Debugging
     
  2. jeensg

    jeensg New Member

    Did the following:
    Code:
    apt install gdb libvirt0-dbgsym
    gdb libvirtd
    (gdb) set pagination 0
    (gdb) run
    (gdb) bt
    This resulted in:
    Code:
    #0  0x00007ffff3d7424f in gaiconf_init () at ../sysdeps/posix/getaddrinfo.c:2018
    From there I knew that I made changes in /etc/gai.conf, becaue ipv6 sometimes doesn't work with debian-mirrors, so I wanted to exclude them.
    Finally I undid my changes to /etc/gai.conf and it works again. Any suggestions where to post this bug, if it is one? Maybe I also did some mistakes in that file, although it worked properly before:
    Code:
    # Make IPv6 for security.debian.org undesirable
    #precedence 2001:a78:5:1:216:35ff:fe7f:6ceb  5
    #precedence 2a02:16a8:dc41:100::233  5
    #precedence 2001:a78:5:0:216:35ff:fe7f:be4f  5
     

Share This Page