[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/7] migration: only flush when there are no err
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH 2/7] migration: only flush when there are no errors |
Date: |
Tue, 20 Sep 2011 16:47:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
"Daniel P. Berrange" <address@hidden> wrote:
> On Tue, Sep 20, 2011 at 03:24:41PM +0200, Juan Quintela wrote:
>> If we have one error while migrating, and then we issuse a
>> "migrate_cancel" command, guest hang. Fix it for flushing only when
>> migration is in MIG_STATE_ACTIVE. In case of error of cancellation,
>> don't flush.
>>
>> We had an infinite loop at buffered_close()
>>
>> while (!s->has_error && s->buffer_size) {
>> buffered_flush(s);
>> if (s->freeze_output)
>> s->wait_for_unfreeze(s);
>> }
>>
>> There was no errors, there were things to send, and connection was
>> broken. send() returns -EAGAIN, so we freezed output, but we
>> unfreeze_output and try again.
>
> I posted a couple of alternative approaches to fixing this
> hang problem
>
> http://lists.nongnu.org/archive/html/qemu-devel/2011-08/msg03248.html
>
> My second approach of checking the migration state in migrate_fd_put_buffer()
> seems like it would be worthwhile, even with your patch as an additional
> safety net against bad code.
We can add that there, but in my tests, the s->write() was returning
correctly an error (or -EAGAIN). The problem was that we were not
exiting when we didn't needed to.
I agree that we can have *both* tests. I will add your patch to my
series.
Thanks for the fast review.
Later, Juan.
- [Qemu-devel] [PATCH 0/7] Handle errors during migration, Juan Quintela, 2011/09/20
- [Qemu-devel] [PATCH 3/7] migration: Check that migration is active before cancel it, Juan Quintela, 2011/09/20
- [Qemu-devel] [PATCH 2/7] migration: only flush when there are no errors, Juan Quintela, 2011/09/20
- [Qemu-devel] [PATCH 1/7] migration: simplify state assignmente, Juan Quintela, 2011/09/20
- [Qemu-devel] [PATCH 7/7] migration: qemu_savevm_iterate has three return values, Juan Quintela, 2011/09/20
- [Qemu-devel] [PATCH 6/7] migration: If there is one error, it makes no sense to continue, Juan Quintela, 2011/09/20
- [Qemu-devel] [PATCH 5/7] migration: add error handling to migrate_fd_put_notify()., Juan Quintela, 2011/09/20
- [Qemu-devel] [PATCH 4/7] savevm: avoid qemu_savevm_state_iterate() to return 1 when qemu file has error., Juan Quintela, 2011/09/20