<div dir="ltr">The debug log ends with this:<br><br><br>2013-07-12 16:43:31.740+0000: 21365: debug : virCgroupMakeGroup:708 : Make group /machine/dwj-hfax-dev.libvirt-lxc<br>2013-07-12 16:43:31.740+0000: 21365: debug : virCgroupMakeGroup:729 : Make controller /sys/fs/cgroup/cpu/machine/dwj-hfax-dev.libvirt-lxc/<br>
2013-07-12 16:43:31.740+0000: 21365: debug : virCgroupMakeGroup:729 : Make controller /sys/fs/cgroup/cpuacct/machine/dwj-hfax-dev.libvirt-lxc/<br>2013-07-12 16:43:31.740+0000: 21365: debug : virCgroupMakeGroup:729 : Make controller /sys/fs/cgroup/cpuset/machine/dwj-hfax-dev.libvirt-lxc/<br>
2013-07-12 16:43:31.740+0000: 21365: debug : virCgroupMakeGroup:729 : Make controller /sys/fs/cgroup/memory/machine/dwj-hfax-dev.libvirt-lxc/<br>2013-07-12 16:43:31.740+0000: 21365: debug : virCgroupMakeGroup:729 : Make controller /sys/fs/cgroup/devices/machine/dwj-hfax-dev.libvirt-lxc/<br>
2013-07-12 16:43:31.740+0000: 21365: debug : virCgroupMakeGroup:729 : Make controller /sys/fs/cgroup/freezer/machine/dwj-hfax-dev.libvirt-lxc/<br>2013-07-12 16:43:31.740+0000: 21365: debug : virCgroupMakeGroup:729 : Make controller /sys/fs/cgroup/blkio/machine/dwj-hfax-dev.libvirt-lxc/<br>
2013-07-12 16:43:31.740+0000: 21365: debug : virCgroupMakeGroup:715 : Skipping unmounted controller net_cls<br>2013-07-12 16:43:31.740+0000: 21365: debug : virCgroupMakeGroup:729 : Make controller /sys/fs/cgroup/perf_event/machine/dwj-hfax-dev.libvirt-lxc/<br>
2013-07-12 16:43:31.740+0000: 21365: debug : virCgroupMakeGroup:779 : Done making controllers for group<br>2013-07-12 16:43:31.740+0000: 21365: debug : virFileMakePathHelper:1995 : path=/var/log/libvirt/lxc mode=0777<br>2013-07-12 16:43:31.740+0000: 21365: debug : virLXCProcessStart:1096 : Setting current domain def as transient<br>
2013-07-12 16:43:31.741+0000: 21365: debug : virLXCProcessStart:1121 : Preparing host devices<br>2013-07-12 16:43:31.741+0000: 21365: debug : virLXCProcessStart:1139 : Generating domain security label (if required)<br><br>
<br>     ====== end of log =====<br><br>Segmentation fault (core dumped)<br><br><br><br>(gdb) bt<br>#0  0x00007fe4750c5d76 in __strcmp_sse42 () from /lib64/libc.so.6<br>#1  0x00007fe47578ad31 in virSecurityManagerGenLabel () from /usr/lib64/libvirt.so.0<br>
#2  0x00007fe46aa92979 in virLXCProcessStart () from /usr/lib64/libvirt/connection-driver/libvirt_driver_lxc.so<br>#3  0x00007fe46aa9736e in lxcDomainCreateWithFlags () from /usr/lib64/libvirt/connection-driver/libvirt_driver_lxc.so<br>
#4  0x00007fe47569c067 in virDomainCreate () from /usr/lib64/libvirt.so.0<br>#5  0x00007fe4760d5578 in remoteDispatchDomainCreateHelper ()<br>#6  0x00007fe4756fcd78 in virNetServerProgramDispatch () from /usr/lib64/libvirt.so.0<br>
#7  0x00007fe4756f7302 in virNetServerProcessMsg () from /usr/lib64/libvirt.so.0<br>#8  0x00007fe4756f7a93 in virNetServerHandleJob () from /usr/lib64/libvirt.so.0<br>#9  0x00007fe47560f95e in virThreadPoolWorker () from /usr/lib64/libvirt.so.0<br>
#10 0x00007fe47560efc6 in virThreadHelper () from /usr/lib64/libvirt.so.0<br>#11 0x00007fe475354da6 in start_thread () from /lib64/libpthread.so.0<br>#12 0x00007fe47508d99d in clone () from /lib64/libc.so.6<br>(gdb)<br><br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 12, 2013 at 11:40 AM, Dennis Jenkins <span dir="ltr"><<a href="mailto:dennis.jenkins.75@gmail.com" target="_blank">dennis.jenkins.75@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello all,<br><br>    I have two issues:<br><br>1) I am unable to start a seemingly correct LXC domain (I cloned it from a working domain).<br>
<br>2) I am able to crash "libvirtd" by attempting to start the cloned domain, but starting the original works just fine.<br>
<br>    I humbly submit that item #2 is a bug - the "libvirtd" daemon should never crash due to anything the "libvirt" client throws at it.  As for item  #1, I'm not sure where I went wrong.  A full walk-through is below (ending with a DIFF of the XML from the two domains).<br>

<br>    I created by original domain ("dwj-lnx-dev") a long time ago.  Today I created the new domain ("dwj-hfax-dev") as follows:<br><br>1) Shutdown "dwj-lnx-dev"<br>2) Clone the root file system: "cd /vm/lxc/; cp -a dwj-lnx-dev dwj-hfax-dev"  (2.5GB, ~5 min)<br>

3) "libvirt -c lxc:/// dumpxml dwj-lnx-dev > a.xml"<br>4) ${EDITOR} a.xml<br>  a) changed MAC address, name, memory, source directory for "/"<br>5) "libvirt -c lxc:/// define a.xml"<br>6) Edit "/etc/bind/pri/*" and "/etc/dhcp/dhcpd.conf" on my host.<br>

<br><br>    It does not matter is "dwj-lnx-dev" is running or not.  Any attempt to start "dwj-hfax-dev" will crash libvirtd.<br><br><br>    In the past I was asked to turn on some debugging and capture a detailed log (<a href="https://www.redhat.com/archives/libvirt-users/2013-May/msg00076.html" target="_blank">https://www.redhat.com/archives/libvirt-users/2013-May/msg00076.html</a>).  I will do this soon and post my results as a follow up.<br>

<br><br><br>ostara ~ # uname -a<br>Linux ostara 3.8.13-gentoo #1 SMP PREEMPT Mon Jun 3 17:10:56 CDT 2013 x86_64 Intel(R) Core(TM) i5 CPU 760 @ 2.80GHz GenuineIntel GNU/Linux<br><br><br>ostara ~ # equery l libvirt<br> * Searching for libvirt ...<br>

[IP-] [  ] app-emulation/libvirt-1.1.0-r1:0<br><br><br>ostara ~ # virsh -c lxc:/// version<br>Compiled against library: libvirt 1.1.0<br>Using library: libvirt 1.1.0<br>Using API: LXC 1.1.0<br>Running hypervisor: LXC 3.8.13<br>

<br><br>ostara ~ # /etc/init.d/libvirtd restart<br> * Caching service dependencies ...                                                                                            [ ok ]<br> * Stopping libvirtd ...<br> *  Shutting down network(s):<br>

 *    default                                                                                                                  [ ok ]<br> * Starting libvirtd ...                                                                                                       [ ok ]<br>

<br><br>ostara ~ # virsh -c lxc:/// list --all<br> Id    Name                           State<br>----------------------------------------------------<br> -     dwj-hfax-dev                   shut off<br> -     dwj-lnx-dev                    shut off<br>

 -     vm1                            shut off<br><br>ostara ~ # virsh -c lxc:/// start dwj-lnx-dev<br>Domain dwj-lnx-dev started<br><br><br>ostara ~ # virsh -c lxc:/// list --all<br> Id    Name                           State<br>

----------------------------------------------------<br> 9441  dwj-lnx-dev                    running<br> -     dwj-hfax-dev                   shut off<br> -     vm1                            shut off<br><br><br>ostara ~ # virsh -c lxc:/// start dwj-hfax-dev<br>

error: Failed to start domain dwj-hfax-dev<br>error: End of file while reading data: Input/output error<br>error: One or more references were leaked after disconnect from the hypervisor<br>error: Failed to reconnect to the hypervisor<br>

<br><br>ostara ~ # virsh -c lxc:/// list --all<br>error: failed to connect to the hypervisor<br>error: no valid connection<br>error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Connection refused<br>

<br><br>ostara ~ # ls -l /var/run/libvirt/libvirt-sock<br>srwx------ 1 root root 0 Jul 12 11:21 /var/run/libvirt/libvirt-sock<br><br><br>ostara ~ # ps axfw | grep libvirt<br> 9997 pts/2    S+     0:00                      \_ grep --colour=auto libvirt<br>

 8446 ?        S      0:00 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf<br> 9441 ?        Ss     0:00 /usr/libexec/libvirt_lxc --name dwj-lnx-dev --console 19 --security=none --handshake 23 --background --veth veth1<br>

<br><br>ostara ~ # /etc/init.d/libvirtd restart<br> * Stopping libvirtd ...<br> * start-stop-daemon: no matching processes found                                                                              [ ok ]<br> * Starting libvirtd ...                                                                                                       [ ok ]<br>

<br><br>ostara ~ # ps axfw | grep libvirt<br>10130 pts/2    S+     0:00                      \_ grep --colour=auto libvirt<br> 8446 ?        S      0:00 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf<br>

 9441 ?        Ss     0:00 /usr/libexec/libvirt_lxc --name dwj-lnx-dev --console 19 --security=none --handshake 23 --background --veth veth1<br>10033 ?        Sl     0:00 /usr/sbin/libvirtd -d --listen<br><br><br>ostara ~ # virsh -c lxc:/// list --all<br>

 Id    Name                           State<br>----------------------------------------------------<br> 9441  dwj-lnx-dev                    running<br> -     dwj-hfax-dev                   shut off<br> -     vm1                            shut off<br>

<br><br>ostara ~ # virsh -c lxc:/// dumpxml dwj-hfax-dev<br><domain type='lxc'><br>  <name>dwj-hfax-dev</name><br>  <uuid>681410de-7b56-41bd-b38d-3c66ce97e7b3</uuid><br>  <memory unit='KiB'>4194304</memory><br>

  <currentMemory unit='KiB'>4194304</currentMemory><br>  <vcpu placement='static'>4</vcpu><br>  <resource><br>    <partition>/machine</partition><br>  </resource><br>

  <os><br>    <type arch='x86_64'>exe</type><br>    <init>/sbin/init</init><br>  </os><br>  <clock offset='utc'/><br>  <on_poweroff>destroy</on_poweroff><br>

  <on_reboot>restart</on_reboot><br>  <on_crash>destroy</on_crash><br>  <devices><br>    <emulator>/usr/libexec/libvirt_lxc</emulator><br>    <filesystem type='mount' accessmode='passthrough'><br>

      <source dir='/vm/lxc/dwj-hfax-dev'/><br>      <target dir='/'/><br>    </filesystem><br>    <filesystem type='mount' accessmode='passthrough'><br>      <source dir='/usr/portage'/><br>

      <target dir='/usr/portage'/><br>    </filesystem><br>    <filesystem type='mount' accessmode='passthrough'><br>      <source dir='/usr/src'/><br>      <target dir='/usr/src'/><br>

    </filesystem><br>    <filesystem type='mount' accessmode='passthrough'><br>      <source dir='/home'/><br>      <target dir='/home'/><br>    </filesystem><br>

    <interface type='bridge'><br>      <mac address='82:00:00:00:01:01'/><br>      <source bridge='br0'/><br>      <target dev='veth0'/><br>    </interface><br>

    <console type='pty'><br>      <target type='lxc' port='0'/><br>    </console><br>  </devices><br>  <seclabel type='none'/><br></domain><br><br><br>ostara ~ # virsh -c lxc:/// dumpxml dwj-lnx-dev<br>

<domain type='lxc' id='9441'><br>  <name>dwj-lnx-dev</name><br>  <uuid>fbcd8c3a-9939-12b4-727d-5d3526bc448f</uuid><br>  <memory unit='KiB'>500000</memory><br>

  <currentMemory unit='KiB'>500000</currentMemory><br>  <vcpu placement='static'>2</vcpu><br>  <resource><br>    <partition>/machine</partition><br>  </resource><br>

  <os><br>    <type arch='x86_64'>exe</type><br>    <init>/sbin/init</init><br>  </os><br>  <clock offset='utc'/><br>  <on_poweroff>destroy</on_poweroff><br>

  <on_reboot>restart</on_reboot><br>  <on_crash>destroy</on_crash><br>  <devices><br>    <emulator>/usr/libexec/libvirt_lxc</emulator><br>    <filesystem type='mount' accessmode='passthrough'><br>

      <source dir='/vm/lxc/dwj-lnx-dev'/><br>      <target dir='/'/><br>    </filesystem><br>    <filesystem type='mount' accessmode='passthrough'><br>      <source dir='/usr/portage'/><br>

      <target dir='/usr/portage'/><br>    </filesystem><br>    <filesystem type='mount' accessmode='passthrough'><br>      <source dir='/usr/src'/><br>      <target dir='/usr/src'/><br>

    </filesystem><br>    <filesystem type='mount' accessmode='passthrough'><br>      <source dir='/home'/><br>      <target dir='/home'/><br>    </filesystem><br>

    <interface type='bridge'><br>      <mac address='82:00:00:00:01:00'/><br>      <source bridge='br0'/><br>      <target dev='veth0'/><br>    </interface><br>

    <console type='pty' tty='/dev/pts/3'><br>      <source path='/dev/pts/3'/><br>      <target type='lxc' port='0'/><br>      <alias name='console0'/><br>

    </console><br>  </devices><br>  <seclabel type='none'/><br></domain><br><br><br>ostara ~ # virsh -c lxc:/// dumpxml dwj-lnx-dev > lnx.xml<br><br><br>ostara ~ # virsh -c lxc:/// dumpxml dwj-hfax-dev > hfax.xml<br>

<br><br>ostara ~ # diff lnx.xml hfax.xml<br>1,6c1,6<br>< <domain type='lxc' id='9441'><br><   <name>dwj-lnx-dev</name><br><   <uuid>fbcd8c3a-9939-12b4-727d-5d3526bc448f</uuid><br>

<   <memory unit='KiB'>500000</memory><br><   <currentMemory unit='KiB'>500000</currentMemory><br><   <vcpu placement='static'>2</vcpu><br>---<br>> <domain type='lxc'><br>

>   <name>dwj-hfax-dev</name><br>>   <uuid>681410de-7b56-41bd-b38d-3c66ce97e7b3</uuid><br>>   <memory unit='KiB'>4194304</memory><br>>   <currentMemory unit='KiB'>4194304</currentMemory><br>

>   <vcpu placement='static'>4</vcpu><br>21c21<br><       <source dir='/vm/lxc/dwj-lnx-dev'/><br>---<br>>       <source dir='/vm/lxc/dwj-hfax-dev'/><br>37c37<br><       <mac address='82:00:00:00:01:00'/><br>

---<br>>       <mac address='82:00:00:00:01:01'/><br>41,42c41<br><     <console type='pty' tty='/dev/pts/3'><br><       <source path='/dev/pts/3'/><br>---<br>>     <console type='pty'><br>

44d42<br><       <alias name='console0'/><br><br><br>(After reseting everything, and attempting to boot hfax with dev offline, libvirtd still crashes)<br><br>ostara ~ # virsh -c lxc:/// list --all<br> Id    Name                           State<br>

----------------------------------------------------<br> -     dwj-hfax-dev                   shut off<br> -     dwj-lnx-dev                    shut off<br> -     vm1                            shut off<br><br><br><br>ostara ~ # virsh -c lxc:/// start dwj-hfax-dev<br>

error: Failed to start domain dwj-hfax-dev<br>error: End of file while reading data: Input/output error<br>error: One or more references were leaked after disconnect from the hypervisor<br>error: Failed to reconnect to the hypervisor<br>

<br></div>
</blockquote></div><br></div>