Hi Daniel, <br><br><div class="gmail_quote">On Sun, Dec 21, 2008 at 6:15 PM, Daniel P. Berrange <span dir="ltr"><<a href="mailto:berrange@redhat.com">berrange@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">><br>
> However, I still have the crash in the dmesg output, as before, errors like:<br>
><br>
><br>
><br>
> sysfs: duplicate filename '0' can not be<br>
> created<br>
><br>
> ------------[ cut here<br>
> -------------<br>
><br>
> WARNING: at fs/sysfs/dir.c:424 sysfs_add_one+0x34/0xa6()<br>
> ...<br>
> Pid: 2616, comm: libvirtd Tainted: P         2.6.25.20-113 #1<br>
> ...<br>
> *kobject_add_internal failed for 0 with -EEXIST, don't try to register<br>
</div></div>> things with the same name in the same directory.*<br>
<br>
Any of these messages in the dmesg output are kernel problems, not<br>
libvirt problems. The process listing you show about indicates that<br>
libvirtd itself is running, and has not crashed.<br>
<div><div></div><div class="Wj3C7c"><br>
Daniel</div></div></blockquote></div><br>Using eclipse and gdb, I've traced the problem until this line in source code. Source code filename lxc_container.c, line 654, this function:<br><br><div style="margin-left: 40px;">
cpid = clone(lxcContainerDummyChild, childStack, flags, NULL);<br></div><br>is crashing something inside my kernel, which results in the messages that I've sent previously in this thread. Sometimes, the crash occurs even though the "cpid" value is 0, and in the second turn (libvirtd continues to run despite the crashing messages), cpid value returns -1 and system gives debug message mentioned in this function: <br>
<br><div style="margin-left: 40px;">"DEBUG("clone call returned %s, container support is not enabled",<br></div><div style="margin-left: 40px;">              strerror(errno));"<br></div><br>The full  function causing the error, with the exact line in "<b>bold</b> <b>font</b>" is:<br>
<br><div style="margin-left: 40px;">int lxcContainerAvailable(int features)<br>{<br>    int flags = CLONE_NEWPID|CLONE_NEWNS|CLONE_NEWUTS|CLONE_NEWUSER|<br>        CLONE_NEWIPC|SIGCHLD;<br>    int cpid;<br>    char *childStack;<br>
    char *stack;<br>    int childStatus;<br><br>    if (features & LXC_CONTAINER_FEATURE_NET)<br>        flags |= CLONE_NEWNET;<br><br>    if (VIR_ALLOC_N(stack, getpagesize() * 4) < 0) {<br>        DEBUG0("Unable to allocate stack");<br>
        return -1;<br>    }<br><br>    childStack = stack + (getpagesize() * 4);<br><b><br>    cpid = clone(lxcContainerDummyChild, childStack, flags, NULL);</b><br>    VIR_FREE(stack);<br>    if (cpid < 0) {<br>        DEBUG("clone call returned %s, container support is not enabled",<br>
              strerror(errno));<br>        return -1;<br>    } else {<br>        waitpid(cpid, &childStatus, 0);<br>    }<br><br>    return 0;<br>}<br></div><br>I appreciate any clues on why this could happen, and what shall I change in the host kernel to prevent it from happening?<br>
<br>Thank you very very much.<br><br>Emre<br>