Hi Lukas, Sorry, I didn't receive the previous email in my gmail. Currently, COLO not support primary node and secondary node both in one physical machine. COLO is a HA solution, in this case can not support physical faults, like power cuts. So, you'd better use two physical machine to use COLO, the latest branch: https://github.com/zhangckid/qemu/tree/qemu-colo-18mar11 By the way, I have tested this case, but I can't got the same Segfaults. In my side, the primary COLO node get stuck in chardev socket related code,
Thanks Zhang Chen On Sun, Mar 18, 2018 at 12:34 AM, Lukas Straub <lukasstra...@web.de> wrote: > Hello Everyone, > Any Status on this? > > Kind Regards, > Lukas Straub > > On Sat, 17 Feb 2018 17:36:29 +0100 > Lukas Straub <lukasstra...@web.de> wrote: > > > Hello Mr. Chen, > > I was trying your latest Version of Qemu-COLO > > (https://github.com/zhangckid/qemu/tree/qemu-colo-18jan19) with both > > Qemu Instances running on One Host. However the Secondary always > > Segfaults after entering the QMP Commands, and Sometimes even the > > Primary Segfaults, depending on the -cpu Parameter. Everything is > > working fine when not using COLO. > > > > Kind Regards, > > Lukas Straub > > > > > > Primary Command: > > > > ./qemu-system-x86_64 -enable-kvm -cpu host -m 1024 -qmp stdio -name > > primary -netdev > > tap,helper=/usr/lib/qemu/qemu-bridge-helper,id=hn0,vhost=off -device > > virtio-net-pci,id=net-pci0,netdev=hn0 -drive > > if=virtio,id=primary-disk0,driver=quorum,read-pattern= > fifo,vote-threshold=1,children.0.file.filename=/mnt/ > vms/colo-test/primary.raw,children.0.driver=raw > > -S > > > > > > Secondary Command: > > > > ./qemu-system-x86_64 -enable-kvm -cpu host -m 1024 -qmp stdio -name > > secondary -netdev > > tap,helper=/usr/lib/qemu/qemu-bridge-helper,id=hn0,vhost=off -device > > virtio-net-pci,id=net-pci0,netdev=hn0 -drive > > if=none,id=secondary-disk0,file.filename=/mnt/vms/colo- > test/primary-copy.raw,driver=raw,node-name=node0 > > -drive > > if=virtio,id=active-disk0,driver=replication,mode= > secondary,file.driver=qcow2,top-id=active-disk0,file.file. > filename=/mnt/vms/colo-test/active.qcow2,file.backing. > driver=qcow2,file.backing.file.filename=/mnt/vms/colo- > test/hidden.qcow2,file.backing.backing=secondary-disk0 > > -incoming tcp:0:8888 > > > > > > 1. Secondary QMP Commands: > > > > {'execute':'qmp_capabilities'} > > { 'execute': 'nbd-server-start', > > 'arguments': {'addr': {'type': 'inet', 'data': {'host': > > '127.0.0.1', 'port': '8889'} } } } > > {'execute': 'nbd-server-add', 'arguments': > > {'device':'secondary-disk0', 'writable': true } } > > > > > > 2. Primary QMP Commands: > > > > {'execute':'qmp_capabilities'} > > { 'execute': 'human-monitor-command', > > 'arguments': {'command-line': 'drive_add -n buddy > > driver=replication,mode=primary,file.driver=nbd,file. > host=127.0.0.1,file.port=8889,file.export=secondary-disk0, > node-name=nbd_client0'}} > > { 'execute':'x-blockdev-change', 'arguments':{'parent': > > 'primary-disk0', 'node': 'nbd_client0' } } { 'execute': > > 'migrate-set-capabilities', 'arguments': {'capabilities': > > [ {'capability': 'x-colo', 'state': true } ] } } { 'execute': > > 'migrate', 'arguments': {'uri': 'tcp:127.0.0.1:8888' } } > > > > > > > > Secondary in gdb (without using KVM): > > > > Starting > > program: /home/lukas/lxcshare/build/qemu/x86_64-softmmu/qemu- > system-x86_64 > > -m 1024 -qmp stdio -name secondary -netdev > > tap,helper=/usr/lib/qemu/qemu-bridge-helper,id=hn0,vhost=off -device > > virtio-net-pci,id=net-pci0,netdev=hn0 -drive > > if=none,id=secondary-disk0,file.filename=/mnt/vms/colo- > test/primary-copy.raw,driver=raw,node-name=node0 > > -drive > > if=virtio,id=active-disk0,driver=replication,mode= > secondary,file.driver=qcow2,top-id=active-disk0,file.file. > filename=/mnt/vms/colo-test/active.qcow2,file.backing. > driver=qcow2,file.backing.file.filename=/mnt/vms/colo- > test/hidden.qcow2,file.backing.backing=secondary-disk0 > > -incoming tcp:0:8888 [Thread debugging using libthread_db enabled] > > Using host libthread_db library > > "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffedb07700 > > (LWP 24258)] [New Thread 0x7fffdd306700 (LWP 24262)] {"QMP": > > {"version": {"qemu": {"micro": 50, "minor": 11, "major": 2}, > > "package": " (v2.3.0-20031-g18b5475aba-dirty)"}, "capabilities": []}} > > [New Thread 0x7fffd7d1c700 (LWP 24269)] > > {'execute':'qmp_capabilities'} { 'execute': 'nbd-server-start', > > 'arguments': {'addr': {'type': 'inet', 'data': {'host': '127.0.0.1', > > 'port': '8889'} } } } {'execute': 'nbd-server-add', 'arguments': > > {'device': 'secondary-disk0', 'writable': true } } > > > > {"return": {}} > > {"return": {}} > > [Thread 0x7fffdd306700 (LWP 24262) exited] > > [New Thread 0x7fffdd306700 (LWP 24462)] > > [New Thread 0x7fff479ff700 (LWP 24463)] > > {"timestamp": {"seconds": 1518884676, "microseconds": 286781}, > > "event": "RESUME"} > > > > Thread 4 "qemu-system-x86" received signal SIGSEGV, Segmentation > > fault. [Switching to Thread 0x7fffd7d1c700 (LWP 24269)] > > qemu_lockcnt_inc (lockcnt=lockcnt@entry=0x9c) at util/lockcnt.c:113 > > 113 util/lockcnt.c: No such file or directory. > > (gdb) q > > > >