<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Compiled libvirt and friends from todays sources on ubuntu 9.10. Was playing around with vt-d and while my MB works fine with ESXi 4, I got some permission issues when I tried the KVM and virt-manager included from ubuntu so I just gambled and compiled everything from latest sources.<BR>
 <BR>
Things seems to work fine in a normal use case, but if I a PCI device such as a storage controller,  libvirtd will get a sigsev.<BR>
 <BR>
I got the onboard Intel Sata, a PCI Sil Sata card as well as an Areca Raid controller in this machine. I have not tried the Intel Sata device as I am booting from that, but both the other devices causes sigsev.<BR>
 <BR>
I am sure  assigned an intel network card a bit earlier and it actually worked (well, the VM started to boot at least and entered win7 installation without libvirtd crashing), but when I tested that again now, seems like the ethernet card causes the same problem.<BR>
 <BR>
It is 6AM so will not do a serious attempt at debugging this, just wanted to check if anyone had an  idea before I spent more time potentially debugging stuff that is know to not work.<BR>
 <BR>
>From dmesg:<BR>
[  986.341633] device vnet0 entered promiscuous mode<BR>[  986.342897] virbr0: topology change detected, propagating<BR>[  986.342902] virbr0: port 1(vnet0) entering forwarding state<BR>[  986.380733] pci-stub 0000:09:01.0: enabling device (0000 -> 0003)<BR>[  986.380786] pci-stub 0000:09:01.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22<BR>[  986.422128] pci-stub 0000:09:01.0: restoring config space at offset 0x9 (was 0x0, writing 0xe3c04000)<BR>[  986.422141] pci-stub 0000:09:01.0: restoring config space at offset 0x8 (was 0x1, writing 0x1041)<BR>[  986.422152] pci-stub 0000:09:01.0: restoring config space at offset 0x7 (was 0x1, writing 0x1061)<BR>[  986.422163] pci-stub 0000:09:01.0: restoring config space at offset 0x6 (was 0x1, writing 0x1051)<BR>[  986.422174] pci-stub 0000:09:01.0: restoring config space at offset 0x5 (was 0x1, writing 0x1065)<BR>[  986.422185] pci-stub 0000:09:01.0: restoring config space at offset 0x4 (was 0x1, writing 0x1059)<BR>[  986.422199] pci-stub 0000:09:01.0: restoring config space at offset 0x1 (was 0x2b00000, writing 0x2b00003)<BR>[  987.172975] assign device: host bdf = 9:1:0<BR>[  987.173054] deassign device: host bdf = 9:1:0<BR>[  987.206121] pci-stub 0000:09:01.0: restoring config space at offset 0x9 (was 0x0, writing 0xe3c04000)<BR>[  987.206134] pci-stub 0000:09:01.0: restoring config space at offset 0x8 (was 0x1, writing 0x1041)<BR>[  987.206146] pci-stub 0000:09:01.0: restoring config space at offset 0x7 (was 0x1, writing 0x1061)<BR>[  987.206157] pci-stub 0000:09:01.0: restoring config space at offset 0x6 (was 0x1, writing 0x1051)<BR>[  987.206167] pci-stub 0000:09:01.0: restoring config space at offset 0x5 (was 0x1, writing 0x1065)<BR>[  987.206178] pci-stub 0000:09:01.0: restoring config space at offset 0x4 (was 0x1, writing 0x1059)<BR>[  987.206192] pci-stub 0000:09:01.0: restoring config space at offset 0x1 (was 0x2b00000, writing 0x2b00003)<BR>[  987.206225] pci-stub 0000:09:01.0: PCI INT A disabled<BR>[  987.286791] libvirtd[3193]: segfault at 10 ip 00007f921b4546b4 sp 00007f9216e165e0 error 4 in libpthread-2.10.1.so[7f921b44a000+17000]<BR>
 <BR>
 <BR>
>From GDB<BR>
06:45:32.434: error : qemuMonitorCommandWithHandler:290 : cannot send monitor command 'info cpus': Connection reset by peer<BR>06:45:32.434: error : qemuMonitorTextGetCPUInfo:436 : internal error cannot run monitor command to fetch CPU thread info<BR>
Program received signal SIGSEGV, Segmentation fault.<BR>[Switching to Thread 0x7f485bfff910 (LWP 18120)]<BR>0x00007f48657fb6b4 in pthread_mutex_unlock () from /lib/libpthread.so.0<BR>(gdb) bt<BR>#0  0x00007f48657fb6b4 in pthread_mutex_unlock () from /lib/libpthread.so.0<BR>#1  0x0000000000431101 in qemuDomainObjExitMonitorWithDriver (driver=0x11f0110, obj=0x12114f0) at qemu/qemu_driver.c:318<BR>#2  0x000000000043f436 in qemudStartVMDaemon (conn=<value optimized out>, driver=0x11f0110, vm=0x12114f0, <BR>    migrateFrom=<value optimized out>, stdin_fd=<value optimized out>) at qemu/qemu_driver.c:2320<BR>#3  0x00000000004407c4 in qemudDomainStart (dom=0x11f0330) at qemu/qemu_driver.c:4370<BR>#4  0x00007f4865a621e7 in virDomainCreate (domain=0x11f0330) at libvirt.c:4509<BR>#5  0x0000000000420d68 in remoteDispatchDomainCreate (server=<value optimized out>, client=<value optimized out>, conn=0x1219da0, <BR>    hdr=<value optimized out>, rerr=0x7f485bffedf0, args=<value optimized out>, ret=0x7f485bffeed0) at remote.c:853<BR>#6  0x00000000004228e1 in remoteDispatchClientCall (server=<value optimized out>, client=0x7f485c000d30, msg=0x7f485c080f00)<BR>    at dispatch.c:506<BR>#7  0x0000000000422c93 in remoteDispatchClientRequest (server=0x11e2790, client=0x7f485c000d30, msg=0x7f485c080f00) at dispatch.c:388<BR>#8  0x000000000041625c in qemudWorker (data=<value optimized out>) at libvirtd.c:1518<BR>#9  0x00007f48657f7a04 in start_thread () from /lib/libpthread.so.0<BR>#10 0x00007f48655617bd in clone () from /lib/libc.so.6<BR>#11 0x0000000000000000 in ?? ()<BR>(gdb) select 2<BR>(gdb) info locals<BR>argv = 0x0<BR>tmp = <value optimized out><BR>progenv = 0x0<BR>i = 1<BR>ret = 1<BR>sb = {st_dev = 64512, st_ino = 140307, st_nlink = 1, st_mode = 33261, st_uid = 0, st_gid = 0, __pad0 = 0, st_rdev = 0, <BR>  st_size = 2293664, st_blksize = 4096, st_blocks = 4480, st_atim = {tv_sec = 1258937087, tv_nsec = 967226499}, st_mtim = {<BR>    tv_sec = 1257180462, tv_nsec = 0}, st_ctim = {tv_sec = 1258886336, tv_nsec = 104908677}, __unused = {0, 0, 0}}<BR>tapfds = 0x0<BR>ntapfds = 1<BR>qemuCmdFlags = 9436542<BR>keepfd = {fds_bits = {262144, 0 <repeats 15 times>}}<BR>emulator = <value optimized out><BR>child = 18145<BR>pos = <value optimized out><BR>ebuf = "\220v\036\001\000\000\000\000\060|WeH\177\000\000(\000\000\000\060\000\000\000\000\354\377[H\177\000\000@\353\377[H\177\000\000`\351\377[H\177\000\000\377\377\377\377H\177\000\000\233\017\037\001\000\000\000\000\326\063G\000\000\000\000\000@\247~eH\177\000\000\200\307OeH\177\000\000\240\306OeH\177\000\000JST\000\071\000\000\000\300\352\377[H\177\000\000\342\000\000\000\000\000\000\000\342\000\000\000\000\000\000\000\273\340G\000\000\000\000\000\300\352\377[H\177\000\000K\000\000\000\000\000\000\000`\351\377[H\177\000\000@\354\377[H\177\000\000P\352\377[H\177\000\000\001\000\000\000\000\000\000\000\320\352\377[H\177\000\000$\000\000\000\000\000\000\000py\255eH\177\000\000@\354\377[H\177\000\000\060|WeH\177\000\000\001\200\255\373\000\000\000\000\260\351\377[H\177\000\000\220\354\377[H\177\000\000\240\352\377["...<BR>pidfile = 0x0<BR>logfile = 15<BR>hookData = {conn = 0x1219da0, vm = 0x12114f0, driver = 0x11f0110}<BR>__FUNCTION__ = "qemudStartVMDaemon"<BR>__func__ = "qemudStartVMDaemon"<BR>
 <BR>
line 318 is<BR>
static void qemuDomainObjExitMonitorWithDriver(struct qemud_driver *driver, virDomainObjPtr obj)<BR>{<BR>    qemuDomainObjPrivatePtr priv = obj->privateData;<BR>
    qemuMonitorUnlock(priv->mon);      <---- 318<BR>    qemuDriverLock(driver);<BR>    virDomainObjLock(obj);<BR>}<BR><BR>
Yep, not a very good attempt at debugging, but this is the first time I look at this code and I am overdue for Zzzzz :)<BR>
 <BR>
Regards, <BR>
Terje<BR>                                           <br /><hr />Windows Live: Keep your friends up to date <a href='http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_1:092010' target='_new'>with what you do online.</a></body>
</html>