From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lucas Meneghel Rodrigues Subject: qemu-kvm crashes doing migration with disks + blkdebug files (does not happen with qemu) Date: Sat, 05 Nov 2011 00:16:42 -0200 Message-ID: <4EB49C8A.5090407@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: KVM mailing list , Marcelo Tosatti , Avi Kivity , Kevin Wolf , Juan Quintela , QEMU de Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org Hi folks, qemu-kvm is segfaulting when executing migration with blkdebug files. 19:50:02 DEBUG| Git repo qemu_kvm uri: git://github.com/avikivity/qemu.git 19:50:02 DEBUG| Git repo qemu_kvm branch: master 19:50:30 INFO | Commit hash for qemu_kvm is 7879db7e9c09b92d9af1c143fbe2cc212ec89e4b (no tag found) How to reproduce: 1) create a origin vm like: /usr/local/autotest/tests/kvm/qemu -name 'vm1' -nodefaults -vga std -monitor unix:'/tmp/monitor-humanmonitor1-20111104-200902-95j0',server,nowait -qmp unix:'/tmp/monitor-qmpmonitor1-20111104-200902-95j0',server,nowait -serial unix:'/tmp/serial-20111104-200902-95j0',server,nowait -drive file=blkdebug:/usr/local/autotest/virt/blkdebug/default.conf:/tmp/kvm_autotest_root/images/rhel6.1-64.qcow2,index=0,if=virtio,cache=none,rerror=stop,werror=stop -device virtio-net-pci,netdev=idtzhBVb,mac='9a:d0:7b:07:18:72',id='id9JW3ZV' -netdev tap,id=idtzhBVb,fd=23 -m 2048 -smp 2 -vnc :0 2) create a destination vm like: /usr/local/autotest/tests/kvm/qemu -name 'vm1' -nodefaults -vga std -monitor unix:'/tmp/monitor-humanmonitor1-20111104-201329-Ia9o',server,nowait -qmp unix:'/tmp/monitor-qmpmonitor1-20111104-201329-Ia9o',server,nowait -serial unix:'/tmp/serial-20111104-201329-Ia9o',server,nowait -drive file=blkdebug:/usr/local/autotest/virt/blkdebug/default.conf:/tmp/kvm_autotest_root/images/rhel6.1-64.qcow2,index=0,if=virtio,cache=none,rerror=stop,werror=stop -device virtio-net-pci,netdev=idup1xAf,mac='9a:d0:7b:07:18:72',id='idyvOQf3' -netdev tap,id=idup1xAf,fd=19 -m 2048 -smp 2 -vnc :1 -S -incoming "exec:nc -l 5200" Note that blkdebug file contains: [inject-error] state = "2" event = "read_aio" errno = "7" immediately = "off" once = "on" [set-state] state = "1" event = "read_aio" new_state = "2" [set-state] state = "2" event = "read_aio" new_state = "3" Start the migration (on this example, using exec, but it reproduces with tcp and unix sockets): 11/04 20:13:30 DEBUG|kvm_monito:0254| (monitor humanmonitor1) Sending command 'migrate -d "exec:nc localhost 5200"' Then you will have: 11/04 20:13:33 INFO | aexpect:0783| [qemu output] invalid runstate transition 11/04 20:13:36 INFO | aexpect:0783| [qemu output] /bin/sh: line 1: 14695 Aborted (core dumped) /usr/local/autotest/tests/kvm/qemu -name 'vm1' -nodefaults -vga std -monitor unix:'/tmp/monitor-humanmonitor1-20111104-200902-95j0',server,nowait -qmp unix:'/tmp/monitor-qmpmonitor1-20111104-200902-95j0',server,nowait -serial unix:'/tmp/serial-20111104-200902-95j0',server,nowait -drive file=blkdebug:/usr/local/autotest/virt/blkdebug/default.conf:/tmp/kvm_autotest_root/images/rhel6.1-64.qcow2,index=0,if=virtio,cache=none,rerror=stop,werror=stop -device virtio-net-pci,netdev=idtzhBVb,mac='9a:d0:7b:07:18:72',id='id9JW3ZV' -netdev tap,id=idtzhBVb,fd=23 -m 2048 -smp 2 -vnc :0 We do have the core dumps available in case someone is interested in debugging the issue. It is important to note that this problem is not happening with qemu.git master. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMVoI-0002gm-Jb for qemu-devel@nongnu.org; Fri, 04 Nov 2011 22:16:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RMVoH-0005fa-GK for qemu-devel@nongnu.org; Fri, 04 Nov 2011 22:16:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17370) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMVoH-0005fS-9E for qemu-devel@nongnu.org; Fri, 04 Nov 2011 22:16:41 -0400 Message-ID: <4EB49C8A.5090407@redhat.com> Date: Sat, 05 Nov 2011 00:16:42 -0200 From: Lucas Meneghel Rodrigues MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] qemu-kvm crashes doing migration with disks + blkdebug files (does not happen with qemu) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: KVM mailing list , Marcelo Tosatti , Avi Kivity , Kevin Wolf , Juan Quintela , QEMU devel Hi folks, qemu-kvm is segfaulting when executing migration with blkdebug files. 19:50:02 DEBUG| Git repo qemu_kvm uri: git://github.com/avikivity/qemu.git 19:50:02 DEBUG| Git repo qemu_kvm branch: master 19:50:30 INFO | Commit hash for qemu_kvm is 7879db7e9c09b92d9af1c143fbe2cc212ec89e4b (no tag found) How to reproduce: 1) create a origin vm like: /usr/local/autotest/tests/kvm/qemu -name 'vm1' -nodefaults -vga std -monitor unix:'/tmp/monitor-humanmonitor1-20111104-200902-95j0',server,nowait -qmp unix:'/tmp/monitor-qmpmonitor1-20111104-200902-95j0',server,nowait -serial unix:'/tmp/serial-20111104-200902-95j0',server,nowait -drive file=blkdebug:/usr/local/autotest/virt/blkdebug/default.conf:/tmp/kvm_autotest_root/images/rhel6.1-64.qcow2,index=0,if=virtio,cache=none,rerror=stop,werror=stop -device virtio-net-pci,netdev=idtzhBVb,mac='9a:d0:7b:07:18:72',id='id9JW3ZV' -netdev tap,id=idtzhBVb,fd=23 -m 2048 -smp 2 -vnc :0 2) create a destination vm like: /usr/local/autotest/tests/kvm/qemu -name 'vm1' -nodefaults -vga std -monitor unix:'/tmp/monitor-humanmonitor1-20111104-201329-Ia9o',server,nowait -qmp unix:'/tmp/monitor-qmpmonitor1-20111104-201329-Ia9o',server,nowait -serial unix:'/tmp/serial-20111104-201329-Ia9o',server,nowait -drive file=blkdebug:/usr/local/autotest/virt/blkdebug/default.conf:/tmp/kvm_autotest_root/images/rhel6.1-64.qcow2,index=0,if=virtio,cache=none,rerror=stop,werror=stop -device virtio-net-pci,netdev=idup1xAf,mac='9a:d0:7b:07:18:72',id='idyvOQf3' -netdev tap,id=idup1xAf,fd=19 -m 2048 -smp 2 -vnc :1 -S -incoming "exec:nc -l 5200" Note that blkdebug file contains: [inject-error] state = "2" event = "read_aio" errno = "7" immediately = "off" once = "on" [set-state] state = "1" event = "read_aio" new_state = "2" [set-state] state = "2" event = "read_aio" new_state = "3" Start the migration (on this example, using exec, but it reproduces with tcp and unix sockets): 11/04 20:13:30 DEBUG|kvm_monito:0254| (monitor humanmonitor1) Sending command 'migrate -d "exec:nc localhost 5200"' Then you will have: 11/04 20:13:33 INFO | aexpect:0783| [qemu output] invalid runstate transition 11/04 20:13:36 INFO | aexpect:0783| [qemu output] /bin/sh: line 1: 14695 Aborted (core dumped) /usr/local/autotest/tests/kvm/qemu -name 'vm1' -nodefaults -vga std -monitor unix:'/tmp/monitor-humanmonitor1-20111104-200902-95j0',server,nowait -qmp unix:'/tmp/monitor-qmpmonitor1-20111104-200902-95j0',server,nowait -serial unix:'/tmp/serial-20111104-200902-95j0',server,nowait -drive file=blkdebug:/usr/local/autotest/virt/blkdebug/default.conf:/tmp/kvm_autotest_root/images/rhel6.1-64.qcow2,index=0,if=virtio,cache=none,rerror=stop,werror=stop -device virtio-net-pci,netdev=idtzhBVb,mac='9a:d0:7b:07:18:72',id='id9JW3ZV' -netdev tap,id=idtzhBVb,fd=23 -m 2048 -smp 2 -vnc :0 We do have the core dumps available in case someone is interested in debugging the issue. It is important to note that this problem is not happening with qemu.git master.