Description of problem: qemu-kvm segfaults when run from inside another virtual machine. For example (from inside a KVM VM): $ qemu-kvm -hda /dev/zero -nographic open /dev/kvm: No such file or directory Could not initialize KVM, will disable KVM support Segmentation fault The same command on baremetal does not segfault. Version-Release number of selected component (if applicable): qemu-system-x86-0.10.91-0.5.rc1.fc12.x86_64 How reproducible: Always. Steps to Reproduce: 1. Run qemu-kvm in a KVM or Xen VM. 2. Segfaults. 3.
This affects 'make check' in libguestfs, for example: http://koji.fedoraproject.org/koji/getfile?taskID=1588660&name=build.log
Could you get a stack trace?
Sure can ... Program received signal SIGSEGV, Segmentation fault. tb_gen_code (env=0x20b9860, pc=4294967280, cs_base=4294901760, flags=68, cflags=<value optimized out>) at /usr/src/debug/qemu-kvm-0.11.0-rc1/exec.c:901 901 tb->tc_ptr = tc_ptr; Missing separate debuginfos, use: debuginfo-install dbus-libs-1.2.16-4.fc12.x86_64 libICE-1.0.4-9.fc12.x86_64 libSM-1.1.0-7.fc12.x86_64 libXau-1.0.4-7.fc12.x86_64 libXext-1.0.99.4-3.fc12.x86_64 libXi-1.2.99-10.20090805.fc12.x86_64 libXtst-1.0.99.1-3.fc12.x86_64 libasyncns-0.7-3.fc12.x86_64 libattr-2.4.43-4.fc12.x86_64 libcap-2.16-5.fc12.x86_64 libgcrypt-1.4.4-7.fc12.x86_64 libgpg-error-1.6-4.x86_64 libsndfile-1.0.20-2.fc12.x86_64 libtasn1-2.2-2.fc12.x86_64 libuuid-2.16-3.fc12.x86_64 libxcb-1.3-2.fc12.x86_64 nss-mdns-0.10-8.fc12.x86_64 nss-softokn-freebl-3.12.3.99.3-6.fc12.x86_64 tcp_wrappers-libs-7.6-56.fc12.x86_64 (gdb) bt #0 tb_gen_code (env=0x20b9860, pc=4294967280, cs_base=4294901760, flags=68, cflags=<value optimized out>) at /usr/src/debug/qemu-kvm-0.11.0-rc1/exec.c:901 #1 0x00000000004de106 in tb_find_slow (flags=<value optimized out>, cs_base=<value optimized out>, pc=<value optimized out>) at /usr/src/debug/qemu-kvm-0.11.0-rc1/cpu-exec.c:168 #2 tb_find_fast (flags=<value optimized out>, cs_base=<value optimized out>, pc=<value optimized out>) at /usr/src/debug/qemu-kvm-0.11.0-rc1/cpu-exec.c:189 #3 cpu_x86_exec (flags=<value optimized out>, cs_base=<value optimized out>, pc=<value optimized out>) at /usr/src/debug/qemu-kvm-0.11.0-rc1/cpu-exec.c:614 #4 0x000000000040eea2 in qemu_cpu_exec (env=<value optimized out>) at /usr/src/debug/qemu-kvm-0.11.0-rc1/vl.c:4262 #5 tcg_cpu_exec (env=<value optimized out>) at /usr/src/debug/qemu-kvm-0.11.0-rc1/vl.c:4293 #6 main_loop (env=<value optimized out>) at /usr/src/debug/qemu-kvm-0.11.0-rc1/vl.c:4412 #7 main (env=<value optimized out>) at /usr/src/debug/qemu-kvm-0.11.0-rc1/vl.c:6271 (gdb) quit
Lovely, a TCG bug Should be easy enough to bisect ...
Just note that this still happens with 0.10.91-0.7.rc1 I will try to bisect it.
First bad commit is: http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=commitdiff;h=b8083e930efc1ee85a7ad7e700dbd0f52ebb32dd And discussion upstream of the problem: http://www.mail-archive.com/kvm@vger.kernel.org/msg19890.html
http://koji.fedoraproject.org/koji/taskinfo?taskID=1617421 Requested this be pushed into Fedora 12 Alpha: https://fedorahosted.org/rel-eng/ticket/2132
Alpha is finished, but the fix is in rawhide now