libvirtd crashed with SIGSEGV in _int_malloc()

Bug #1565424 reported by M. Edward (Ed) Borasky
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Xenial beta 2 on AMD 8-core processor

# lsb_release -rd
Description: Ubuntu Xenial Xerus (development branch)
Release: 16.04

# apt-cache policy libvirt0
libvirt0:
  Installed: 1.3.1-1ubuntu6
  Candidate: 1.3.1-1ubuntu6
  Version table:
 *** 1.3.1-1ubuntu6 500
        500 http://mirror.htnshost.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status

Trying to create a new virtual machine - Fedora 24 alpha ISO, qcow2 storage

# systemctl status libvirt-bin.socket
● libvirt-bin.socket
   Loaded: loaded (/lib/systemd/system/libvirt-bin.socket; static; vendor preset: enabled)
   Active: inactive (dead)
   Listen: /var/run/libvirt/libvirt-sock (Stream)
           /var/run/libvirt/libvirt-sock-ro (Stream)

Apr 03 02:09:21 AlgoCompSynth systemd[1]: libvirt-bin.socket: Socket service libvirt-bin.service alr
Apr 03 02:09:21 AlgoCompSynth systemd[1]: Failed to listen on libvirt-bin.socket.

# journalctl -xe
Apr 03 02:17:28 AlgoCompSynth systemd[1]: Stopped Virtualization daemon.
-- Subject: Unit libvirt-bin.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit libvirt-bin.service has finished shutting down.
Apr 03 02:17:28 AlgoCompSynth systemd[1]: Starting Virtualization daemon...
-- Subject: Unit libvirt-bin.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit libvirt-bin.service has begun starting up.
Apr 03 02:17:28 AlgoCompSynth systemd[1]: Started Virtualization daemon.
-- Subject: Unit libvirt-bin.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit libvirt-bin.service has finished starting up.
--
-- The start-up result is done.
Apr 03 02:17:28 AlgoCompSynth polkitd(authority=local)[945]: Unregistered Authentication Agent for u
Apr 03 02:17:28 AlgoCompSynth dnsmasq[1264]: read /etc/hosts - 7 addresses
Apr 03 02:17:28 AlgoCompSynth dnsmasq[1264]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 add
Apr 03 02:17:28 AlgoCompSynth dnsmasq-dhcp[1264]: read /var/lib/libvirt/dnsmasq/default.hostsfile
lines 1154-1177/1177 (END)

ProblemType: Crash
DistroRelease: Ubuntu 16.04
Package: libvirt-bin 1.3.1-1ubuntu6
ProcVersionSignature: Ubuntu 4.4.0-16.32-generic 4.4.6
Uname: Linux 4.4.0-16-generic x86_64
ApportVersion: 2.20.1-0ubuntu1
Architecture: amd64
CrashCounter: 1
Date: Sun Apr 3 02:08:33 2016
ExecutablePath: /usr/sbin/libvirtd
InstallationDate: Installed on 2016-04-03 (0 days ago)
InstallationMedia: Ubuntu-GNOME 16.04 LTS "Xenial Xerus" - Beta amd64 (20160323.1)
ProcAttrCurrent: /usr/sbin/libvirtd (enforce)
ProcCmdline: BOOT_IMAGE=/boot/vmlinuz-4.4.0-16-generic root=UUID=c67a379e-e903-486f-8a33-b332342465d1 ro quiet splash vt.handoff=7
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
Signal: 11
SourcePackage: libvirt
StacktraceTop:
 _int_malloc (av=av@entry=0x7f9014000020, bytes=bytes@entry=16) at malloc.c:3728
 __GI___libc_malloc (bytes=16) at malloc.c:2914
 __GI___libc_realloc (oldmem=0x0, bytes=bytes@entry=16) at malloc.c:2995
 register_state (dfa=dfa@entry=0x55d96c8f6730, newstate=newstate@entry=0x7f9014009920, hash=hash@entry=20) at regex_internal.c:1581
 register_state (hash=20, newstate=0x7f9014009920, dfa=0x55d96c8f6730) at regex_internal.c:972
Title: libvirtd crashed with SIGSEGV in _int_malloc()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

modified.conffile..etc.libvirt.qemu.networks.default.xml: [modified]
mtime.conffile..etc.libvirt.qemu.networks.default.xml: 2016-04-02T23:25:02.167573

Revision history for this message
M. Edward (Ed) Borasky (znmeb-o) wrote :
Revision history for this message
M. Edward (Ed) Borasky (znmeb-o) wrote :

Looks like it's crashing on some permissions problem - I restarted the services and reconnected to the qemu emulator and it did this:

nable to complete install: 'internal error: process exited while connecting to monitor: 2016-04-03T09:24:44.393536Z qemu-system-x86_64: -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-Fedora24Alpha/org.qemu.guest_agent.0,server,nowait: Failed to bind socket to /var/lib/libvirt/qemu/channel/target/domain-Fedora24Alpha/org.qemu.guest_agent.0: Permission denied'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 90, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/create.py", line 2277, in _do_async_install
    guest.start_install(meter=meter)
  File "/usr/share/virt-manager/virtinst/guest.py", line 501, in start_install
    noboot)
  File "/usr/share/virt-manager/virtinst/guest.py", line 416, in _create_guest
    dom = self.conn.createLinux(start_xml or final_xml, 0)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3606, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: internal error: process exited while connecting to monitor: 2016-04-03T09:24:44.393536Z qemu-system-x86_64: -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-Fedora24Alpha/org.qemu.guest_agent.0,server,nowait: Failed to bind socket to /var/lib/libvirt/qemu/channel/target/domain-Fedora24Alpha/org.qemu.guest_agent.0: Permission denied

Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 _int_malloc (av=av@entry=0x7f9014000020, bytes=bytes@entry=16) at malloc.c:3728
 __GI___libc_malloc (bytes=16) at malloc.c:2914
 __GI___libc_realloc (oldmem=0x0, bytes=bytes@entry=16) at malloc.c:2995
 register_state (dfa=dfa@entry=0x55d96c8f6730, newstate=newstate@entry=0x7f9014009920, hash=hash@entry=20) at regex_internal.c:1581
 register_state (hash=20, newstate=0x7f9014009920, dfa=0x55d96c8f6730) at regex_internal.c:972

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in libvirt (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
Revision history for this message
M. Edward (Ed) Borasky (znmeb-o) wrote :

I have a little more information. It seems to be related to the fact that I've chosen Fedora as the Linux distro. Here's the steps to reproduce

1. Download the Fedora 24 Workstation Alpha ISO
2. Start Virtual Machine Manager and create a new VM.
3. Connect it to the Fedora ISO. It will say that the OS is of unknown type. Select the most recent Fedora, Fedora 22.
4. Continue. It will get all the way to the end and then crash.

However, if I lie to the installer and say it's Debian Jessie, it proceeds just fine and boots the live ISO! So there must be something in the data for Fedora 22 that's wrong. I'm going to go ahead and see if the install completes, but this looks reproducible.

information type: Private → Public
Revision history for this message
M. Edward (Ed) Borasky (znmeb-o) wrote :

Install completed successfully.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Hm -

Stack memory exhausted (SP below stack segment)

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Hi,

I believe the fix you need is in the version which is in xenial-proposed.

(Specifically, the next version has the fix which I think you need (an update to not overwrite const memory).

Changed in libvirt (Ubuntu):
status: New → Triaged
status: Triaged → Fix Committed
Revision history for this message
Wise Melon (wise-melon-deactivatedaccount) wrote :

I have this issue too with Ubuntu GNOME 16.04 with GNOME 3.20, as host and guest.

Changed in libvirt (Ubuntu):
status: Fix Committed → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.