[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires
From: |
Zhoujian (jay) |
Subject: |
Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires |
Date: |
Tue, 14 Aug 2018 12:49:33 +0000 |
> -----Original Message-----
> From: Dr. David Alan Gilbert [mailto:address@hidden
> Sent: Tuesday, August 14, 2018 7:52 PM
> To: Paolo Bonzini <address@hidden>
> Cc: Zhoujian (jay) <address@hidden>; address@hidden;
> address@hidden; wangxin (U) <address@hidden>
> Subject: Re: [RFC PATCH] vl: fix migration when watchdog expires
>
> * 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?
Hi Dave,
it is i6300esb, which uses QEMU_CLOCK_VIRTUAL.
>
> 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.
This is the case I met I think.
Regards,
Jay Zhou
>
> 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, 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, 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) <=