Red Hat Bugzilla – Bug 1285044
migration/RDMA: Race condition
Last modified: 2018-04-10 20:09:32 EDT
Description of problem:
There's a race condition in RDMA startup, triggerable by adding a ~2ms usleep before the post_recv_control(rdma, RDMA_WRID_READY) near the end of qemu_rdma_connect
Version-Release number of selected component (if applicable):
tested on 2.5-rc upstream
Steps to Reproduce:
ibv_poll_cq wc.status=13 RNR retry counter exceeded!
This is on the poll waiting for data in qemu_rdma_get_buffer
I think this is because we're doing an rdma_post_send_control and sending a WRID_SEND_CONTROL dest->source before the source has post_recv_control - there needs to be some interlock there to ensure it happens in the right order.
possibly the race we're hitting on rxe?
Not the race we're hitting on rxe.
Posted fix for this one upstream:
migration/rdma: Fix race on source
9cf2bab2edca1e651eef migration/rdma: Fix race on source
3a0f2ceaedcf70ff79b6 migration: Close file on failed migration load
0b3c15f09715acd78063 migration/rdma: fix qemu_rdma_block_for_wrid error paths
9c98cfbe72b21d9d84b9 migration/rdma: Allow cancelling while waiting for wrid
482a33c53cbc9d2b0c47 migration/rdma: Safely convert control types
32bce196344772df8d68 migration/rdma: Send error during cancelling
(Note if we backport this to a 2.9 world we don't want 'Close file on failed')
I am confused about how to verify this bug, is this a test only bug? it just needs to test common function of rdma migration on P8 and x86? or if not, could you give me some guide to verify this bug? thanks
(In reply to xianwang from comment #9)
> Hi, Dave,
> I am confused about how to verify this bug, is this a test only bug? it just
> needs to test common function of rdma migration on P8 and x86? or if not,
> could you give me some guide to verify this bug? thanks
It's a race condition that's very difficult to trigger in practice; so if you just check that RDMA migration is still working OK then that's fine as a test.
So, I think this bug is fixed.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.