RDMA migration will hang forever if target QEMU fails to load vmstate
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Dr. David Alan Gilbert |
Bug Description
Get a pair of machines with infiniband support. On one host run
$ qemu-system-x86_64 -monitor stdio -incoming rdma:ibme:4444 -vnc :1 -m 1000
To start an incoming migration.
Now on the other host, run QEMU with an intentionally different configuration (ie different RAM size)
$ qemu-system-x86_64 -monitor stdio -vnc :1 -m 2000
Now trigger a migration on this source host
(qemu) migrate rdma:ibpair:4444
You will see on the target host, that it failed to load migration:
dest_init RDMA Device opened: kernel name mlx4_0 uverbs device name uverbs0, infiniband_verbs class device path /sys/class/
qemu-system-x86_64: Length mismatch: pc.ram: 0x7d000000 in != 0x3e800000: Invalid argument
qemu-system-x86_64: error while loading state for instance 0x0 of device 'ram'
This is to be expected, however, at this point QEMU has hung and no longer responds to the monitor
GDB shows the target host is stuck in this callpath
#0 0x00007ffff39141cd in write () at ../sysdeps/
#1 0x00007ffff27fe795 in rdma_get_
#2 0x000055555593e445 in qemu_rdma_cleanup (rdma=0x7fff964
#3 0x000055555593ea45 in qemu_rdma_close (opaque=
#4 0x00005555559397cc in qemu_fclose (f=f@entry=
#5 0x0000555555936b88 in process_
#6 0x0000555555a25a1a in coroutine_
#7 0x00007fffef5b3110 in ?? () from /lib64/libc.so.6
Now, back on the source host again, you would expect to see that the migrate command failed. Instead, this QEMU is hung too.
GDB shows the source host, migrate thread, is stuck in this callpath:
#0 0x00007ffff391522d in read#1 0x00007ffff00efd93 in ibv_get_cq_event () at /lib64/
#2 0x00005555559403f2 in qemu_rdma_
#3 0x000055555594058a in qemu_rdma_
at migration/
#4 0x0000555555941e71 in qemu_rdma_
#5 0x00005555559447e4 in qemu_rdma_
#6 0x000055555593bc4b in ram_control_
#7 0x0000555555740b59 in ram_save_setup (f=0x5555564c20f0, opaque=<optimized out>) at /home/berrange/
#8 0x00005555557451c1 in qemu_savevm_
at /home/berrange/
#9 0x00005555559381a5 in migration_thread (opaque=
#10 0x00007ffff390edc5 in start_thread (arg=0x7fff39de
It should have aborted migrate and set the status to failed.
Changed in qemu: | |
status: | New → Confirmed |
Changed in qemu: | |
assignee: | nobody → Dr. David Alan Gilbert (dgilbert-h) |
FYI is is tested on current GIT master
commit fc1ec1acffd29d5 4c0c4266d30d38b 2399d42f4f
Merge: f163684 1834ed3
Author: Peter Maydell <email address hidden>
Date: Thu Feb 11 15:09:33 2016 +0000
Merge remote-tracking branch 'remotes/ mjt/tags/ pull-trivial- patches- 2016-02- 11' into staging