[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires |
Date: |
Tue, 14 Aug 2018 12:52:03 +0100 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
* Paolo Bonzini (address@hidden) wrote:
> On 14/08/2018 12:48, Jay Zhou wrote:
> > I got the following error when migrating a VM with watchdog
> > device:
> >
> > {"timestamp": {"seconds": 1533884471, "microseconds": 668099},
> > "event": "WATCHDOG", "data": {"action": "reset"}}
> > {"timestamp": {"seconds": 1533884471, "microseconds": 677658},
> > "event": "RESET", "data": {"guest": true}}
> > {"timestamp": {"seconds": 1533884471, "microseconds": 677874},
> > "event": "STOP"}
> > qemu-system-x86_64: invalid runstate transition: 'prelaunch' ->
> > 'postmigrate'
> > Aborted
> >
> > The run state transition is RUN_STATE_FINISH_MIGRATE to RUN_STATE_PRELAUNCH,
> > then the migration thread aborted when it tries to set
> > RUN_STATE_POSTMIGRATE.
> > There is a race between the main loop thread and the migration thread I
> > think.
>
> In that case I think you shouldn't go to POSTMIGRATE at all, because the
> VM has been reset.
Migration has the VM stopped; it's not expecting the state to change at
that point.
> Alternatively, when the watchdog fires in RUN_STATE_FINISH_MIGRATE
> state, it might delay the action until after the "cont" command is
> invoked on the source, but I'm not sure what's the best way to achieve
> that...
Jay: Which watchdog were you using?
a) Should the watchdog expire when the VM is stopped; I think it
shouldn't - hw/acpi/tco.c uses a virtual timer as does i6300esb; so
is the bug here that the watchdog being used didn't use a virtual
timer?
b) If the watchdog expires just before the VM gets stopped, is there
a race which could hit this? Possibly.
c) Could main_loop_should_exit guard all the 'request's by
something that checks whether the VM is stopped?
Dave
> Paolo
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK
- [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires, Jay Zhou, 2018/08/14
- Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires, Paolo Bonzini, 2018/08/14
- Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires,
Dr. David Alan Gilbert <=
- Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires, Paolo Bonzini, 2018/08/14
- Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires, Zhoujian (jay), 2018/08/14
- Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires, Paolo Bonzini, 2018/08/14
- Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires, Zhoujian (jay), 2018/08/14
- Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires, Zhoujian (jay), 2018/08/16
- Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires, Paolo Bonzini, 2018/08/17
- Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires, Dr. David Alan Gilbert, 2018/08/17
- Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires, Zhoujian (jay), 2018/08/14