<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 15, 2013 at 7:37 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Ah ha!  I just learned about "gdb bt full".  The existing core dump might have what you need: Line #442.  However, the line numbers for the source code in the source tree that my Gentoo system is building from does not match exactly what you listed.<br>

<br></div><div>Line #442 for me is the one containing the "STREQ" macro:<br><br>    virObjectLock(mgr);<div class="im"><br>    for (i = 0; i < vm->nseclabels; i++) {<br></div><div class="im">        for (j = 0; sec_managers[j]; j++)<br>
</div><div class="im">            if (STREQ(vm->seclabels[i]->model, sec_managers[j]->drv->name))<br></div>
                break;<br><br></div><div><br></div><div>I can rebuild with "-O0" and try again.  If I can still trigger the crash, the backtrace might have useful values for the optimized variables.  I'll post again in a few minutes.<br>

</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 15, 2013 at 7:06 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 15, 2013 at 3:18 AM, Michal Privoznik <span dir="ltr"><<a href="mailto:mprivozn@redhat.com" target="_blank">mprivozn@redhat.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br>
</div>Interesting. If you are still able to reproduce the crash, can you try to get the line number within virSecurityManagerGenLabel where the crash happened? I think it's the STREQ line (440 linenr). Question is whether model or name is NULL.<br>



<br></blockquote></div><br><br></div></div><div class="gmail_extra">I'll try.<br><br>I'm not sure why GDB failed to list line numbers in the backtrace.  I will recompile libvirt with "-O0 -g3" and try again.<br>


<br></div></div></blockquote></div></div></div></blockquote></div><br><br></div><div class="gmail_extra">TL;DR: "vm->seclabels[i]->model" is NULL.<br><br></div><div class="gmail_extra"><br>(gdb) bt full<br>
#0  0x00007ffff6fc5d76 in __strcmp_sse42 () from /lib64/libc.so.6<br>No symbol table info available.<br>#1  0x00007ffff76e2ae2 in virSecurityManagerGenLabel (mgr=0x7fffe40bef20, vm=0x7fffd00097a0)<br>    at security/security_manager.c:442<br>
        ret = -1<br>        i = 0<br>        j = 0<br>        sec_managers = 0x7fffd8003e60<br>        seclabel = 0x7ffff74c4911 <virAllocN+54><br>        generated = false<br>        __FUNCTION__ = "virSecurityManagerGenLabel"<br>
        __func__ = "virSecurityManagerGenLabel"<br><br><br><br>(gdb) list 436,450<br>436         if ((sec_managers = virSecurityManagerGetNested(mgr)) == NULL)<br>437             return ret;<br>438<br>439         virObjectLock(mgr);<br>
440         for (i = 0; i < vm->nseclabels; i++) {<br>441             for (j = 0; sec_managers[j]; j++)<br>442                 if (STREQ(vm->seclabels[i]->model, sec_managers[j]->drv->name))<br>443                     break;<br>
444<br>445             if (!sec_managers[j]) {<br>446                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,<br>447                                _("Unable to find security driver for label %s"),<br>448                                vm->seclabels[i]->model);<br>
449                 goto cleanup;<br>450             }<br><br>(gdb) frame 1<br>#1  0x00007ffff76e2ae2 in virSecurityManagerGenLabel (mgr=0x7fffe40bef20, vm=0x7fffd00097a0)<br>    at security/security_manager.c:442<br>442                 if (STREQ(vm->seclabels[i]->model, sec_managers[j]->drv->name))<br>
<br>(gdb) print vm->nseclabels<br>$1 = 1<br><br>(gdb) print sec_managers<br>$2 = (virSecurityManagerPtr *) 0x7fffd8003e60<br><br>(gdb) print sec_managers[0]<br>$3 = (virSecurityManagerPtr) 0x7fffe40bef20<br><br>(gdb) print vm->seclabels[i]->model<br>
$4 = 0x0<br><br>(gdb) print sec_managers[j]->drv->name<br>$5 = 0x7ffff77729c0 "none"<br><br></div></div>