From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernd Schubert Subject: 3.9 / 3.10: Reliable host crashes Date: Wed, 10 Jul 2013 16:16:46 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from plane.gmane.org ([80.91.229.3]:39291 "EHLO plane.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751434Ab3GJOQ6 (ORCPT ); Wed, 10 Jul 2013 10:16:58 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UwvCS-0002vm-P7 for kvm@vger.kernel.org; Wed, 10 Jul 2013 16:16:56 +0200 Received: from router1.itwm.fhg.de ([131.246.191.250]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Jul 2013 16:16:56 +0200 Received: from bernd.schubert by router1.itwm.fhg.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Jul 2013 16:16:56 +0200 Sender: kvm-owner@vger.kernel.org List-ID: Hi all, I found a way to reliably crash my host system: 1) Boot guest VM with init=/bin/bash 2) In guest VM: echo b >/proc/sysrq-trigger 3) Try to reboot the guest -> crashes the host during kernel initialization When I checked the logs I first thought it would be a KSM issue: > Jul 10 15:33:37 fsdevel7 kernel: [ 507.995602] br0: port 3(tap2) entered disabled state > Jul 10 15:33:37 fsdevel7 kernel: [ 508.043454] BUG: unable to handle kernel NULL pointer dereference at 0000000000000020 > Jul 10 15:33:37 fsdevel7 kernel: [ 508.043487] IP: [] get_ksm_page+0x39/0x130 and > Jul 10 15:34:49 fsdevel7 kernel: [ 580.274709] RIP: 0010:[] [] anon_vma_clone+0x94/0x1a0 > Jul 10 15:34:49 fsdevel7 kernel: [ 580.274710] RSP: 0018:ffff880406495cf0 EFLAGS: 00010286 > Jul 10 15:34:49 fsdevel7 kernel: [ 580.274721] Call Trace: > Jul 10 15:34:49 fsdevel7 kernel: [ 580.274724] [] anon_vma_fork+0x38/0x130 > Jul 10 15:34:49 fsdevel7 kernel: [ 580.274728] [] dup_mmap+0x1bf/0x420 But then I simply disabled KSM in rc.local (echo 0 > /sys/kernel/mm/ksm/run) before starting the VMs. Now the system still crashes, but now without any logs message. At least sysrq-b still works, but I don' see any "SysRq : Emergency Sync" messages in log files. So log messages are not written properly anymore. Unfortunately I don't have a serial console on my desktop system. I don't have the time now, but the next step is probably to get a crash-dump and to see if that has something useful. And I'm also going to run the VM from a tty without X, maybe it prints something to the console. Anything else you might want? Or already any idea? Crashes do not happen with 3.8-ubuntu, but very reliably with 3.9.9 or 3.10.1 (host). Here's my kvm command line: > qemu-system-x86_64 \ > -m 8192 \ > -machine type=pc,accel=kvm,kernel_irqchip=on \ > -netdev type=tap,script=${kvm_ifup},downscript=${kvm_ifdown},ifname=$iface,vhost=on,id=guest0 \ > -device virtio-net-pci,netdev=guest0,mac=52:54:00:12:34:11 \ > -boot c \ > -drive file=${FILE},if=${DISKIF},cache=unsafe \ > -drive file=${META},if=${DISKIF},cache=writeback \ > -drive file=${STORAGE},if=${DISKIF},cache=writeback \ > -enable-kvm \ > -vga vmware \ > -cpu host \ > -smp 4 \ > "$@" Thanks, Bernd