Bug 1269874
Summary: | HMP/QMP blocked on failed NBD device (during migration and quit) | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Dr. David Alan Gilbert <dgilbert> |
Component: | qemu-kvm | Assignee: | Virtualization Maintenance <virt-maint> |
qemu-kvm sub component: | NBD | QA Contact: | leidwang <leidwang> |
Status: | CLOSED CURRENTRELEASE | Docs Contact: | |
Severity: | unspecified | ||
Priority: | medium | CC: | chayang, coli, eblake, jinzhao, juzhang, knoel, pezhang, qzhang, rbalakri, stefanha, virt-maint, xfu |
Version: | --- | Keywords: | Triaged |
Target Milestone: | rc | ||
Target Release: | 8.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-12-15 07:37:35 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Dr. David Alan Gilbert
2015-10-08 11:57:06 UTC
the path that causes the HMP lock is that in migration_completion we do a lock_iothread, vm_stop_force_state(RUN_STATE_FINISH_MIGRATE) do the device state save unlock the iothread. The vm_stop_force_state does a bdrv_flush_all(), which I think is where it hangs; one possibility is for us to do an earlier flush (and I think there's a patch to do that for performance reasons from Intel somewhere); that would at least cause the migration thread to block before it locks the iothread unless you got really unlucky and the destination failed after that point. However, even then we need a way of forcibly stopping the nbd client to be able to free the migration thread. This is a design limitation in QEMU today. There are synchronous "wait for all I/Os" points in the code. We need to move to a model with timeouts so these operations can fail. That may mean that migration fails and requires the user to issue some kind of "force remove" command to take down the broken NBD device. None of this exists yet and I've seen other BZs related to the same issue. I suggest we keep this around and keep moving this BZ to the next release until we have time to tackle this issue. (In reply to Stefan Hajnoczi from comment #3) > This is a design limitation in QEMU today. There are synchronous "wait for > all I/Os" points in the code. > > We need to move to a model with timeouts so these operations can fail. That > may mean that migration fails and requires the user to issue some kind of > "force remove" command to take down the broken NBD device. Thinking about the 'force remove' was what initially got me thinking about this, and would solve the worst migration case, i.e. a migration to a machine that dies and then you try a new migration, because libvirt could do that 'force remove' when it kills the block job doing the disk copy as part of the failed migration. Dave > None of this exists yet and I've seen other BZs related to the same issue. > I suggest we keep this around and keep moving this BZ to the next release > until we have time to tackle this issue. I'm assuming this affects QMP as well, otherwise we would close this BZ as WONTFIX, because HMP is not supported. I'm adding QMP to the summary. See also: Bug 1285453 Hi Qunfang, Free to update the QE contact. Stefan, has the situation improved upstream since you posted comment#3? Vladimir Sementsov-Ogievskiy is working on NBD client reconnect for QEMU 3.1: https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg02362.html Perhaps Vladimir's patches will solve this BZ (i.e. migration would fail because the NBD drive is disconnected). Deferred to the next RHEL release. Looks like Vladimir's work missed upstream QEMU 3.1. Stefan, any news on its status? I believe Eric is tracking this work in the context of incremental backup / NBD. Eric: please review and let us know what you think of it. (In reply to Ademar Reis from comment #12) > I believe Eric is tracking this work in the context of incremental backup / > NBD. Eric: please review and let us know what you think of it. Vladimir's reconnect work would at least let you get NBD up and running again if the network connection reappears, but doesn't address the root cause of a hang waiting for the reconnection in the first place. His patches did not make it in 3.1, but should make it into 4.0 if they pass review (it's actually been a few months since he wrote them, so they may require a respin to even properly apply at this point in time). (In reply to Eric Blake from comment #13) > (In reply to Ademar Reis from comment #12) > > I believe Eric is tracking this work in the context of incremental backup / > > NBD. Eric: please review and let us know what you think of it. > > Vladimir's reconnect work would at least let you get NBD up and running > again if the network connection reappears, but doesn't address the root > cause of a hang waiting for the reconnection in the first place. His patches > did not make it in 3.1, but should make it into 4.0 if they pass review > (it's actually been a few months since he wrote them, so they may require a > respin to even properly apply at this point in time). NBD reconnect missed upstream 4.0; the latest revision (v7) still has enough review work still required that may also be at risk of missing 4.1: https://lists.gnu.org/archive/html/qemu-devel/2019-06/msg03888.html QEMU has been recently split into sub-components and as a one-time operation to avoid breakage of tools, we are setting the QEMU sub-component of this BZ to "General". Please review and change the sub-component if necessary the next time you review this BZ. Thanks After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. Tested this BZ with RHEL 8.4, not hit this issue. Since this bug has been fixed, set status to CURRENTRELEASE.Thanks! |