Bug 1270977 - Segmentation Fault in virt-manager due to libvirt-python Master
Segmentation Fault in virt-manager due to libvirt-python Master
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libvirt-python (Show other bugs)
unspecified
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Cole Robinson
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-12 15:30 EDT by jean-christophe manciot
Modified: 2015-10-31 20:04 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-31 05:57:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description jean-christophe manciot 2015-10-12 15:30:37 EDT
Description of problem:
-----------------------
root@msi-ge60-ubuntu:/home/actionmystique/Program-Files/Ubuntu/Virt-manager/git-virt-manager# ./virt-manager --debug
[Mon, 12 Oct 2015 21:20:54 virt-manager 28778] DEBUG (cli:256) Launched with command line: ./virt-manager --debug
[Mon, 12 Oct 2015 21:20:54 virt-manager 28778] DEBUG (virt-manager:160) virt-manager version: 1.2.1
[Mon, 12 Oct 2015 21:20:54 virt-manager 28778] DEBUG (virt-manager:161) virtManager import: <module 'virtManager' from '/home/actionmystique/Program-Files/Ubuntu/Virt-manager/git-virt-manager/virtManager/__init__.pyc'>
[Mon, 12 Oct 2015 21:20:54 virt-manager 28778] DEBUG (virt-manager:220) GTK version: 3.14.13
[Mon, 12 Oct 2015 21:20:54 virt-manager 28778] DEBUG (engine:467) libguestfs inspection support: True
[Mon, 12 Oct 2015 21:20:54 virt-manager 28778] DEBUG (inspection:81) waiting
[Mon, 12 Oct 2015 21:20:54 virt-manager 28778] DEBUG (systray:153) Showing systray: True
[Mon, 12 Oct 2015 21:20:54 virt-manager 28778] DEBUG (engine:237) About to connect to uris ['qemu:///system']
[Mon, 12 Oct 2015 21:20:54 virt-manager 28778] DEBUG (manager:208) Showing manager
[Mon, 12 Oct 2015 21:20:54 virt-manager 28778] DEBUG (engine:368) window counter incremented to 1
[Mon, 12 Oct 2015 21:20:54 virt-manager 28778] DEBUG (connection:567) conn=qemu:///system changed to state=Connecting
[Mon, 12 Oct 2015 21:20:54 virt-manager 28778] DEBUG (connection:886) Scheduling background open thread for qemu:///system
[Mon, 12 Oct 2015 21:20:54 virt-manager 28778] DEBUG (connection:935) libvirt version=1002021
[Mon, 12 Oct 2015 21:20:54 virt-manager 28778] DEBUG (connection:937) daemon version=1002021
[Mon, 12 Oct 2015 21:20:54 virt-manager 28778] DEBUG (connection:938) conn version=2004050
[Mon, 12 Oct 2015 21:20:54 virt-manager 28778] DEBUG (connection:940) qemu:///system capabilities:
<capabilities>

  <host>
    <uuid>00000000-0000-0000-0000-8c89a50e4e89</uuid>
    <cpu>
      <arch>x86_64</arch>
      <model>Westmere</model>
      <vendor>Intel</vendor>
      <topology sockets="1" cores="4" threads="2"/>
      <feature name="invtsc"/>
      <feature name="invpcid"/>
      <feature name="erms"/>
      <feature name="bmi2"/>
      <feature name="smep"/>
      <feature name="avx2"/>
      <feature name="bmi1"/>
      <feature name="fsgsbase"/>
      <feature name="abm"/>
      <feature name="rdtscp"/>
      <feature name="pdpe1gb"/>
      <feature name="rdrand"/>
      <feature name="f16c"/>
      <feature name="avx"/>
      <feature name="osxsave"/>
      <feature name="xsave"/>
      <feature name="tsc-deadline"/>
      <feature name="movbe"/>
      <feature name="pcid"/>
      <feature name="pdcm"/>
      <feature name="xtpr"/>
      <feature name="fma"/>
      <feature name="tm2"/>
      <feature name="est"/>
      <feature name="vmx"/>
      <feature name="ds_cpl"/>
      <feature name="monitor"/>
      <feature name="dtes64"/>
      <feature name="pclmuldq"/>
      <feature name="pbe"/>
      <feature name="tm"/>
      <feature name="ht"/>
      <feature name="ss"/>
      <feature name="acpi"/>
      <feature name="ds"/>
      <feature name="vme"/>
      <pages unit="KiB" size="4"/>
      <pages unit="KiB" size="2048"/>
    </cpu>
    <power_management>
      <suspend_mem/>
      <suspend_disk/>
      <suspend_hybrid/>
    </power_management>
    <migration_features>
      <live/>
      <uri_transports>
        <uri_transport>tcp</uri_transport>
        <uri_transport>rdma</uri_transport>
      </uri_transports>
    </migration_features>
    <topology>
      <cells num="1">
        <cell id="0">
          <memory unit="KiB">16351008</memory>
          <cpus num="8">
            <cpu id="0" socket_id="0" core_id="0" siblings="0"/>
            <cpu id="1" socket_id="0" core_id="0" siblings="1"/>
            <cpu id="2" socket_id="0" core_id="1" siblings="2"/>
            <cpu id="3" socket_id="0" core_id="1" siblings="3"/>
            <cpu id="4" socket_id="0" core_id="2" siblings="4"/>
            <cpu id="5" socket_id="0" core_id="2" siblings="5"/>
            <cpu id="6" socket_id="0" core_id="3" siblings="6"/>
            <cpu id="7" socket_id="0" core_id="3" siblings="7"/>
          </cpus>
        </cell>
      </cells>
    </topology>
    <secmodel>
      <model>none</model>
      <doi>0</doi>
    </secmodel>
    <secmodel>
      <model>dac</model>
      <doi>0</doi>
      <baselabel type="kvm">+0:+0</baselabel>
      <baselabel type="qemu">+0:+0</baselabel>
    </secmodel>
  </host>

  <guest>
    <os_type>hvm</os_type>
    <arch name="i686">
      <wordsize>32</wordsize>
      <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      <machine maxCpus="255">pc-i440fx-2.4</machine>
      <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
      <machine maxCpus="255">pc-1.3</machine>
      <machine maxCpus="255">pc-0.12</machine>
      <machine maxCpus="255">pc-q35-1.6</machine>
      <machine maxCpus="255">pc-q35-1.5</machine>
      <machine maxCpus="255">pc-i440fx-1.6</machine>
      <machine maxCpus="255">pc-q35-2.2</machine>
      <machine maxCpus="255">pc-i440fx-1.7</machine>
      <machine maxCpus="255">pc-q35-2.1</machine>
      <machine maxCpus="255">pc-0.11</machine>
      <machine maxCpus="255">pc-0.10</machine>
      <machine maxCpus="255">pc-i440fx-2.2</machine>
      <machine maxCpus="255">pc-1.2</machine>
      <machine maxCpus="1">isapc</machine>
      <machine maxCpus="255">pc-i440fx-2.3</machine>
      <machine maxCpus="255">pc-q35-1.4</machine>
      <machine maxCpus="255">pc-0.15</machine>
      <machine maxCpus="255">pc-i440fx-1.5</machine>
      <machine maxCpus="255">pc-q35-2.0</machine>
      <machine maxCpus="255">pc-i440fx-1.4</machine>
      <machine maxCpus="255">pc-0.14</machine>
      <machine maxCpus="255">pc-1.1</machine>
      <machine maxCpus="255">pc-i440fx-2.1</machine>
      <machine maxCpus="255">pc-q35-1.7</machine>
      <machine maxCpus="255">pc-1.0</machine>
      <machine maxCpus="255">pc-i440fx-2.0</machine>
      <machine maxCpus="255">pc-q35-2.4</machine>
      <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
      <machine maxCpus="255">pc-q35-2.3</machine>
      <machine maxCpus="255">pc-0.13</machine>
      <domain type="qemu">
        <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      </domain>
      <domain type="kvm">
        <emulator>/usr/bin/kvm</emulator>
        <machine maxCpus="255">pc-i440fx-2.4</machine>
        <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
        <machine maxCpus="255">pc-1.3</machine>
        <machine maxCpus="255">pc-0.12</machine>
        <machine maxCpus="255">pc-q35-1.6</machine>
        <machine maxCpus="255">pc-q35-1.5</machine>
        <machine maxCpus="255">pc-i440fx-1.6</machine>
        <machine maxCpus="255">pc-q35-2.2</machine>
        <machine maxCpus="255">pc-i440fx-1.7</machine>
        <machine maxCpus="255">pc-q35-2.1</machine>
        <machine maxCpus="255">pc-0.11</machine>
        <machine maxCpus="255">pc-0.10</machine>
        <machine maxCpus="255">pc-i440fx-2.2</machine>
        <machine maxCpus="255">pc-1.2</machine>
        <machine maxCpus="1">isapc</machine>
        <machine maxCpus="255">pc-i440fx-2.3</machine>
        <machine maxCpus="255">pc-q35-1.4</machine>
        <machine maxCpus="255">pc-0.15</machine>
        <machine maxCpus="255">pc-i440fx-1.5</machine>
        <machine maxCpus="255">pc-q35-2.0</machine>
        <machine maxCpus="255">pc-i440fx-1.4</machine>
        <machine maxCpus="255">pc-0.14</machine>
        <machine maxCpus="255">pc-1.1</machine>
        <machine maxCpus="255">pc-i440fx-2.1</machine>
        <machine maxCpus="255">pc-q35-1.7</machine>
        <machine maxCpus="255">pc-1.0</machine>
        <machine maxCpus="255">pc-i440fx-2.0</machine>
        <machine maxCpus="255">pc-q35-2.4</machine>
        <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
        <machine maxCpus="255">pc-q35-2.3</machine>
        <machine maxCpus="255">pc-0.13</machine>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <deviceboot/>
      <disksnapshot default="on" toggle="no"/>
      <acpi default="on" toggle="yes"/>
      <apic default="on" toggle="no"/>
      <pae/>
      <nonpae/>
    </features>
  </guest>

  <guest>
    <os_type>hvm</os_type>
    <arch name="x86_64">
      <wordsize>64</wordsize>
      <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      <machine maxCpus="255">pc-i440fx-2.4</machine>
      <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
      <machine maxCpus="255">pc-1.3</machine>
      <machine maxCpus="255">pc-0.12</machine>
      <machine maxCpus="255">pc-q35-1.6</machine>
      <machine maxCpus="255">pc-q35-1.5</machine>
      <machine maxCpus="255">pc-i440fx-1.6</machine>
      <machine maxCpus="255">pc-q35-2.2</machine>
      <machine maxCpus="255">pc-i440fx-1.7</machine>
      <machine maxCpus="255">pc-q35-2.1</machine>
      <machine maxCpus="255">pc-0.11</machine>
      <machine maxCpus="255">pc-0.10</machine>
      <machine maxCpus="255">pc-i440fx-2.2</machine>
      <machine maxCpus="255">pc-1.2</machine>
      <machine maxCpus="1">isapc</machine>
      <machine maxCpus="255">pc-i440fx-2.3</machine>
      <machine maxCpus="255">pc-q35-1.4</machine>
      <machine maxCpus="255">pc-0.15</machine>
      <machine maxCpus="255">pc-i440fx-1.5</machine>
      <machine maxCpus="255">pc-q35-2.0</machine>
      <machine maxCpus="255">pc-i440fx-1.4</machine>
      <machine maxCpus="255">pc-0.14</machine>
      <machine maxCpus="255">pc-1.1</machine>
      <machine maxCpus="255">pc-i440fx-2.1</machine>
      <machine maxCpus="255">pc-q35-1.7</machine>
      <machine maxCpus="255">pc-1.0</machine>
      <machine maxCpus="255">pc-i440fx-2.0</machine>
      <machine maxCpus="255">pc-q35-2.4</machine>
      <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
      <machine maxCpus="255">pc-q35-2.3</machine>
      <machine maxCpus="255">pc-0.13</machine>
      <domain type="qemu">
        <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      </domain>
      <domain type="kvm">
        <emulator>/usr/bin/kvm</emulator>
        <machine maxCpus="255">pc-i440fx-2.4</machine>
        <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
        <machine maxCpus="255">pc-1.3</machine>
        <machine maxCpus="255">pc-0.12</machine>
        <machine maxCpus="255">pc-q35-1.6</machine>
        <machine maxCpus="255">pc-q35-1.5</machine>
        <machine maxCpus="255">pc-i440fx-1.6</machine>
        <machine maxCpus="255">pc-q35-2.2</machine>
        <machine maxCpus="255">pc-i440fx-1.7</machine>
        <machine maxCpus="255">pc-q35-2.1</machine>
        <machine maxCpus="255">pc-0.11</machine>
        <machine maxCpus="255">pc-0.10</machine>
        <machine maxCpus="255">pc-i440fx-2.2</machine>
        <machine maxCpus="255">pc-1.2</machine>
        <machine maxCpus="1">isapc</machine>
        <machine maxCpus="255">pc-i440fx-2.3</machine>
        <machine maxCpus="255">pc-q35-1.4</machine>
        <machine maxCpus="255">pc-0.15</machine>
        <machine maxCpus="255">pc-i440fx-1.5</machine>
        <machine maxCpus="255">pc-q35-2.0</machine>
        <machine maxCpus="255">pc-i440fx-1.4</machine>
        <machine maxCpus="255">pc-0.14</machine>
        <machine maxCpus="255">pc-1.1</machine>
        <machine maxCpus="255">pc-i440fx-2.1</machine>
        <machine maxCpus="255">pc-q35-1.7</machine>
        <machine maxCpus="255">pc-1.0</machine>
        <machine maxCpus="255">pc-i440fx-2.0</machine>
        <machine maxCpus="255">pc-q35-2.4</machine>
        <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
        <machine maxCpus="255">pc-q35-2.3</machine>
        <machine maxCpus="255">pc-0.13</machine>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <deviceboot/>
      <disksnapshot default="on" toggle="no"/>
      <acpi default="on" toggle="yes"/>
      <apic default="on" toggle="no"/>
    </features>
  </guest>

</capabilities>

[Mon, 12 Oct 2015 21:20:54 virt-manager 28778] DEBUG (connection:788) Using domain events
[Mon, 12 Oct 2015 21:20:54 virt-manager 28778] DEBUG (connection:825) Using network events
Segmentation fault (core dumped)


Version-Release number of selected component (if applicable):
------------------------------------------------------------
Last virt-manager Github sources (07/10/2015)
Libvirt 1.2.20
Libvirt glib 1.0.2
Python libvirt 1.2.20
Qemu 2.4.0
Libguestfs 1.31.15

Additional info:
----------------
Ubuntu server 15.04
Comment 1 jean-christophe manciot 2015-10-12 15:36:04 EDT
I've just realized another issue:
virt-manager sees my host CPU as <model>Westmere</model>, although it is an Intel i7 4700-MQ. It is a Haswell chipset: http://www.notebookcheck.net/Review-Intel-Haswell-Processors.93189.0.html
Comment 2 jean-christophe manciot 2015-10-12 15:36:36 EDT
I've just realized another issue:
virt-manager sees my host CPU as <model>Westmere</model>, although it is an Intel i7 4700-MQ. It is a Haswell chipset: http://www.notebookcheck.net/Review-Intel-Haswell-Processors.93189.0.html
Comment 3 jean-christophe manciot 2015-10-13 05:17:55 EDT
I've uninstalled virt-manager & libguestfs, rebuilt virt-manager & reinstalled virt-manager alongside the last release of libguestfs (1.31.16). 
Now everything is fine. 
If I downgrade to libguestfs 1.31.15, virt-manager is still working fine.
So I'm unable to catch the source of this issue.
Comment 4 jean-christophe manciot 2015-10-13 17:01:56 EDT
I've discovered the source of this issue when it reappeared: python-libvirt 1.2.20. If I downgrade to 1.2.19, the issue is gone.
Comment 5 Cole Robinson 2015-10-15 20:44:41 EDT
I can't reproduce here. can you do:

gdb --args python ./virt-manager --debug
run
[reproduce crash]
thread apply all bt
Comment 6 jean-christophe manciot 2015-10-16 09:27:21 EDT
With libvirt-python 1.2.20:
-------------------------------------------------------------------------------
root@msi-ge60-ubuntu:/home/actionmystique/Program-Files/Ubuntu/Virt-manager/git-virt-manager# gdb --args python ./virt-manager --debug
GNU gdb (Ubuntu 7.9-1ubuntu1) 7.9
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/python ./virt-manager --debug
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Fri, 16 Oct 2015 15:18:49 virt-manager 16994] DEBUG (cli:256) Launched with command line: ./virt-manager --debug
[Fri, 16 Oct 2015 15:18:49 virt-manager 16994] DEBUG (virt-manager:160) virt-manager version: 1.2.1
[Fri, 16 Oct 2015 15:18:49 virt-manager 16994] DEBUG (virt-manager:161) virtManager import: <module 'virtManager' from '/home/actionmystique/Program-Files/Ubuntu/Virt-manager/git-virt-manager/virtManager/__init__.pyc'>
[Fri, 16 Oct 2015 15:18:49 virt-manager 16994] DEBUG (virt-manager:220) GTK version: 3.14.13
[Fri, 16 Oct 2015 15:18:49 virt-manager 16994] DEBUG (engine:467) libguestfs inspection support: False
[New Thread 0x7fffe181a700 (LWP 17004)]
[Fri, 16 Oct 2015 15:18:49 virt-manager 16994] DEBUG (systray:153) Showing systray: True
[Fri, 16 Oct 2015 15:18:49 virt-manager 16994] DEBUG (engine:237) About to connect to uris ['qemu:///system']
[Fri, 16 Oct 2015 15:18:49 virt-manager 16994] DEBUG (manager:208) Showing manager
[Fri, 16 Oct 2015 15:18:49 virt-manager 16994] DEBUG (engine:368) window counter incremented to 1
[Fri, 16 Oct 2015 15:18:49 virt-manager 16994] DEBUG (connection:567) conn=qemu:///system changed to state=Connecting
[Fri, 16 Oct 2015 15:18:49 virt-manager 16994] DEBUG (connection:886) Scheduling background open thread for qemu:///system
[Fri, 16 Oct 2015 15:18:49 virt-manager 16994] DEBUG (connection:935) libvirt version=1002021
[Fri, 16 Oct 2015 15:18:49 virt-manager 16994] DEBUG (connection:937) daemon version=1002021
[Fri, 16 Oct 2015 15:18:49 virt-manager 16994] DEBUG (connection:938) conn version=2004050
[Fri, 16 Oct 2015 15:18:49 virt-manager 16994] DEBUG (connection:940) qemu:///system capabilities:
<capabilities>

  <host>
    <uuid>00000000-0000-0000-0000-8c89a50e4e89</uuid>
    <cpu>
      <arch>x86_64</arch>
      <model>Westmere</model>
      <vendor>Intel</vendor>
      <topology sockets="1" cores="4" threads="2"/>
      <feature name="invtsc"/>
      <feature name="invpcid"/>
      <feature name="erms"/>
      <feature name="bmi2"/>
      <feature name="smep"/>
      <feature name="avx2"/>
      <feature name="bmi1"/>
      <feature name="fsgsbase"/>
      <feature name="abm"/>
      <feature name="rdtscp"/>
      <feature name="pdpe1gb"/>
      <feature name="rdrand"/>
      <feature name="f16c"/>
      <feature name="avx"/>
      <feature name="osxsave"/>
      <feature name="xsave"/>
      <feature name="tsc-deadline"/>
      <feature name="movbe"/>
      <feature name="pcid"/>
      <feature name="pdcm"/>
      <feature name="xtpr"/>
      <feature name="fma"/>
      <feature name="tm2"/>
      <feature name="est"/>
      <feature name="vmx"/>
      <feature name="ds_cpl"/>
      <feature name="monitor"/>
      <feature name="dtes64"/>
      <feature name="pclmuldq"/>
      <feature name="pbe"/>
      <feature name="tm"/>
      <feature name="ht"/>
      <feature name="ss"/>
      <feature name="acpi"/>
      <feature name="ds"/>
      <feature name="vme"/>
      <pages unit="KiB" size="4"/>
      <pages unit="KiB" size="2048"/>
    </cpu>
    <power_management>
      <suspend_mem/>
      <suspend_disk/>
      <suspend_hybrid/>
    </power_management>
    <migration_features>
      <live/>
      <uri_transports>
        <uri_transport>tcp</uri_transport>
        <uri_transport>rdma</uri_transport>
      </uri_transports>
    </migration_features>
    <topology>
      <cells num="1">
        <cell id="0">
          <memory unit="KiB">16351008</memory>
          <cpus num="8">
            <cpu id="0" socket_id="0" core_id="0" siblings="0"/>
            <cpu id="1" socket_id="0" core_id="0" siblings="1"/>
            <cpu id="2" socket_id="0" core_id="1" siblings="2"/>
            <cpu id="3" socket_id="0" core_id="1" siblings="3"/>
            <cpu id="4" socket_id="0" core_id="2" siblings="4"/>
            <cpu id="5" socket_id="0" core_id="2" siblings="5"/>
            <cpu id="6" socket_id="0" core_id="3" siblings="6"/>
            <cpu id="7" socket_id="0" core_id="3" siblings="7"/>
          </cpus>
        </cell>
      </cells>
    </topology>
    <secmodel>
      <model>none</model>
      <doi>0</doi>
    </secmodel>
    <secmodel>
      <model>dac</model>
      <doi>0</doi>
      <baselabel type="kvm">+0:+0</baselabel>
      <baselabel type="qemu">+0:+0</baselabel>
    </secmodel>
  </host>

  <guest>
    <os_type>hvm</os_type>
    <arch name="i686">
      <wordsize>32</wordsize>
      <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      <machine maxCpus="255">pc-i440fx-2.4</machine>
      <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
      <machine maxCpus="255">pc-1.3</machine>
      <machine maxCpus="255">pc-0.12</machine>
      <machine maxCpus="255">pc-q35-1.6</machine>
      <machine maxCpus="255">pc-q35-1.5</machine>
      <machine maxCpus="255">pc-i440fx-1.6</machine>
      <machine maxCpus="255">pc-q35-2.2</machine>
      <machine maxCpus="255">pc-i440fx-1.7</machine>
      <machine maxCpus="255">pc-q35-2.1</machine>
      <machine maxCpus="255">pc-0.11</machine>
      <machine maxCpus="255">pc-0.10</machine>
      <machine maxCpus="255">pc-i440fx-2.2</machine>
      <machine maxCpus="255">pc-1.2</machine>
      <machine maxCpus="1">isapc</machine>
      <machine maxCpus="255">pc-i440fx-2.3</machine>
      <machine maxCpus="255">pc-q35-1.4</machine>
      <machine maxCpus="255">pc-0.15</machine>
      <machine maxCpus="255">pc-i440fx-1.5</machine>
      <machine maxCpus="255">pc-q35-2.0</machine>
      <machine maxCpus="255">pc-i440fx-1.4</machine>
      <machine maxCpus="255">pc-0.14</machine>
      <machine maxCpus="255">pc-1.1</machine>
      <machine maxCpus="255">pc-i440fx-2.1</machine>
      <machine maxCpus="255">pc-q35-1.7</machine>
      <machine maxCpus="255">pc-1.0</machine>
      <machine maxCpus="255">pc-i440fx-2.0</machine>
      <machine maxCpus="255">pc-q35-2.4</machine>
      <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
      <machine maxCpus="255">pc-q35-2.3</machine>
      <machine maxCpus="255">pc-0.13</machine>
      <domain type="qemu">
        <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      </domain>
      <domain type="kvm">
        <emulator>/usr/bin/kvm</emulator>
        <machine maxCpus="255">pc-i440fx-2.4</machine>
        <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
        <machine maxCpus="255">pc-1.3</machine>
        <machine maxCpus="255">pc-0.12</machine>
        <machine maxCpus="255">pc-q35-1.6</machine>
        <machine maxCpus="255">pc-q35-1.5</machine>
        <machine maxCpus="255">pc-i440fx-1.6</machine>
        <machine maxCpus="255">pc-q35-2.2</machine>
        <machine maxCpus="255">pc-i440fx-1.7</machine>
        <machine maxCpus="255">pc-q35-2.1</machine>
        <machine maxCpus="255">pc-0.11</machine>
        <machine maxCpus="255">pc-0.10</machine>
        <machine maxCpus="255">pc-i440fx-2.2</machine>
        <machine maxCpus="255">pc-1.2</machine>
        <machine maxCpus="1">isapc</machine>
        <machine maxCpus="255">pc-i440fx-2.3</machine>
        <machine maxCpus="255">pc-q35-1.4</machine>
        <machine maxCpus="255">pc-0.15</machine>
        <machine maxCpus="255">pc-i440fx-1.5</machine>
        <machine maxCpus="255">pc-q35-2.0</machine>
        <machine maxCpus="255">pc-i440fx-1.4</machine>
        <machine maxCpus="255">pc-0.14</machine>
        <machine maxCpus="255">pc-1.1</machine>
        <machine maxCpus="255">pc-i440fx-2.1</machine>
        <machine maxCpus="255">pc-q35-1.7</machine>
        <machine maxCpus="255">pc-1.0</machine>
        <machine maxCpus="255">pc-i440fx-2.0</machine>
        <machine maxCpus="255">pc-q35-2.4</machine>
        <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
        <machine maxCpus="255">pc-q35-2.3</machine>
        <machine maxCpus="255">pc-0.13</machine>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <deviceboot/>
      <disksnapshot default="on" toggle="no"/>
      <acpi default="on" toggle="yes"/>
      <apic default="on" toggle="no"/>
      <pae/>
      <nonpae/>
    </features>
  </guest>

  <guest>
    <os_type>hvm</os_type>
    <arch name="x86_64">
      <wordsize>64</wordsize>
      <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      <machine maxCpus="255">pc-i440fx-2.4</machine>
      <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
      <machine maxCpus="255">pc-1.3</machine>
      <machine maxCpus="255">pc-0.12</machine>
      <machine maxCpus="255">pc-q35-1.6</machine>
      <machine maxCpus="255">pc-q35-1.5</machine>
      <machine maxCpus="255">pc-i440fx-1.6</machine>
      <machine maxCpus="255">pc-q35-2.2</machine>
      <machine maxCpus="255">pc-i440fx-1.7</machine>
      <machine maxCpus="255">pc-q35-2.1</machine>
      <machine maxCpus="255">pc-0.11</machine>
      <machine maxCpus="255">pc-0.10</machine>
      <machine maxCpus="255">pc-i440fx-2.2</machine>
      <machine maxCpus="255">pc-1.2</machine>
      <machine maxCpus="1">isapc</machine>
      <machine maxCpus="255">pc-i440fx-2.3</machine>
      <machine maxCpus="255">pc-q35-1.4</machine>
      <machine maxCpus="255">pc-0.15</machine>
      <machine maxCpus="255">pc-i440fx-1.5</machine>
      <machine maxCpus="255">pc-q35-2.0</machine>
      <machine maxCpus="255">pc-i440fx-1.4</machine>
      <machine maxCpus="255">pc-0.14</machine>
      <machine maxCpus="255">pc-1.1</machine>
      <machine maxCpus="255">pc-i440fx-2.1</machine>
      <machine maxCpus="255">pc-q35-1.7</machine>
      <machine maxCpus="255">pc-1.0</machine>
      <machine maxCpus="255">pc-i440fx-2.0</machine>
      <machine maxCpus="255">pc-q35-2.4</machine>
      <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
      <machine maxCpus="255">pc-q35-2.3</machine>
      <machine maxCpus="255">pc-0.13</machine>
      <domain type="qemu">
        <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      </domain>
      <domain type="kvm">
        <emulator>/usr/bin/kvm</emulator>
        <machine maxCpus="255">pc-i440fx-2.4</machine>
        <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
        <machine maxCpus="255">pc-1.3</machine>
        <machine maxCpus="255">pc-0.12</machine>
        <machine maxCpus="255">pc-q35-1.6</machine>
        <machine maxCpus="255">pc-q35-1.5</machine>
        <machine maxCpus="255">pc-i440fx-1.6</machine>
        <machine maxCpus="255">pc-q35-2.2</machine>
        <machine maxCpus="255">pc-i440fx-1.7</machine>
        <machine maxCpus="255">pc-q35-2.1</machine>
        <machine maxCpus="255">pc-0.11</machine>
        <machine maxCpus="255">pc-0.10</machine>
        <machine maxCpus="255">pc-i440fx-2.2</machine>
        <machine maxCpus="255">pc-1.2</machine>
        <machine maxCpus="1">isapc</machine>
        <machine maxCpus="255">pc-i440fx-2.3</machine>
        <machine maxCpus="255">pc-q35-1.4</machine>
        <machine maxCpus="255">pc-0.15</machine>
        <machine maxCpus="255">pc-i440fx-1.5</machine>
        <machine maxCpus="255">pc-q35-2.0</machine>
        <machine maxCpus="255">pc-i440fx-1.4</machine>
        <machine maxCpus="255">pc-0.14</machine>
        <machine maxCpus="255">pc-1.1</machine>
        <machine maxCpus="255">pc-i440fx-2.1</machine>
        <machine maxCpus="255">pc-q35-1.7</machine>
        <machine maxCpus="255">pc-1.0</machine>
        <machine maxCpus="255">pc-i440fx-2.0</machine>
        <machine maxCpus="255">pc-q35-2.4</machine>
        <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
        <machine maxCpus="255">pc-q35-2.3</machine>
        <machine maxCpus="255">pc-0.13</machine>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <deviceboot/>
      <disksnapshot default="on" toggle="no"/>
      <acpi default="on" toggle="yes"/>
      <apic default="on" toggle="no"/>
    </features>
  </guest>

</capabilities>

[Fri, 16 Oct 2015 15:18:49 virt-manager 16994] DEBUG (connection:788) Using domain events
[Fri, 16 Oct 2015 15:18:49 virt-manager 16994] DEBUG (connection:825) Using network events
[New Thread 0x7fffdb5e1700 (LWP 17008)]
[New Thread 0x7fffd9b6b700 (LWP 17010)]
[New Thread 0x7fffda36c700 (LWP 17009)]
[New Thread 0x7fffdbde2700 (LWP 17007)]
[New Thread 0x7fffe0e0b700 (LWP 17006)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdb5e1700 (LWP 17008)]
0x00007ffff43b1f28 in virClassIsDerivedFrom () from /usr/lib/libvirt.so.0
(gdb) thread apply all bt

Thread 7 (Thread 0x7fffe0e0b700 (LWP 17006)):
#0  0x00007ffff78ec8dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff60ddebc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff60de242 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff59e7af6 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007ffff6104955 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff7bc26aa in start_thread (arg=0x7fffe0e0b700) at pthread_create.c:333
#6  0x00007ffff78f7eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 6 (Thread 0x7fffdbde2700 (LWP 17007)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007ffff6122a0a in g_cond_wait_until () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff60b2889 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff61052c0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ffff6104955 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff7bc26aa in start_thread (arg=0x7fffdbde2700) at pthread_create.c:333
#6  0x00007ffff78f7eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 5 (Thread 0x7fffda36c700 (LWP 17009)):
#0  0x00007ffff7bca0c9 in futex_abstimed_wait (cancel=true, private=<optimized out>, abstime=0x0, expected=0, futex=0x7fffcc0024a0)
    at sem_waitcommon.c:42
#1  do_futex_wait (sem=sem@entry=0x7fffcc0024a0, abstime=0x0) at sem_waitcommon.c:208
#2  0x00007ffff7bca164 in __new_sem_wait_slow (sem=0x7fffcc0024a0, abstime=0x0) at sem_waitcommon.c:277
#3  0x00007ffff7bca20a in __new_sem_wait (sem=<optimized out>) at sem_wait.c:28
#4  0x0000000000583500 in ?? ()
#5  0x00000000004ccd05 in PyEval_EvalFrameEx ()
#6  0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#7  0x00000000004cd217 in PyEval_EvalFrameEx ()
#8  0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#9  0x00000000004cd217 in PyEval_EvalFrameEx ()
#10 0x00000000004e7cc8 in ?? ()
#11 0x00000000004cf239 in PyEval_EvalFrameEx ()
#12 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#13 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#14 0x00000000004e7cc8 in ?? ()
#15 0x000000000050b968 in ?? ()
#16 0x00000000004d437b in PyEval_CallObjectWithKeywords ()
#17 0x00000000005bdcd2 in ?? ()
#18 0x00007ffff7bc26aa in start_thread (arg=0x7fffda36c700) at pthread_create.c:333
#19 0x00007ffff78f7eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7fffd9b6b700 (LWP 17010)):
#0  0x00007ffff7bca0c9 in futex_abstimed_wait (cancel=true, private=<optimized out>, abstime=0x0, expected=0, futex=0x7fffc00028d0)
    at sem_waitcommon.c:42
#1  do_futex_wait (sem=sem@entry=0x7fffc00028d0, abstime=0x0) at sem_waitcommon.c:208
---Type <return> to continue, or q <return> to quit---  
#2  0x00007ffff7bca164 in __new_sem_wait_slow (sem=0x7fffc00028d0, abstime=0x0) at sem_waitcommon.c:277
#3  0x00007ffff7bca20a in __new_sem_wait (sem=<optimized out>) at sem_wait.c:28
#4  0x0000000000583500 in ?? ()
#5  0x00000000004ccd05 in PyEval_EvalFrameEx ()
#6  0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#7  0x00000000004cd217 in PyEval_EvalFrameEx ()
#8  0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#9  0x00000000004cd217 in PyEval_EvalFrameEx ()
#10 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#11 0x00000000004e7cc8 in ?? ()
#12 0x00000000004cf239 in PyEval_EvalFrameEx ()
#13 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#14 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#15 0x00000000004e7cc8 in ?? ()
#16 0x000000000050b968 in ?? ()
#17 0x00000000004d437b in PyEval_CallObjectWithKeywords ()
#18 0x00000000005bdcd2 in ?? ()
#19 0x00007ffff7bc26aa in start_thread (arg=0x7fffd9b6b700) at pthread_create.c:333
#20 0x00007ffff78f7eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7fffdb5e1700 (LWP 17008)):
#0  0x00007ffff43b1f28 in virClassIsDerivedFrom () from /usr/lib/libvirt.so.0
#1  0x00007ffff447daaf in virNetworkFree () from /usr/lib/libvirt.so.0
#2  0x00007ffff48b3970 in libvirt_virNetworkFree () from /usr/local/lib/python2.7/dist-packages/libvirtmod.so
#3  0x00000000004ccd05 in PyEval_EvalFrameEx ()
#4  0x00000000004e7cc8 in ?? ()
#5  0x000000000050b968 in ?? ()
#6  0x0000000000570134 in ?? ()
#7  0x0000000000514eb8 in ?? ()
#8  0x00000000004a75e5 in ?? ()
#9  0x00000000004cd0c6 in PyEval_EvalFrameEx ()
#10 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#11 0x00000000004cd217 in PyEval_EvalFrameEx ()
#12 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#13 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#14 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#15 0x00000000004cd217 in PyEval_EvalFrameEx ()
#16 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#17 0x00000000004cd217 in PyEval_EvalFrameEx ()
#18 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#19 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#20 0x00000000004ce7d3 in PyEval_EvalFrameEx ()
#21 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#22 0x00000000004ce7d3 in PyEval_EvalFrameEx ()
#23 0x00000000004e7cc8 in ?? ()
#24 0x00000000004cf239 in PyEval_EvalFrameEx ()
---Type <return> to continue, or q <return> to quit---
#25 0x00000000004e7cc8 in ?? ()
#26 0x00000000004cf239 in PyEval_EvalFrameEx ()
#27 0x00000000004e7cc8 in ?? ()
#28 0x00000000004cf239 in PyEval_EvalFrameEx ()
#29 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#30 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#31 0x00000000004e7cc8 in ?? ()
#32 0x000000000050b968 in ?? ()
#33 0x00000000004d437b in PyEval_CallObjectWithKeywords ()
#34 0x00000000005bdcd2 in ?? ()
#35 0x00007ffff7bc26aa in start_thread (arg=0x7fffdb5e1700) at pthread_create.c:333
#36 0x00007ffff78f7eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7fffe181a700 (LWP 17004)):
#0  0x00007ffff78ec8dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff60ddebc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff60ddfcc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fffe360727d in ?? () from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#4  0x00007ffff6104955 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff7bc26aa in start_thread (arg=0x7fffe181a700) at pthread_create.c:333
#6  0x00007ffff78f7eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7ffff7fcb700 (LWP 16994)):
#0  0x00007ffff78ec8dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff60ddebc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff60ddfcc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff59b167c in g_application_run () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007ffff5e91d90 in ffi_call_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#5  0x00007ffff5e917f8 in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#6  0x00007ffff68556a4 in ?? () from /usr/lib/python2.7/dist-packages/gi/_gi.so
#7  0x00007ffff6856fd8 in ?? () from /usr/lib/python2.7/dist-packages/gi/_gi.so
#8  0x00007ffff684b49e in ?? () from /usr/lib/python2.7/dist-packages/gi/_gi.so
#9  0x00000000004cd9ab in PyEval_EvalFrameEx ()
#10 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#11 0x00000000004ce7d3 in PyEval_EvalFrameEx ()
#12 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#13 0x000000000050481f in ?? ()
#14 0x00000000004fc182 in PyRun_FileExFlags ()
#15 0x00000000004fb247 in PyRun_SimpleFileExFlags ()
#16 0x000000000049aa6e in Py_Main ()
#17 0x00007ffff7811a40 in __libc_start_main (main=0x49a500 <main>, argc=3, argv=0x7fffffffe488, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffe478) at libc-start.c:289
#18 0x000000000049a429 in _start ()
(gdb)
-------------------------------------------------------------------------------

With libvirt-python 1.2.19: it runs fine
-------------------------------------------------------------------------------
root@msi-ge60-ubuntu:/home/actionmystique/Program-Files/Ubuntu/Virt-manager/git-virt-manager# gdb --args python ./virt-manager --debug
GNU gdb (Ubuntu 7.9-1ubuntu1) 7.9
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/python ./virt-manager --debug
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (cli:256) Launched with command line: ./virt-manager --debug
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (virt-manager:160) virt-manager version: 1.2.1
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (virt-manager:161) virtManager import: <module 'virtManager' from '/home/actionmystique/Program-Files/Ubuntu/Virt-manager/git-virt-manager/virtManager/__init__.pyc'>
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (virt-manager:220) GTK version: 3.14.13
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (engine:467) libguestfs inspection support: False
[New Thread 0x7fffe181b700 (LWP 29183)]
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (systray:153) Showing systray: True
warning: Corrupted shared library list: 0x11ffdb0 != 0x11dac70
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (engine:237) About to connect to uris ['qemu:///system']
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (manager:208) Showing manager
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (engine:368) window counter incremented to 1
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:567) conn=qemu:///system changed to state=Connecting
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:886) Scheduling background open thread for qemu:///system
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:935) libvirt version=1002021
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:937) daemon version=1002021
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:938) conn version=2004050
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:940) qemu:///system capabilities:
<capabilities>

  <host>
    <uuid>00000000-0000-0000-0000-8c89a50e4e89</uuid>
    <cpu>
      <arch>x86_64</arch>
      <model>Westmere</model>
      <vendor>Intel</vendor>
      <topology sockets="1" cores="4" threads="2"/>
      <feature name="invtsc"/>
      <feature name="invpcid"/>
      <feature name="erms"/>
      <feature name="bmi2"/>
      <feature name="smep"/>
      <feature name="avx2"/>
      <feature name="bmi1"/>
      <feature name="fsgsbase"/>
      <feature name="abm"/>
      <feature name="rdtscp"/>
      <feature name="pdpe1gb"/>
      <feature name="rdrand"/>
      <feature name="f16c"/>
      <feature name="avx"/>
      <feature name="osxsave"/>
      <feature name="xsave"/>
      <feature name="tsc-deadline"/>
      <feature name="movbe"/>
      <feature name="pcid"/>
      <feature name="pdcm"/>
      <feature name="xtpr"/>
      <feature name="fma"/>
      <feature name="tm2"/>
      <feature name="est"/>
      <feature name="vmx"/>
      <feature name="ds_cpl"/>
      <feature name="monitor"/>
      <feature name="dtes64"/>
      <feature name="pclmuldq"/>
      <feature name="pbe"/>
      <feature name="tm"/>
      <feature name="ht"/>
      <feature name="ss"/>
      <feature name="acpi"/>
      <feature name="ds"/>
      <feature name="vme"/>
      <pages unit="KiB" size="4"/>
      <pages unit="KiB" size="2048"/>
    </cpu>
    <power_management>
      <suspend_mem/>
      <suspend_disk/>
      <suspend_hybrid/>
    </power_management>
    <migration_features>
      <live/>
      <uri_transports>
        <uri_transport>tcp</uri_transport>
        <uri_transport>rdma</uri_transport>
      </uri_transports>
    </migration_features>
    <topology>
      <cells num="1">
        <cell id="0">
          <memory unit="KiB">16351008</memory>
          <cpus num="8">
            <cpu id="0" socket_id="0" core_id="0" siblings="0"/>
            <cpu id="1" socket_id="0" core_id="0" siblings="1"/>
            <cpu id="2" socket_id="0" core_id="1" siblings="2"/>
            <cpu id="3" socket_id="0" core_id="1" siblings="3"/>
            <cpu id="4" socket_id="0" core_id="2" siblings="4"/>
            <cpu id="5" socket_id="0" core_id="2" siblings="5"/>
            <cpu id="6" socket_id="0" core_id="3" siblings="6"/>
            <cpu id="7" socket_id="0" core_id="3" siblings="7"/>
          </cpus>
        </cell>
      </cells>
    </topology>
    <secmodel>
      <model>none</model>
      <doi>0</doi>
    </secmodel>
    <secmodel>
      <model>dac</model>
      <doi>0</doi>
      <baselabel type="kvm">+0:+0</baselabel>
      <baselabel type="qemu">+0:+0</baselabel>
    </secmodel>
  </host>

  <guest>
    <os_type>hvm</os_type>
    <arch name="i686">
      <wordsize>32</wordsize>
      <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      <machine maxCpus="255">pc-i440fx-2.4</machine>
      <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
      <machine maxCpus="255">pc-1.3</machine>
      <machine maxCpus="255">pc-0.12</machine>
      <machine maxCpus="255">pc-q35-1.6</machine>
      <machine maxCpus="255">pc-q35-1.5</machine>
      <machine maxCpus="255">pc-i440fx-1.6</machine>
      <machine maxCpus="255">pc-q35-2.2</machine>
      <machine maxCpus="255">pc-i440fx-1.7</machine>
      <machine maxCpus="255">pc-q35-2.1</machine>
      <machine maxCpus="255">pc-0.11</machine>
      <machine maxCpus="255">pc-0.10</machine>
      <machine maxCpus="255">pc-i440fx-2.2</machine>
      <machine maxCpus="255">pc-1.2</machine>
      <machine maxCpus="1">isapc</machine>
      <machine maxCpus="255">pc-i440fx-2.3</machine>
      <machine maxCpus="255">pc-q35-1.4</machine>
      <machine maxCpus="255">pc-0.15</machine>
      <machine maxCpus="255">pc-i440fx-1.5</machine>
      <machine maxCpus="255">pc-q35-2.0</machine>
      <machine maxCpus="255">pc-i440fx-1.4</machine>
      <machine maxCpus="255">pc-0.14</machine>
      <machine maxCpus="255">pc-1.1</machine>
      <machine maxCpus="255">pc-i440fx-2.1</machine>
      <machine maxCpus="255">pc-q35-1.7</machine>
      <machine maxCpus="255">pc-1.0</machine>
      <machine maxCpus="255">pc-i440fx-2.0</machine>
      <machine maxCpus="255">pc-q35-2.4</machine>
      <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
      <machine maxCpus="255">pc-q35-2.3</machine>
      <machine maxCpus="255">pc-0.13</machine>
      <domain type="qemu">
        <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      </domain>
      <domain type="kvm">
        <emulator>/usr/bin/kvm</emulator>
        <machine maxCpus="255">pc-i440fx-2.4</machine>
        <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
        <machine maxCpus="255">pc-1.3</machine>
        <machine maxCpus="255">pc-0.12</machine>
        <machine maxCpus="255">pc-q35-1.6</machine>
        <machine maxCpus="255">pc-q35-1.5</machine>
        <machine maxCpus="255">pc-i440fx-1.6</machine>
        <machine maxCpus="255">pc-q35-2.2</machine>
        <machine maxCpus="255">pc-i440fx-1.7</machine>
        <machine maxCpus="255">pc-q35-2.1</machine>
        <machine maxCpus="255">pc-0.11</machine>
        <machine maxCpus="255">pc-0.10</machine>
        <machine maxCpus="255">pc-i440fx-2.2</machine>
        <machine maxCpus="255">pc-1.2</machine>
        <machine maxCpus="1">isapc</machine>
        <machine maxCpus="255">pc-i440fx-2.3</machine>
        <machine maxCpus="255">pc-q35-1.4</machine>
        <machine maxCpus="255">pc-0.15</machine>
        <machine maxCpus="255">pc-i440fx-1.5</machine>
        <machine maxCpus="255">pc-q35-2.0</machine>
        <machine maxCpus="255">pc-i440fx-1.4</machine>
        <machine maxCpus="255">pc-0.14</machine>
        <machine maxCpus="255">pc-1.1</machine>
        <machine maxCpus="255">pc-i440fx-2.1</machine>
        <machine maxCpus="255">pc-q35-1.7</machine>
        <machine maxCpus="255">pc-1.0</machine>
        <machine maxCpus="255">pc-i440fx-2.0</machine>
        <machine maxCpus="255">pc-q35-2.4</machine>
        <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
        <machine maxCpus="255">pc-q35-2.3</machine>
        <machine maxCpus="255">pc-0.13</machine>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <deviceboot/>
      <disksnapshot default="on" toggle="no"/>
      <acpi default="on" toggle="yes"/>
      <apic default="on" toggle="no"/>
      <pae/>
      <nonpae/>
    </features>
  </guest>

  <guest>
    <os_type>hvm</os_type>
    <arch name="x86_64">
      <wordsize>64</wordsize>
      <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      <machine maxCpus="255">pc-i440fx-2.4</machine>
      <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
      <machine maxCpus="255">pc-1.3</machine>
      <machine maxCpus="255">pc-0.12</machine>
      <machine maxCpus="255">pc-q35-1.6</machine>
      <machine maxCpus="255">pc-q35-1.5</machine>
      <machine maxCpus="255">pc-i440fx-1.6</machine>
      <machine maxCpus="255">pc-q35-2.2</machine>
      <machine maxCpus="255">pc-i440fx-1.7</machine>
      <machine maxCpus="255">pc-q35-2.1</machine>
      <machine maxCpus="255">pc-0.11</machine>
      <machine maxCpus="255">pc-0.10</machine>
      <machine maxCpus="255">pc-i440fx-2.2</machine>
      <machine maxCpus="255">pc-1.2</machine>
      <machine maxCpus="1">isapc</machine>
      <machine maxCpus="255">pc-i440fx-2.3</machine>
      <machine maxCpus="255">pc-q35-1.4</machine>
      <machine maxCpus="255">pc-0.15</machine>
      <machine maxCpus="255">pc-i440fx-1.5</machine>
      <machine maxCpus="255">pc-q35-2.0</machine>
      <machine maxCpus="255">pc-i440fx-1.4</machine>
      <machine maxCpus="255">pc-0.14</machine>
      <machine maxCpus="255">pc-1.1</machine>
      <machine maxCpus="255">pc-i440fx-2.1</machine>
      <machine maxCpus="255">pc-q35-1.7</machine>
      <machine maxCpus="255">pc-1.0</machine>
      <machine maxCpus="255">pc-i440fx-2.0</machine>
      <machine maxCpus="255">pc-q35-2.4</machine>
      <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
      <machine maxCpus="255">pc-q35-2.3</machine>
      <machine maxCpus="255">pc-0.13</machine>
      <domain type="qemu">
        <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      </domain>
      <domain type="kvm">
        <emulator>/usr/bin/kvm</emulator>
        <machine maxCpus="255">pc-i440fx-2.4</machine>
        <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
        <machine maxCpus="255">pc-1.3</machine>
        <machine maxCpus="255">pc-0.12</machine>
        <machine maxCpus="255">pc-q35-1.6</machine>
        <machine maxCpus="255">pc-q35-1.5</machine>
        <machine maxCpus="255">pc-i440fx-1.6</machine>
        <machine maxCpus="255">pc-q35-2.2</machine>
        <machine maxCpus="255">pc-i440fx-1.7</machine>
        <machine maxCpus="255">pc-q35-2.1</machine>
        <machine maxCpus="255">pc-0.11</machine>
        <machine maxCpus="255">pc-0.10</machine>
        <machine maxCpus="255">pc-i440fx-2.2</machine>
        <machine maxCpus="255">pc-1.2</machine>
        <machine maxCpus="1">isapc</machine>
        <machine maxCpus="255">pc-i440fx-2.3</machine>
        <machine maxCpus="255">pc-q35-1.4</machine>
        <machine maxCpus="255">pc-0.15</machine>
        <machine maxCpus="255">pc-i440fx-1.5</machine>
        <machine maxCpus="255">pc-q35-2.0</machine>
        <machine maxCpus="255">pc-i440fx-1.4</machine>
        <machine maxCpus="255">pc-0.14</machine>
        <machine maxCpus="255">pc-1.1</machine>
        <machine maxCpus="255">pc-i440fx-2.1</machine>
        <machine maxCpus="255">pc-q35-1.7</machine>
        <machine maxCpus="255">pc-1.0</machine>
        <machine maxCpus="255">pc-i440fx-2.0</machine>
        <machine maxCpus="255">pc-q35-2.4</machine>
        <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
        <machine maxCpus="255">pc-q35-2.3</machine>
        <machine maxCpus="255">pc-0.13</machine>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <deviceboot/>
      <disksnapshot default="on" toggle="no"/>
      <acpi default="on" toggle="yes"/>
      <apic default="on" toggle="no"/>
    </features>
  </guest>

</capabilities>

[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:788) Using domain events
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:825) Using network events
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) network=virtual-bridge-8 status=Active added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) interface=virbr11 status=Inactive added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) network=virtual-bridge-9 status=Active added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) interface=vmnet1 status=Inactive added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) network=loopback status=Active added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) network=default status=Active added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) interface=lo status=Inactive added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) interface=p3p1 status=Inactive added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) interface=vmnet8 status=Inactive added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) interface=virbr4 status=Inactive added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) interface=wlan0 status=Active added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) network=virtual-bridge-3 status=Active added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) network=virtual-bridge-1 status=Active added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) interface=virbr9 status=Inactive added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) interface=virbr8 status=Inactive added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) network=virtual-bridge-6 status=Active added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) network=virtual-bridge-7 status=Active added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) interface=virbr7 status=Inactive added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) network=virtual-bridge-4 status=Active added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) interface=virbr6 status=Inactive added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) network=virtual-bridge-5 status=Active added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) network=virtual-bridge-2 status=Active added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) interface=virbr5 status=Inactive added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) network=virtual-router status=Active added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) interface=virbr0 status=Inactive added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) domain=KVM-Windows-10 status=Shutoff added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) interface=virbr3 status=Inactive added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) pool=default status=Active added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) interface=virbr2 status=Inactive added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) domain=KVM-ASAv-9.4.1 status=Shutoff added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) interface=virbr1 status=Inactive added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) interface=virbr10 status=Inactive added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) domain=KVM-Ubuntu-Server-15.04 status=Shutoff added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) pool=VIRL status=Active added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) domain=KVM-F5-Big-IP-VE-12.0 status=Shutoff added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) domain=KVM-CSR-1000V-3.14 status=Shutoff added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) domain=KVM-Ubuntu-15.04-Quagga-0.99 status=Shutoff added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) pool=Ubuntu status=Active added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) pool=BIGIP-12.0.0.0.0.606.ALL.qcow2 status=Active added
[Fri, 16 Oct 2015 15:25:38 virt-manager 29176] DEBUG (connection:1049) pool=ASAv status=Active added
[Fri, 16 Oct 2015 15:25:40 virt-manager 29176] DEBUG (connection:567) conn=qemu:///system changed to state=Active
Comment 7 Cole Robinson 2015-10-19 17:56:59 EDT
The crash is in virNetworkFree:

#0  0x00007ffff43b1f28 in virClassIsDerivedFrom () from /usr/lib/libvirt.so.0
#1  0x00007ffff447daaf in virNetworkFree () from /usr/lib/libvirt.so.0
#2  0x00007ffff48b3970 in libvirt_virNetworkFree () from /usr/local/lib/python2.7/dist-packages/libvirtmod.so

Is the working libvirt-python-1.2.19 built from source, or is it a distribution package? I want to make sure this isn't a general build issue, so if you didn't build 1.2.19 from source, please try that as well

But since I can't reproduce, it's tough to tell the exact problem. There were quite a few cleanups in the libvirt-python code between 1.2.19 and 1.2.20 so can you bisect?

git clone git://libvirt.org/libvirt-python.git
cd libvirt-python.git
git bisect start v1.2.20 v1.2.19
[build, install, test]
if it still crashes, do: git bisect bad
if it works, do: git bisect good
[build, install, test]

Continue that and git will eventually pin point the offending commit
Comment 8 jean-christophe manciot 2015-10-20 04:35:52 EDT
git bisect start v1.2.20 v1.2.19
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[3a97b3212d999a6a0c813e256558d1d47b193782] generator: fix build fail with old xml lib

Virt-manager works fine now.

Then:
git bisect good
1d7df3c97cfdbb22de9335976e4ac334b8e83356 is the first bad commit
commit 1d7df3c97cfdbb22de9335976e4ac334b8e83356
Author: Daniel Veillard <veillard@redhat.com>
Date:   Fri Oct 2 16:17:06 2015 +0200

    Release of libvirt-python-1.2.20

:100755 100755 0aeeb89caa53696581969bffd453f509423df07d 0afcaa49219b3da16095ac197feced158a15880b M	setup.py

It looks like the offending commit has been caught ;)
Comment 9 Cole Robinson 2015-10-20 10:56:19 EDT
Hmm thanks for testing... but I misread the git repo. There isn't much difference between v1.2.19 and v1.2.20, all the changes took place after v1.2.20

Can you see if the issue reproduces with the latest git version?
Comment 10 jean-christophe manciot 2015-10-23 05:49:07 EDT
With git 2.6.0:
git bisect good
1d7df3c97cfdbb22de9335976e4ac334b8e83356 is the first bad commit
commit 1d7df3c97cfdbb22de9335976e4ac334b8e83356
Author: Daniel Veillard <veillard@redhat.com>
Date:   Fri Oct 2 16:17:06 2015 +0200

    Release of libvirt-python-1.2.20

:100755 100755 0aeeb89caa53696581969bffd453f509423df07d 0afcaa49219b3da16095ac197feced158a15880b M	setup.py

If you were talking about latest github version of libvirt-python, I don't see any change from the one that I've compiled & installed.
Comment 11 Cole Robinson 2015-10-23 10:30:17 EDT
Sorry, what I meant was, check if the issue still reproduces when installing git latest commit of libvirt-python.git. I did not mean 're-run the bisect'

Please checkout the master branch and see if you can still reproduce the issue
Comment 12 jean-christophe manciot 2015-10-24 05:08:22 EDT
I thought you meant "with the latest release of git".
Anyway, with the last libvirt-python commit, the issue is back, but this time libguestfs is not installed on my system:
-------------------------------------------------------------------------------
(gdb) run
Starting program: /usr/bin/python ./virt-manager --debug
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Sat, 24 Oct 2015 10:01:11 virt-manager 20754] DEBUG (cli:256) Launched with command line: ./virt-manager --debug
[Sat, 24 Oct 2015 10:01:11 virt-manager 20754] DEBUG (virt-manager:160) virt-manager version: 1.2.1
[Sat, 24 Oct 2015 10:01:11 virt-manager 20754] DEBUG (virt-manager:161) virtManager import: <module 'virtManager' from '/home/actionmystique/Program-Files/Ubuntu/Virt-manager/git-virt-manager/virtManager/__init__.pyc'>
[Sat, 24 Oct 2015 10:01:11 virt-manager 20754] DEBUG (virt-manager:220) GTK version: 3.14.13
[Sat, 24 Oct 2015 10:01:11 virt-manager 20754] DEBUG (engine:467) libguestfs inspection support: True
[Sat, 24 Oct 2015 10:01:11 virt-manager 20754] DEBUG (inspection:81) waiting
[New Thread 0x7fffe0dc2700 (LWP 20764)]
[Sat, 24 Oct 2015 10:01:11 virt-manager 20754] DEBUG (systray:153) Showing systray: True
warning: Corrupted shared library list: 0x1255450 != 0x122d4e0
[Sat, 24 Oct 2015 10:01:11 virt-manager 20754] DEBUG (engine:237) About to connect to uris ['qemu:///system']
[Sat, 24 Oct 2015 10:01:11 virt-manager 20754] DEBUG (manager:208) Showing manager
[Sat, 24 Oct 2015 10:01:11 virt-manager 20754] DEBUG (engine:368) window counter incremented to 1
[Sat, 24 Oct 2015 10:01:11 virt-manager 20754] DEBUG (connection:567) conn=qemu:///system changed to state=Connecting
[Sat, 24 Oct 2015 10:01:11 virt-manager 20754] DEBUG (connection:886) Scheduling background open thread for qemu:///system
[Sat, 24 Oct 2015 10:01:11 virt-manager 20754] DEBUG (connection:935) libvirt version=1002021
[Sat, 24 Oct 2015 10:01:11 virt-manager 20754] DEBUG (connection:937) daemon version=1002021
[Sat, 24 Oct 2015 10:01:11 virt-manager 20754] DEBUG (connection:938) conn version=2004050
[Sat, 24 Oct 2015 10:01:11 virt-manager 20754] DEBUG (connection:940) qemu:///system capabilities:
<capabilities>

  <host>
    <uuid>00000000-0000-0000-0000-8c89a50e4e89</uuid>
    <cpu>
      <arch>x86_64</arch>
      <model>Westmere</model>
      <vendor>Intel</vendor>
      <topology sockets="1" cores="4" threads="2"/>
      <feature name="invtsc"/>
      <feature name="invpcid"/>
      <feature name="erms"/>
      <feature name="bmi2"/>
      <feature name="smep"/>
      <feature name="avx2"/>
      <feature name="bmi1"/>
      <feature name="fsgsbase"/>
      <feature name="abm"/>
      <feature name="rdtscp"/>
      <feature name="pdpe1gb"/>
      <feature name="rdrand"/>
      <feature name="f16c"/>
      <feature name="avx"/>
      <feature name="osxsave"/>
      <feature name="xsave"/>
      <feature name="tsc-deadline"/>
      <feature name="movbe"/>
      <feature name="pcid"/>
      <feature name="pdcm"/>
      <feature name="xtpr"/>
      <feature name="fma"/>
      <feature name="tm2"/>
      <feature name="est"/>
      <feature name="vmx"/>
      <feature name="ds_cpl"/>
      <feature name="monitor"/>
      <feature name="dtes64"/>
      <feature name="pclmuldq"/>
      <feature name="pbe"/>
      <feature name="tm"/>
      <feature name="ht"/>
      <feature name="ss"/>
      <feature name="acpi"/>
      <feature name="ds"/>
      <feature name="vme"/>
      <pages unit="KiB" size="4"/>
      <pages unit="KiB" size="2048"/>
    </cpu>
    <power_management>
      <suspend_mem/>
      <suspend_disk/>
      <suspend_hybrid/>
    </power_management>
    <migration_features>
      <live/>
      <uri_transports>
        <uri_transport>tcp</uri_transport>
        <uri_transport>rdma</uri_transport>
      </uri_transports>
    </migration_features>
    <topology>
      <cells num="1">
        <cell id="0">
          <memory unit="KiB">16351008</memory>
          <cpus num="8">
            <cpu id="0" socket_id="0" core_id="0" siblings="0"/>
            <cpu id="1" socket_id="0" core_id="0" siblings="1"/>
            <cpu id="2" socket_id="0" core_id="1" siblings="2"/>
            <cpu id="3" socket_id="0" core_id="1" siblings="3"/>
            <cpu id="4" socket_id="0" core_id="2" siblings="4"/>
            <cpu id="5" socket_id="0" core_id="2" siblings="5"/>
            <cpu id="6" socket_id="0" core_id="3" siblings="6"/>
            <cpu id="7" socket_id="0" core_id="3" siblings="7"/>
          </cpus>
        </cell>
      </cells>
    </topology>
    <secmodel>
      <model>none</model>
      <doi>0</doi>
    </secmodel>
    <secmodel>
      <model>dac</model>
      <doi>0</doi>
      <baselabel type="kvm">+0:+0</baselabel>
      <baselabel type="qemu">+0:+0</baselabel>
    </secmodel>
  </host>

  <guest>
    <os_type>hvm</os_type>
    <arch name="i686">
      <wordsize>32</wordsize>
      <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      <machine maxCpus="255">pc-i440fx-2.4</machine>
      <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
      <machine maxCpus="255">pc-1.3</machine>
      <machine maxCpus="255">pc-0.12</machine>
      <machine maxCpus="255">pc-q35-1.6</machine>
      <machine maxCpus="255">pc-q35-1.5</machine>
      <machine maxCpus="255">pc-i440fx-1.6</machine>
      <machine maxCpus="255">pc-q35-2.2</machine>
      <machine maxCpus="255">pc-i440fx-1.7</machine>
      <machine maxCpus="255">pc-q35-2.1</machine>
      <machine maxCpus="255">pc-0.11</machine>
      <machine maxCpus="255">pc-0.10</machine>
      <machine maxCpus="255">pc-i440fx-2.2</machine>
      <machine maxCpus="255">pc-1.2</machine>
      <machine maxCpus="1">isapc</machine>
      <machine maxCpus="255">pc-i440fx-2.3</machine>
      <machine maxCpus="255">pc-q35-1.4</machine>
      <machine maxCpus="255">pc-0.15</machine>
      <machine maxCpus="255">pc-i440fx-1.5</machine>
      <machine maxCpus="255">pc-q35-2.0</machine>
      <machine maxCpus="255">pc-i440fx-1.4</machine>
      <machine maxCpus="255">pc-0.14</machine>
      <machine maxCpus="255">pc-1.1</machine>
      <machine maxCpus="255">pc-i440fx-2.1</machine>
      <machine maxCpus="255">pc-q35-1.7</machine>
      <machine maxCpus="255">pc-1.0</machine>
      <machine maxCpus="255">pc-i440fx-2.0</machine>
      <machine maxCpus="255">pc-q35-2.4</machine>
      <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
      <machine maxCpus="255">pc-q35-2.3</machine>
      <machine maxCpus="255">pc-0.13</machine>
      <domain type="qemu">
        <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      </domain>
      <domain type="kvm">
        <emulator>/usr/bin/kvm</emulator>
        <machine maxCpus="255">pc-i440fx-2.4</machine>
        <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
        <machine maxCpus="255">pc-1.3</machine>
        <machine maxCpus="255">pc-0.12</machine>
        <machine maxCpus="255">pc-q35-1.6</machine>
        <machine maxCpus="255">pc-q35-1.5</machine>
        <machine maxCpus="255">pc-i440fx-1.6</machine>
        <machine maxCpus="255">pc-q35-2.2</machine>
        <machine maxCpus="255">pc-i440fx-1.7</machine>
        <machine maxCpus="255">pc-q35-2.1</machine>
        <machine maxCpus="255">pc-0.11</machine>
        <machine maxCpus="255">pc-0.10</machine>
        <machine maxCpus="255">pc-i440fx-2.2</machine>
        <machine maxCpus="255">pc-1.2</machine>
        <machine maxCpus="1">isapc</machine>
        <machine maxCpus="255">pc-i440fx-2.3</machine>
        <machine maxCpus="255">pc-q35-1.4</machine>
        <machine maxCpus="255">pc-0.15</machine>
        <machine maxCpus="255">pc-i440fx-1.5</machine>
        <machine maxCpus="255">pc-q35-2.0</machine>
        <machine maxCpus="255">pc-i440fx-1.4</machine>
        <machine maxCpus="255">pc-0.14</machine>
        <machine maxCpus="255">pc-1.1</machine>
        <machine maxCpus="255">pc-i440fx-2.1</machine>
        <machine maxCpus="255">pc-q35-1.7</machine>
        <machine maxCpus="255">pc-1.0</machine>
        <machine maxCpus="255">pc-i440fx-2.0</machine>
        <machine maxCpus="255">pc-q35-2.4</machine>
        <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
        <machine maxCpus="255">pc-q35-2.3</machine>
        <machine maxCpus="255">pc-0.13</machine>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <deviceboot/>
      <disksnapshot default="on" toggle="no"/>
      <acpi default="on" toggle="yes"/>
      <apic default="on" toggle="no"/>
      <pae/>
      <nonpae/>
    </features>
  </guest>

  <guest>
    <os_type>hvm</os_type>
    <arch name="x86_64">
      <wordsize>64</wordsize>
      <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      <machine maxCpus="255">pc-i440fx-2.4</machine>
      <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
      <machine maxCpus="255">pc-1.3</machine>
      <machine maxCpus="255">pc-0.12</machine>
      <machine maxCpus="255">pc-q35-1.6</machine>
      <machine maxCpus="255">pc-q35-1.5</machine>
      <machine maxCpus="255">pc-i440fx-1.6</machine>
      <machine maxCpus="255">pc-q35-2.2</machine>
      <machine maxCpus="255">pc-i440fx-1.7</machine>
      <machine maxCpus="255">pc-q35-2.1</machine>
      <machine maxCpus="255">pc-0.11</machine>
      <machine maxCpus="255">pc-0.10</machine>
      <machine maxCpus="255">pc-i440fx-2.2</machine>
      <machine maxCpus="255">pc-1.2</machine>
      <machine maxCpus="1">isapc</machine>
      <machine maxCpus="255">pc-i440fx-2.3</machine>
      <machine maxCpus="255">pc-q35-1.4</machine>
      <machine maxCpus="255">pc-0.15</machine>
      <machine maxCpus="255">pc-i440fx-1.5</machine>
      <machine maxCpus="255">pc-q35-2.0</machine>
      <machine maxCpus="255">pc-i440fx-1.4</machine>
      <machine maxCpus="255">pc-0.14</machine>
      <machine maxCpus="255">pc-1.1</machine>
      <machine maxCpus="255">pc-i440fx-2.1</machine>
      <machine maxCpus="255">pc-q35-1.7</machine>
      <machine maxCpus="255">pc-1.0</machine>
      <machine maxCpus="255">pc-i440fx-2.0</machine>
      <machine maxCpus="255">pc-q35-2.4</machine>
      <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
      <machine maxCpus="255">pc-q35-2.3</machine>
      <machine maxCpus="255">pc-0.13</machine>
      <domain type="qemu">
        <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      </domain>
      <domain type="kvm">
        <emulator>/usr/bin/kvm</emulator>
        <machine maxCpus="255">pc-i440fx-2.4</machine>
        <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
        <machine maxCpus="255">pc-1.3</machine>
        <machine maxCpus="255">pc-0.12</machine>
        <machine maxCpus="255">pc-q35-1.6</machine>
        <machine maxCpus="255">pc-q35-1.5</machine>
        <machine maxCpus="255">pc-i440fx-1.6</machine>
        <machine maxCpus="255">pc-q35-2.2</machine>
        <machine maxCpus="255">pc-i440fx-1.7</machine>
        <machine maxCpus="255">pc-q35-2.1</machine>
        <machine maxCpus="255">pc-0.11</machine>
        <machine maxCpus="255">pc-0.10</machine>
        <machine maxCpus="255">pc-i440fx-2.2</machine>
        <machine maxCpus="255">pc-1.2</machine>
        <machine maxCpus="1">isapc</machine>
        <machine maxCpus="255">pc-i440fx-2.3</machine>
        <machine maxCpus="255">pc-q35-1.4</machine>
        <machine maxCpus="255">pc-0.15</machine>
        <machine maxCpus="255">pc-i440fx-1.5</machine>
        <machine maxCpus="255">pc-q35-2.0</machine>
        <machine maxCpus="255">pc-i440fx-1.4</machine>
        <machine maxCpus="255">pc-0.14</machine>
        <machine maxCpus="255">pc-1.1</machine>
        <machine maxCpus="255">pc-i440fx-2.1</machine>
        <machine maxCpus="255">pc-q35-1.7</machine>
        <machine maxCpus="255">pc-1.0</machine>
        <machine maxCpus="255">pc-i440fx-2.0</machine>
        <machine maxCpus="255">pc-q35-2.4</machine>
        <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
        <machine maxCpus="255">pc-q35-2.3</machine>
        <machine maxCpus="255">pc-0.13</machine>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <deviceboot/>
      <disksnapshot default="on" toggle="no"/>
      <acpi default="on" toggle="yes"/>
      <apic default="on" toggle="no"/>
    </features>
  </guest>

</capabilities>

[Sat, 24 Oct 2015 10:01:11 virt-manager 20754] DEBUG (connection:788) Using domain events
[Sat, 24 Oct 2015 10:01:11 virt-manager 20754] DEBUG (connection:825) Using network events
[New Thread 0x7fffdabcc700 (LWP 20768)]
[New Thread 0x7fffd9156700 (LWP 20770)]
[New Thread 0x7fffd9957700 (LWP 20769)]
[New Thread 0x7fffdb3cd700 (LWP 20767)]
[New Thread 0x7fffdbbce700 (LWP 20766)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdabcc700 (LWP 20768)]
0x00007ffff43b1f28 in virClassIsDerivedFrom () from /usr/lib/libvirt.so.0
(gdb) thread apply all bt

Thread 7 (Thread 0x7fffdbbce700 (LWP 20766)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007ffff6122a0a in g_cond_wait_until () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff60b2889 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff61052c0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ffff6104955 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff7bc26aa in start_thread (arg=0x7fffdbbce700) at pthread_create.c:333
#6  0x00007ffff78f7eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 6 (Thread 0x7fffdb3cd700 (LWP 20767)):
#0  0x00007ffff78ec8dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff60ddebc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff60de242 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff59e7af6 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007ffff6104955 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff7bc26aa in start_thread (arg=0x7fffdb3cd700) at pthread_create.c:333
#6  0x00007ffff78f7eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 5 (Thread 0x7fffd9957700 (LWP 20769)):
#0  0x00007ffff7bca0c9 in futex_abstimed_wait (cancel=true, private=<optimized out>, abstime=0x0, expected=0, futex=0x7fffc8002be0)
    at sem_waitcommon.c:42
#1  do_futex_wait (sem=sem@entry=0x7fffc8002be0, abstime=0x0) at sem_waitcommon.c:208
#2  0x00007ffff7bca164 in __new_sem_wait_slow (sem=0x7fffc8002be0, abstime=0x0) at sem_waitcommon.c:277
#3  0x00007ffff7bca20a in __new_sem_wait (sem=<optimized out>) at sem_wait.c:28
#4  0x0000000000583500 in ?? ()
#5  0x00000000004ccd05 in PyEval_EvalFrameEx ()
#6  0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#7  0x00000000004cd217 in PyEval_EvalFrameEx ()
#8  0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#9  0x00000000004cd217 in PyEval_EvalFrameEx ()
#10 0x00000000004e7cc8 in ?? ()
#11 0x00000000004cf239 in PyEval_EvalFrameEx ()
#12 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#13 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#14 0x00000000004e7cc8 in ?? ()
#15 0x000000000050b968 in ?? ()
#16 0x00000000004d437b in PyEval_CallObjectWithKeywords ()
#17 0x00000000005bdcd2 in ?? ()
#18 0x00007ffff7bc26aa in start_thread (arg=0x7fffd9957700) at pthread_create.c:333
#19 0x00007ffff78f7eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7fffd9156700 (LWP 20770)):
#0  0x00007ffff7bca0c9 in futex_abstimed_wait (cancel=true, private=<optimized out>, abstime=0x0, expected=0, futex=0x7fffbc007b30)
    at sem_waitcommon.c:42
#1  do_futex_wait (sem=sem@entry=0x7fffbc007b30, abstime=0x0) at sem_waitcommon.c:208
---Type <return> to continue, or q <return> to quit---
#2  0x00007ffff7bca164 in __new_sem_wait_slow (sem=0x7fffbc007b30, abstime=0x0) at sem_waitcommon.c:277
#3  0x00007ffff7bca20a in __new_sem_wait (sem=<optimized out>) at sem_wait.c:28
#4  0x0000000000583500 in ?? ()
#5  0x00000000004ccd05 in PyEval_EvalFrameEx ()
#6  0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#7  0x00000000004cd217 in PyEval_EvalFrameEx ()
#8  0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#9  0x00000000004cd217 in PyEval_EvalFrameEx ()
#10 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#11 0x00000000004e7cc8 in ?? ()
#12 0x00000000004cf239 in PyEval_EvalFrameEx ()
#13 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#14 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#15 0x00000000004e7cc8 in ?? ()
#16 0x000000000050b968 in ?? ()
#17 0x00000000004d437b in PyEval_CallObjectWithKeywords ()
#18 0x00000000005bdcd2 in ?? ()
#19 0x00007ffff7bc26aa in start_thread (arg=0x7fffd9156700) at pthread_create.c:333
#20 0x00007ffff78f7eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7fffdabcc700 (LWP 20768)):
#0  0x00007ffff43b1f28 in virClassIsDerivedFrom () from /usr/lib/libvirt.so.0
#1  0x00007ffff447daaf in virNetworkFree () from /usr/lib/libvirt.so.0
#2  0x00007ffff48b3970 in libvirt_virNetworkFree () from /usr/local/lib/python2.7/dist-packages/libvirtmod.so
#3  0x00000000004ccd05 in PyEval_EvalFrameEx ()
#4  0x00000000004e7cc8 in ?? ()
#5  0x000000000050b968 in ?? ()
#6  0x0000000000570134 in ?? ()
#7  0x0000000000514eb8 in ?? ()
#8  0x00000000004a75e5 in ?? ()
#9  0x00000000004cd0c6 in PyEval_EvalFrameEx ()
#10 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#11 0x00000000004cd217 in PyEval_EvalFrameEx ()
#12 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#13 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#14 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#15 0x00000000004cd217 in PyEval_EvalFrameEx ()
#16 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#17 0x00000000004cd217 in PyEval_EvalFrameEx ()
#18 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#19 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#20 0x00000000004ce7d3 in PyEval_EvalFrameEx ()
#21 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#22 0x00000000004ce7d3 in PyEval_EvalFrameEx ()
#23 0x00000000004e7cc8 in ?? ()
#24 0x00000000004cf239 in PyEval_EvalFrameEx ()
---Type <return> to continue, or q <return> to quit---
#25 0x00000000004e7cc8 in ?? ()
#26 0x00000000004cf239 in PyEval_EvalFrameEx ()
#27 0x00000000004e7cc8 in ?? ()
#28 0x00000000004cf239 in PyEval_EvalFrameEx ()
#29 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#30 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#31 0x00000000004e7cc8 in ?? ()
#32 0x000000000050b968 in ?? ()
#33 0x00000000004d437b in PyEval_CallObjectWithKeywords ()
#34 0x00000000005bdcd2 in ?? ()
#35 0x00007ffff7bc26aa in start_thread (arg=0x7fffdabcc700) at pthread_create.c:333
#36 0x00007ffff78f7eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7fffe0dc2700 (LWP 20764)):
#0  0x00007ffff78ec8dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff60ddebc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff60ddfcc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fffe360727d in ?? () from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#4  0x00007ffff6104955 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff7bc26aa in start_thread (arg=0x7fffe0dc2700) at pthread_create.c:333
#6  0x00007ffff78f7eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7ffff7fcb700 (LWP 20754)):
#0  0x00007ffff78ec8dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff60ddebc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff60ddfcc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff59b167c in g_application_run () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007ffff5e91d90 in ffi_call_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#5  0x00007ffff5e917f8 in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#6  0x00007ffff68556a4 in ?? () from /usr/lib/python2.7/dist-packages/gi/_gi.so
#7  0x00007ffff6856fd8 in ?? () from /usr/lib/python2.7/dist-packages/gi/_gi.so
#8  0x00007ffff684b49e in ?? () from /usr/lib/python2.7/dist-packages/gi/_gi.so
#9  0x00000000004cd9ab in PyEval_EvalFrameEx ()
#10 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#11 0x00000000004ce7d3 in PyEval_EvalFrameEx ()
#12 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#13 0x000000000050481f in ?? ()
#14 0x00000000004fc182 in PyRun_FileExFlags ()
#15 0x00000000004fb247 in PyRun_SimpleFileExFlags ()
#16 0x000000000049aa6e in Py_Main ()
#17 0x00007ffff7811a40 in __libc_start_main (main=0x49a500 <main>, argc=3, argv=0x7fffffffe488, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffe478) at libc-start.c:289
#18 0x000000000049a429 in _start ()
-------------------------------------------------------------------------------

With libvirt-python 1.2.19 (and without libguestfs), everything works fine.
Comment 13 Cole Robinson 2015-10-27 15:01:34 EDT
Okay, so we're back to trying to figure out which commit broke things.

First, checkout v1.2.19 and verify that building it from git does _not_ hit the crash:

git checkout v1.2.19
[build, install, test]


If as expected that doesn't produce the crash, then do:

git checkout master
git bisect start master v1.2.19

and follow the git bisect instructions I gave above previously. that should hopefully identify the bad commit
Comment 14 jean-christophe manciot 2015-10-29 05:41:22 EDT
git checkout v1.2.19
Virt-manager works fine

git checkout master
Previous HEAD position was 51b841f... examples: small fix for nodestats.py example
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.

git bisect start master v1.2.19
Bisecting: 12 revisions left to test after this (roughly 4 steps)
[61411050cb32864dfe535fce197a31303a067738] Return NULL if python exception is set

Virt-manager works fine

git bisect good
Bisecting: 6 revisions left to test after this (roughly 3 steps)
[cba2a84bc11026437bcc8ab0e3721973bb7bdff8] change the order of some statements
Comment 15 jean-christophe manciot 2015-10-29 05:51:58 EDT
Virt-manager works fine

git bisect good
Bisecting: 3 revisions left to test after this (roughly 2 steps)
[a3f842eea1fc2c158bd5f93ced7b4115e07509c9] utils: introduce new macro helpers for tuple, list and dict objects

Virt-manager works fine

git bisect good
Bisecting: 1 revision left to test after this (roughly 1 step)
[1d39dbaf637db03f6e597ed56b96aa065710b4a1] use VYR_PY_LIST_SET_GOTO and VIR_PY_LIST_APPEND_GOTO

Virt-manager works fine

git bisect good
Bisecting: 0 revisions left to test after this (roughly 0 steps)
[0a9385286a7265a9f1fd2321e037681d7247270b] use VIR_PY_DICT_SET_GOTO

Virt-manager works fine

git bisect good
d5b08f5c19faffca9c3499c5286199859518e361 is the first bad commit
commit d5b08f5c19faffca9c3499c5286199859518e361
Author: Martin Kletzander <mkletzan@redhat.com>
Date:   Thu Oct 15 10:52:38 2015 +0200

    Post-release version bump to 1.2.21
    
    Signed-off-by: Martin Kletzander <mkletzan@redhat.com>

:100755 100755 0afcaa49219b3da16095ac197feced158a15880b 61fa3696d917d2aff8ba339635d3b43758e645dc M	setup.py

Is that it?
Comment 16 jean-christophe manciot 2015-10-29 05:56:49 EDT
git show d5b08f5c19faffca9c3499c5286199859518e361
commit d5b08f5c19faffca9c3499c5286199859518e361
Author: Martin Kletzander <mkletzan@redhat.com>
Date:   Thu Oct 15 10:52:38 2015 +0200

    Post-release version bump to 1.2.21
    
    Signed-off-by: Martin Kletzander <mkletzan@redhat.com>

diff --git a/setup.py b/setup.py
index 0afcaa4..61fa369 100755
--- a/setup.py
+++ b/setup.py
@@ -311,7 +311,7 @@ class my_clean(clean):
 _c_modules, _py_modules = get_module_lists()
 
 setup(name = 'libvirt-python',
-      version = '1.2.20',
+      version = '1.2.21',
       url = 'http://www.libvirt.org',
       maintainer = 'Libvirt Maintainers',
       maintainer_email = 'libvir-list@redhat.com',
Comment 17 Cole Robinson 2015-10-29 12:27:16 EDT
If you checkout master, and build + install it, does it actually reproduce the issue? In comment #12 it sounded like you can reproduce the crash with libvirt-python.git master, but every attempt seemed to succeed with the git bisect...
Comment 18 jean-christophe manciot 2015-10-30 06:06:55 EDT
With latest commit, the issue is still here:
-------------------------------------------------------------------------------
gdb --args python ./virt-manager --debug
GNU gdb (Ubuntu 7.9-1ubuntu1) 7.9
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/python ./virt-manager --debug
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Fri, 30 Oct 2015 11:00:47 virt-manager 10749] DEBUG (cli:246) Launched with command line: ./virt-manager --debug
[Fri, 30 Oct 2015 11:00:47 virt-manager 10749] DEBUG (virt-manager:153) virt-manager version: 1.2.1
[Fri, 30 Oct 2015 11:00:47 virt-manager 10749] DEBUG (virt-manager:154) virtManager import: <module 'virtManager' from '/home/actionmystique/Program-Files/Ubuntu/Virt-manager/virt-manager-1.2.1/virtManager/__init__.pyc'>
[Fri, 30 Oct 2015 11:00:47 virt-manager 10749] DEBUG (virt-manager:213) GTK version: 3.14.13
[Fri, 30 Oct 2015 11:00:47 virt-manager 10749] DEBUG (engine:456) libguestfs inspection support: True
[Fri, 30 Oct 2015 11:00:47 virt-manager 10749] DEBUG (inspection:81) waiting
[New Thread 0x7fffe173d700 (LWP 10764)]
[Fri, 30 Oct 2015 11:00:47 virt-manager 10749] DEBUG (systray:150) Showing systray: True
warning: Corrupted shared library list: 0x11c09a0 != 0xf47da0
[Fri, 30 Oct 2015 11:00:47 virt-manager 10749] DEBUG (engine:228) About to connect to uris ['qemu:///system']
[Fri, 30 Oct 2015 11:00:48 virt-manager 10749] DEBUG (manager:207) Showing manager
[Fri, 30 Oct 2015 11:00:48 virt-manager 10749] DEBUG (engine:357) window counter incremented to 1
[Fri, 30 Oct 2015 11:00:48 virt-manager 10749] DEBUG (connection:536) conn=qemu:///system changed to state=Connecting
[Fri, 30 Oct 2015 11:00:48 virt-manager 10749] DEBUG (connection:846) Scheduling background open thread for qemu:///system
[Fri, 30 Oct 2015 11:00:48 virt-manager 10749] DEBUG (connection:895) libvirt version=1002021
[Fri, 30 Oct 2015 11:00:48 virt-manager 10749] DEBUG (connection:897) daemon version=1002021
[Fri, 30 Oct 2015 11:00:48 virt-manager 10749] DEBUG (connection:898) conn version=2004050
[Fri, 30 Oct 2015 11:00:48 virt-manager 10749] DEBUG (connection:900) qemu:///system capabilities:
<capabilities>

  <host>
    <uuid>00000000-0000-0000-0000-8c89a50e4e89</uuid>
    <cpu>
      <arch>x86_64</arch>
      <model>Westmere</model>
      <vendor>Intel</vendor>
      <topology sockets="1" cores="4" threads="2"/>
      <feature name="invtsc"/>
      <feature name="invpcid"/>
      <feature name="erms"/>
      <feature name="bmi2"/>
      <feature name="smep"/>
      <feature name="avx2"/>
      <feature name="bmi1"/>
      <feature name="fsgsbase"/>
      <feature name="abm"/>
      <feature name="rdtscp"/>
      <feature name="pdpe1gb"/>
      <feature name="rdrand"/>
      <feature name="f16c"/>
      <feature name="avx"/>
      <feature name="osxsave"/>
      <feature name="xsave"/>
      <feature name="tsc-deadline"/>
      <feature name="movbe"/>
      <feature name="pcid"/>
      <feature name="pdcm"/>
      <feature name="xtpr"/>
      <feature name="fma"/>
      <feature name="tm2"/>
      <feature name="est"/>
      <feature name="vmx"/>
      <feature name="ds_cpl"/>
      <feature name="monitor"/>
      <feature name="dtes64"/>
      <feature name="pclmuldq"/>
      <feature name="pbe"/>
      <feature name="tm"/>
      <feature name="ht"/>
      <feature name="ss"/>
      <feature name="acpi"/>
      <feature name="ds"/>
      <feature name="vme"/>
      <pages unit="KiB" size="4"/>
      <pages unit="KiB" size="2048"/>
    </cpu>
    <power_management>
      <suspend_mem/>
      <suspend_disk/>
      <suspend_hybrid/>
    </power_management>
    <migration_features>
      <live/>
      <uri_transports>
        <uri_transport>tcp</uri_transport>
        <uri_transport>rdma</uri_transport>
      </uri_transports>
    </migration_features>
    <topology>
      <cells num="1">
        <cell id="0">
          <memory unit="KiB">16350944</memory>
          <cpus num="8">
            <cpu id="0" socket_id="0" core_id="0" siblings="0"/>
            <cpu id="1" socket_id="0" core_id="0" siblings="1"/>
            <cpu id="2" socket_id="0" core_id="1" siblings="2"/>
            <cpu id="3" socket_id="0" core_id="1" siblings="3"/>
            <cpu id="4" socket_id="0" core_id="2" siblings="4"/>
            <cpu id="5" socket_id="0" core_id="2" siblings="5"/>
            <cpu id="6" socket_id="0" core_id="3" siblings="6"/>
            <cpu id="7" socket_id="0" core_id="3" siblings="7"/>
          </cpus>
        </cell>
      </cells>
    </topology>
    <secmodel>
      <model>none</model>
      <doi>0</doi>
    </secmodel>
    <secmodel>
      <model>dac</model>
      <doi>0</doi>
      <baselabel type="kvm">+0:+0</baselabel>
      <baselabel type="qemu">+0:+0</baselabel>
    </secmodel>
  </host>

  <guest>
    <os_type>hvm</os_type>
    <arch name="i686">
      <wordsize>32</wordsize>
      <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      <machine maxCpus="255">pc-i440fx-2.4</machine>
      <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
      <machine maxCpus="255">pc-1.3</machine>
      <machine maxCpus="255">pc-0.12</machine>
      <machine maxCpus="255">pc-q35-1.6</machine>
      <machine maxCpus="255">pc-q35-1.5</machine>
      <machine maxCpus="255">pc-i440fx-1.6</machine>
      <machine maxCpus="255">pc-q35-2.2</machine>
      <machine maxCpus="255">pc-i440fx-1.7</machine>
      <machine maxCpus="255">pc-q35-2.1</machine>
      <machine maxCpus="255">pc-0.11</machine>
      <machine maxCpus="255">pc-0.10</machine>
      <machine maxCpus="255">pc-i440fx-2.2</machine>
      <machine maxCpus="255">pc-1.2</machine>
      <machine maxCpus="1">isapc</machine>
      <machine maxCpus="255">pc-i440fx-2.3</machine>
      <machine maxCpus="255">pc-q35-1.4</machine>
      <machine maxCpus="255">pc-0.15</machine>
      <machine maxCpus="255">pc-i440fx-1.5</machine>
      <machine maxCpus="255">pc-q35-2.0</machine>
      <machine maxCpus="255">pc-i440fx-1.4</machine>
      <machine maxCpus="255">pc-0.14</machine>
      <machine maxCpus="255">pc-1.1</machine>
      <machine maxCpus="255">pc-i440fx-2.1</machine>
      <machine maxCpus="255">pc-q35-1.7</machine>
      <machine maxCpus="255">pc-1.0</machine>
      <machine maxCpus="255">pc-i440fx-2.0</machine>
      <machine maxCpus="255">pc-q35-2.4</machine>
      <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
      <machine maxCpus="255">pc-q35-2.3</machine>
      <machine maxCpus="255">pc-0.13</machine>
      <domain type="qemu">
        <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      </domain>
      <domain type="kvm">
        <emulator>/usr/bin/kvm</emulator>
        <machine maxCpus="255">pc-i440fx-2.4</machine>
        <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
        <machine maxCpus="255">pc-1.3</machine>
        <machine maxCpus="255">pc-0.12</machine>
        <machine maxCpus="255">pc-q35-1.6</machine>
        <machine maxCpus="255">pc-q35-1.5</machine>
        <machine maxCpus="255">pc-i440fx-1.6</machine>
        <machine maxCpus="255">pc-q35-2.2</machine>
        <machine maxCpus="255">pc-i440fx-1.7</machine>
        <machine maxCpus="255">pc-q35-2.1</machine>
        <machine maxCpus="255">pc-0.11</machine>
        <machine maxCpus="255">pc-0.10</machine>
        <machine maxCpus="255">pc-i440fx-2.2</machine>
        <machine maxCpus="255">pc-1.2</machine>
        <machine maxCpus="1">isapc</machine>
        <machine maxCpus="255">pc-i440fx-2.3</machine>
        <machine maxCpus="255">pc-q35-1.4</machine>
        <machine maxCpus="255">pc-0.15</machine>
        <machine maxCpus="255">pc-i440fx-1.5</machine>
        <machine maxCpus="255">pc-q35-2.0</machine>
        <machine maxCpus="255">pc-i440fx-1.4</machine>
        <machine maxCpus="255">pc-0.14</machine>
        <machine maxCpus="255">pc-1.1</machine>
        <machine maxCpus="255">pc-i440fx-2.1</machine>
        <machine maxCpus="255">pc-q35-1.7</machine>
        <machine maxCpus="255">pc-1.0</machine>
        <machine maxCpus="255">pc-i440fx-2.0</machine>
        <machine maxCpus="255">pc-q35-2.4</machine>
        <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
        <machine maxCpus="255">pc-q35-2.3</machine>
        <machine maxCpus="255">pc-0.13</machine>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <deviceboot/>
      <disksnapshot default="on" toggle="no"/>
      <acpi default="on" toggle="yes"/>
      <apic default="on" toggle="no"/>
      <pae/>
      <nonpae/>
    </features>
  </guest>

  <guest>
    <os_type>hvm</os_type>
    <arch name="x86_64">
      <wordsize>64</wordsize>
      <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      <machine maxCpus="255">pc-i440fx-2.4</machine>
      <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
      <machine maxCpus="255">pc-1.3</machine>
      <machine maxCpus="255">pc-0.12</machine>
      <machine maxCpus="255">pc-q35-1.6</machine>
      <machine maxCpus="255">pc-q35-1.5</machine>
      <machine maxCpus="255">pc-i440fx-1.6</machine>
      <machine maxCpus="255">pc-q35-2.2</machine>
      <machine maxCpus="255">pc-i440fx-1.7</machine>
      <machine maxCpus="255">pc-q35-2.1</machine>
      <machine maxCpus="255">pc-0.11</machine>
      <machine maxCpus="255">pc-0.10</machine>
      <machine maxCpus="255">pc-i440fx-2.2</machine>
      <machine maxCpus="255">pc-1.2</machine>
      <machine maxCpus="1">isapc</machine>
      <machine maxCpus="255">pc-i440fx-2.3</machine>
      <machine maxCpus="255">pc-q35-1.4</machine>
      <machine maxCpus="255">pc-0.15</machine>
      <machine maxCpus="255">pc-i440fx-1.5</machine>
      <machine maxCpus="255">pc-q35-2.0</machine>
      <machine maxCpus="255">pc-i440fx-1.4</machine>
      <machine maxCpus="255">pc-0.14</machine>
      <machine maxCpus="255">pc-1.1</machine>
      <machine maxCpus="255">pc-i440fx-2.1</machine>
      <machine maxCpus="255">pc-q35-1.7</machine>
      <machine maxCpus="255">pc-1.0</machine>
      <machine maxCpus="255">pc-i440fx-2.0</machine>
      <machine maxCpus="255">pc-q35-2.4</machine>
      <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
      <machine maxCpus="255">pc-q35-2.3</machine>
      <machine maxCpus="255">pc-0.13</machine>
      <domain type="qemu">
        <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      </domain>
      <domain type="kvm">
        <emulator>/usr/bin/kvm</emulator>
        <machine maxCpus="255">pc-i440fx-2.4</machine>
        <machine canonical="pc-i440fx-2.4" maxCpus="255">pc</machine>
        <machine maxCpus="255">pc-1.3</machine>
        <machine maxCpus="255">pc-0.12</machine>
        <machine maxCpus="255">pc-q35-1.6</machine>
        <machine maxCpus="255">pc-q35-1.5</machine>
        <machine maxCpus="255">pc-i440fx-1.6</machine>
        <machine maxCpus="255">pc-q35-2.2</machine>
        <machine maxCpus="255">pc-i440fx-1.7</machine>
        <machine maxCpus="255">pc-q35-2.1</machine>
        <machine maxCpus="255">pc-0.11</machine>
        <machine maxCpus="255">pc-0.10</machine>
        <machine maxCpus="255">pc-i440fx-2.2</machine>
        <machine maxCpus="255">pc-1.2</machine>
        <machine maxCpus="1">isapc</machine>
        <machine maxCpus="255">pc-i440fx-2.3</machine>
        <machine maxCpus="255">pc-q35-1.4</machine>
        <machine maxCpus="255">pc-0.15</machine>
        <machine maxCpus="255">pc-i440fx-1.5</machine>
        <machine maxCpus="255">pc-q35-2.0</machine>
        <machine maxCpus="255">pc-i440fx-1.4</machine>
        <machine maxCpus="255">pc-0.14</machine>
        <machine maxCpus="255">pc-1.1</machine>
        <machine maxCpus="255">pc-i440fx-2.1</machine>
        <machine maxCpus="255">pc-q35-1.7</machine>
        <machine maxCpus="255">pc-1.0</machine>
        <machine maxCpus="255">pc-i440fx-2.0</machine>
        <machine maxCpus="255">pc-q35-2.4</machine>
        <machine canonical="pc-q35-2.4" maxCpus="255">q35</machine>
        <machine maxCpus="255">pc-q35-2.3</machine>
        <machine maxCpus="255">pc-0.13</machine>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <deviceboot/>
      <disksnapshot default="on" toggle="no"/>
      <acpi default="on" toggle="yes"/>
      <apic default="on" toggle="no"/>
    </features>
  </guest>

</capabilities>

[Fri, 30 Oct 2015 11:00:48 virt-manager 10749] DEBUG (connection:755) Using domain events
[Fri, 30 Oct 2015 11:00:48 virt-manager 10749] DEBUG (connection:792) Using network events
[New Thread 0x7fffdaffd700 (LWP 10768)]
[New Thread 0x7fffd99c0700 (LWP 10770)]
[New Thread 0x7fffda1c1700 (LWP 10769)]
[New Thread 0x7fffdb7fe700 (LWP 10767)]
[New Thread 0x7fffdbfff700 (LWP 10766)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdaffd700 (LWP 10768)]
0x00007ffff43b1f28 in virClassIsDerivedFrom () from /usr/lib/libvirt.so.0
(gdb) thread apply all bt

Thread 7 (Thread 0x7fffdbfff700 (LWP 10766)):
#0  0x00007ffff78ec8dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff60ddebc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff60de242 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff59e7af6 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007ffff6104955 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff7bc26aa in start_thread (arg=0x7fffdbfff700) at pthread_create.c:333
#6  0x00007ffff78f7eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 6 (Thread 0x7fffdb7fe700 (LWP 10767)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007ffff6122a0a in g_cond_wait_until () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff60b2889 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff61052c0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ffff6104955 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff7bc26aa in start_thread (arg=0x7fffdb7fe700) at pthread_create.c:333
#6  0x00007ffff78f7eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 5 (Thread 0x7fffda1c1700 (LWP 10769)):
#0  0x00007ffff7bca0c9 in futex_abstimed_wait (cancel=true, private=<optimized out>, abstime=0x0, expected=0, futex=0x7fffc4002be0)
    at sem_waitcommon.c:42
#1  do_futex_wait (sem=sem@entry=0x7fffc4002be0, abstime=0x0) at sem_waitcommon.c:208
#2  0x00007ffff7bca164 in __new_sem_wait_slow (sem=0x7fffc4002be0, abstime=0x0) at sem_waitcommon.c:277
#3  0x00007ffff7bca20a in __new_sem_wait (sem=<optimized out>) at sem_wait.c:28
#4  0x0000000000583500 in ?? ()
#5  0x00000000004ccd05 in PyEval_EvalFrameEx ()
#6  0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#7  0x00000000004cd217 in PyEval_EvalFrameEx ()
#8  0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#9  0x00000000004cd217 in PyEval_EvalFrameEx ()
#10 0x00000000004e7cc8 in ?? ()
#11 0x00000000004cf239 in PyEval_EvalFrameEx ()
#12 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#13 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#14 0x00000000004e7cc8 in ?? ()
#15 0x000000000050b968 in ?? ()
#16 0x00000000004d437b in PyEval_CallObjectWithKeywords ()
#17 0x00000000005bdcd2 in ?? ()
#18 0x00007ffff7bc26aa in start_thread (arg=0x7fffda1c1700) at pthread_create.c:333
#19 0x00007ffff78f7eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7fffd99c0700 (LWP 10770)):
#0  0x00007ffff7bca0c9 in futex_abstimed_wait (cancel=true, private=<optimized out>, abstime=0x0, expected=0, futex=0x7fffc82c50c0)
    at sem_waitcommon.c:42
#1  do_futex_wait (sem=sem@entry=0x7fffc82c50c0, abstime=0x0) at sem_waitcommon.c:208
---Type <return> to continue, or q <return> to quit--- 
#2  0x00007ffff7bca164 in __new_sem_wait_slow (sem=0x7fffc82c50c0, abstime=0x0) at sem_waitcommon.c:277
#3  0x00007ffff7bca20a in __new_sem_wait (sem=<optimized out>) at sem_wait.c:28
#4  0x0000000000583500 in ?? ()
#5  0x00000000004ccd05 in PyEval_EvalFrameEx ()
#6  0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#7  0x00000000004cd217 in PyEval_EvalFrameEx ()
#8  0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#9  0x00000000004cd217 in PyEval_EvalFrameEx ()
#10 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#11 0x00000000004e7cc8 in ?? ()
#12 0x00000000004cf239 in PyEval_EvalFrameEx ()
#13 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#14 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#15 0x00000000004e7cc8 in ?? ()
#16 0x000000000050b968 in ?? ()
#17 0x00000000004d437b in PyEval_CallObjectWithKeywords ()
#18 0x00000000005bdcd2 in ?? ()
#19 0x00007ffff7bc26aa in start_thread (arg=0x7fffd99c0700) at pthread_create.c:333
#20 0x00007ffff78f7eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7fffdaffd700 (LWP 10768)):
#0  0x00007ffff43b1f28 in virClassIsDerivedFrom () from /usr/lib/libvirt.so.0
#1  0x00007ffff447daaf in virNetworkFree () from /usr/lib/libvirt.so.0
#2  0x00007ffff48b3970 in libvirt_virNetworkFree () from /usr/local/lib/python2.7/dist-packages/libvirtmod.so
#3  0x00000000004ccd05 in PyEval_EvalFrameEx ()
#4  0x00000000004e7cc8 in ?? ()
#5  0x000000000050b968 in ?? ()
#6  0x0000000000570134 in ?? ()
#7  0x0000000000514eb8 in ?? ()
#8  0x00000000004a75e5 in ?? ()
#9  0x00000000004cd0c6 in PyEval_EvalFrameEx ()
#10 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#11 0x00000000004cd217 in PyEval_EvalFrameEx ()
#12 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#13 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#14 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#15 0x00000000004cd217 in PyEval_EvalFrameEx ()
#16 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#17 0x00000000004cd217 in PyEval_EvalFrameEx ()
#18 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#19 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#20 0x00000000004ce7d3 in PyEval_EvalFrameEx ()
#21 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#22 0x00000000004ce7d3 in PyEval_EvalFrameEx ()
#23 0x00000000004e7cc8 in ?? ()
#24 0x00000000004cf239 in PyEval_EvalFrameEx ()
---Type <return> to continue, or q <return> to quit---
#25 0x00000000004e7cc8 in ?? ()
#26 0x00000000004cf239 in PyEval_EvalFrameEx ()
#27 0x00000000004e7cc8 in ?? ()
#28 0x00000000004cf239 in PyEval_EvalFrameEx ()
#29 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#30 0x00000000004cd4e2 in PyEval_EvalFrameEx ()
#31 0x00000000004e7cc8 in ?? ()
#32 0x000000000050b968 in ?? ()
#33 0x00000000004d437b in PyEval_CallObjectWithKeywords ()
#34 0x00000000005bdcd2 in ?? ()
#35 0x00007ffff7bc26aa in start_thread (arg=0x7fffdaffd700) at pthread_create.c:333
#36 0x00007ffff78f7eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7fffe173d700 (LWP 10764)):
#0  0x00007ffff78ec8dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff60ddebc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff60ddfcc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fffe3c0a27d in ?? () from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#4  0x00007ffff6104955 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff7bc26aa in start_thread (arg=0x7fffe173d700) at pthread_create.c:333
#6  0x00007ffff78f7eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7ffff7fcb700 (LWP 10749)):
#0  0x00007ffff78ec8dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ffff60ddebc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff60ddfcc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff59b167c in g_application_run () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007ffff5e91d90 in ffi_call_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#5  0x00007ffff5e917f8 in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#6  0x00007ffff68556a4 in ?? () from /usr/lib/python2.7/dist-packages/gi/_gi.so
#7  0x00007ffff6856fd8 in ?? () from /usr/lib/python2.7/dist-packages/gi/_gi.so
#8  0x00007ffff684b49e in ?? () from /usr/lib/python2.7/dist-packages/gi/_gi.so
#9  0x00000000004cd9ab in PyEval_EvalFrameEx ()
#10 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#11 0x00000000004ce7d3 in PyEval_EvalFrameEx ()
#12 0x00000000004cb6b1 in PyEval_EvalCodeEx ()
#13 0x000000000050481f in ?? ()
#14 0x00000000004fc182 in PyRun_FileExFlags ()
#15 0x00000000004fb247 in PyRun_SimpleFileExFlags ()
#16 0x000000000049aa6e in Py_Main ()
#17 0x00007ffff7811a40 in __libc_start_main (main=0x49a500 <main>, argc=3, argv=0x7fffffffe488, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffe478) at libc-start.c:289
-------------------------------------------------------------------------------

Is it possible that Libvirt-Python 1.2.19 does not use virNetworkFree?
If that's the case, libvirt-python 1.2.20 would just be a trigger to an issue actually residing within libvirt.
Comment 19 Cole Robinson 2015-10-30 09:51:47 EDT
No, there isn't any obvious issue that I can see in the code.

And this isn't specific to 1.2.20, since you said when performing the git bisect above the commit 0a9385286a7265a9f1fd2321e037681d7247270b worked fine... that commit _is_ v1.2.20... so I really can't tell what's going on.

Were you using the same steps to test and install the library when doing the git bisect, as you just did to check git master?
Is it possible you have some stale files somewhere in /usr/local/lib for an older libvirt-python install, like you had issues with virt-manager at one point?
Comment 20 jean-christophe manciot 2015-10-30 10:48:33 EDT
Since we have used the version 1.2.20 loosely in previous posts & to be perfectly clear, 
- libvirt-python checkout v1.2.20 (1d7df3c97cfdbb22de9335976e4ac334b8e83356) does not crash virt-manager; 
- libvirt-python checkout master (0a9385286a7265a9f1fd2321e037681d7247270b) does (I've modified the title of this thread accordingly).

To answer your questions, I used the same building process & tests for all posts. 

root@msi-ge60-ubuntu:/usr/local/lib/python2.7/dist-packages# ls -al libvirt*
-rw-r--r-- 1 root root   1321 Oct 30 11:59 libvirt_lxc.py
-rw-r--r-- 1 root root   1161 Oct 30 11:59 libvirt_lxc.pyc
-rwxr-xr-x 1 root root  18760 Oct 30 11:59 libvirtmod_lxc.so
-rwxr-xr-x 1 root root  23112 Oct 30 11:59 libvirtmod_qemu.so
-rwxr-xr-x 1 root root 280232 Oct 30 11:59 libvirtmod.so
-rw-r--r-- 1 root root 299333 Oct 30 11:59 libvirt.py
-rw-r--r-- 1 root root 333363 Oct 30 11:59 libvirt.pyc
-rw-r--r-- 1 root root    588 Oct 30 11:59 libvirt_python-1.2.20.egg-info
-rw-r--r-- 1 root root   4831 Oct 30 11:59 libvirt_qemu.py
-rw-r--r-- 1 root root   4933 Oct 30 11:59 libvirt_qemu.pyc

It may or may not be important to note that libvirt libraries are all installed in /usr/lib and not /usr/local/lib.
Comment 21 Cole Robinson 2015-10-30 10:57:24 EDT
Okay, thanks for the info. It's still a bit confusing that 0a9385286a7265a9f1fd2321e037681d7247270b crashes, since the bisect results you posted in comment #15 said it wasn't the culprit...

So we are back to trying to identify the commit that actually broke things. Can you step through this list of commits from top to bottom to identify the one that broke things?

$ git log --oneline 1d7df3c97cfdbb22de9335976e4ac334b8e83356..master | tac
b822286 update virDomainGetVcpus xml API description
448295e refactor the function to not override python exceptions
adeeda2 remove useless check for NULL before Py_XDECREF
46b9507 drop unnecessary goto
a7d71b7 Move utils and shared code into libvirt-utils
862a94a cleanup functions definition
c982604 indent labels by one space
7178a63 fix indentation
5c74e41 wrap lines to 80 columns
6141105 Return NULL if python exception is set
b3449dd Return correct python object
29b0c4d Return NULL and set an exception if allocation fails
b9314f1 Use VIR_PY_NONE instead of increment and Py_None
62ad6ff use Py_CLEAR instead of Py_XDECREF followed by NULL assignment
8af1c9c Must check return value for all Py*_New functions
cba2a84 change the order of some statements
3995ec8 drop unnecessary py_retval variable
706c9db improve usage of cleanup paths
a3f842e utils: introduce new macro helpers for tuple, list and dict objects
827ed9b use VIR_PY_TUPLE_GOTO
1d39dba use VYR_PY_LIST_SET_GOTO and VIR_PY_LIST_APPEND_GOTO
0a93852 use VIR_PY_DICT_SET_GOTO
Comment 22 jean-christophe manciot 2015-10-30 11:07:39 EDT
That's what I've just been doing from v1.2.20 to the top, and we have a winner:
1d39dbaf637db03f6e597ed56b96aa065710b4a1

- git checkout 827ed9b4f14f7b0d18820be0cbbecf44c5bbd0d7: virt-manager works fine
- git checkout 1d39dbaf637db03f6e597ed56b96aa065710b4a1: virt-manager crashes

I'm glad we finally nailed it ;)
Comment 23 Cole Robinson 2015-10-30 12:12:14 EDT
Thanks! So that commit is:

commit 1d39dbaf637db03f6e597ed56b96aa065710b4a1
Author: Pavel Hrdina <phrdina@redhat.com>
Date:   Mon Oct 5 09:42:23 2015 +0200

    use VYR_PY_LIST_SET_GOTO and VIR_PY_LIST_APPEND_GOTO


Pavel, any thoughts?
Comment 24 Pavel Hrdina 2015-10-31 05:57:10 EDT
Hi, good detective work here, that patch really causes the crash and somehow we've missed that during review.

Upstream commit, that fixes this bug:

commit 13375783f09285aeb386bc4c306aa4df3816b2f0
Author: Pavel Hrdina <phrdina@redhat.com>
Date:   Sat Oct 31 02:25:22 2015 +0100

    fix crash introduced by commit 1d39dbaf
    
    Some of the libvirt_*Wrap functions steals the reference and we need to
    set the item in array to NULL no not free it on success.  Those three
    places was accidentally removed by commit 1d39dbaf.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1270977
    
    Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Comment 25 Cole Robinson 2015-10-31 20:04:11 EDT
Thanks Pavel! Not sure why I couldn't reproduce locally, but glad it's fixed

Note You need to log in before you can comment on or make changes to this bug.