From: "Pavel Dovgalyuk" <dovgaluk@ispras.ru>
To: "'Alex Bennée'" <alex.bennee@linaro.org>
Cc: kwolf@redhat.com, peter.maydell@linaro.org,
pavel.dovgaluk@ispras.ru, crosthwaite.peter@gmail.com,
ciro.santilli@gmail.com, jasowang@redhat.com,
quintela@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com,
maria.klimushenkova@ispras.ru, mst@redhat.com, kraxel@redhat.com,
boost.lists@gmail.com, thomas.dullien@googlemail.com,
pbonzini@redhat.com, mreitz@redhat.com,
artem.k.pisarenko@gmail.com, dgilbert@redhat.com,
rth@twiddle.net
Subject: RE: [for-5.0 PATCH 08/11] replay: flush rr queue before loading the vmstate
Date: Tue, 14 Jan 2020 16:57:30 +0300 [thread overview]
Message-ID: <000c01d5cae2$906f4a90$b14ddfb0$@ru> (raw)
In-Reply-To: <87y2ubmemp.fsf@linaro.org>
> From: Alex Bennée [mailto:alex.bennee@linaro.org]
> Pavel Dovgalyuk <pavel.dovgaluk@gmail.com> writes:
>
> > From: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
> >
> > Non-empty record/replay queue prevents saving and loading the VM state,
> > because it includes pending bottom halves and block coroutines.
> > But when the new VM state is loaded, we don't have to preserve the consistency
> > of the current state anymore. Therefore this patch just flushes the queue
> > allowing the coroutines to finish and removes checking for empty rr queue
> > for load_snapshot function.
> >
> > Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
> > ---
> > include/sysemu/replay.h | 2 ++
> > migration/savevm.c | 12 ++++++------
> > replay/replay-internal.h | 2 --
> > 3 files changed, 8 insertions(+), 8 deletions(-)
> >
> > diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h
> > index e00ed2f4a5..239c01e7df 100644
> > --- a/include/sysemu/replay.h
> > +++ b/include/sysemu/replay.h
> > @@ -149,6 +149,8 @@ void replay_disable_events(void);
> > void replay_enable_events(void);
> > /*! Returns true when saving events is enabled */
> > bool replay_events_enabled(void);
> > +/* Flushes events queue */
> > +void replay_flush_events(void);
> > /*! Adds bottom half event to the queue */
> > void replay_bh_schedule_event(QEMUBH *bh);
> > /* Adds oneshot bottom half event to the queue */
> > diff --git a/migration/savevm.c b/migration/savevm.c
> > index ae84bf6ab0..0c5cac372a 100644
> > --- a/migration/savevm.c
> > +++ b/migration/savevm.c
> > @@ -2834,12 +2834,6 @@ int load_snapshot(const char *name, Error **errp)
> > AioContext *aio_context;
> > MigrationIncomingState *mis = migration_incoming_get_current();
> >
> > - if (!replay_can_snapshot()) {
> > - error_setg(errp, "Record/replay does not allow loading snapshot "
> > - "right now. Try once more later.");
> > - return -EINVAL;
> > - }
> > -
> > if (!bdrv_all_can_snapshot(&bs)) {
> > error_setg(errp,
> > "Device '%s' is writable but does not support snapshots",
> > @@ -2873,6 +2867,12 @@ int load_snapshot(const char *name, Error **errp)
> > return -EINVAL;
> > }
> >
> > + /*
> > + * Flush the record/replay queue. Now the VM state is going
> > + * to change. Therefore we don't need to preserve its consistency
> > + */
> > + replay_flush_events();
> > +
> <snip>
>
> This is the commit that introduces:
>
> ERROR:/home/alex.bennee/lsrc/qemu.git/replay/replay-events.c:80:replay_flush_events:
> assertion failed: (replay_mutex_locked())
>
> To the already failing:
>
> /bin/sh -c "cd builds/all && make -j4 && cd tests/qemu-iotests && ./check -qcow2 267"
>
> test case.
Please apply the following update to continue the testing:
--- a/replay/replay-events.c
+++ b/replay/replay-events.c
@@ -77,6 +77,10 @@ bool replay_has_events(void)
void replay_flush_events(void)
{
+ if (replay_mode == REPLAY_MODE_NONE) {
+ return;
+ }
+
Pavel Dovgalyuk
next prev parent reply other threads:[~2020-01-14 13:58 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-23 9:45 [for-5.0 PATCH 00/11] Support for reverse debugging with GDB Pavel Dovgalyuk
2019-12-23 9:46 ` [for-5.0 PATCH 01/11] replay: provide an accessor for rr filename Pavel Dovgalyuk
2019-12-23 9:46 ` [for-5.0 PATCH 02/11] qcow2: introduce icount field for snapshots Pavel Dovgalyuk
2020-01-09 11:48 ` Kevin Wolf
2019-12-23 9:47 ` [for-5.0 PATCH 03/11] migration: " Pavel Dovgalyuk
2020-01-09 11:59 ` Kevin Wolf
2020-01-13 17:11 ` Alex Bennée
2020-01-14 9:32 ` Pavel Dovgalyuk
2019-12-23 9:47 ` [for-5.0 PATCH 04/11] qapi: introduce replay.json for record/replay-related stuff Pavel Dovgalyuk
2019-12-23 9:47 ` [for-5.0 PATCH 05/11] replay: introduce info hmp/qmp command Pavel Dovgalyuk
2020-01-09 12:23 ` Alex Bennée
2020-01-09 12:27 ` Pavel Dovgalyuk
2019-12-23 9:47 ` [for-5.0 PATCH 06/11] replay: introduce breakpoint at the specified step Pavel Dovgalyuk
2019-12-23 9:47 ` [for-5.0 PATCH 07/11] replay: implement replay-seek command Pavel Dovgalyuk
2019-12-23 9:48 ` [for-5.0 PATCH 08/11] replay: flush rr queue before loading the vmstate Pavel Dovgalyuk
2020-01-13 17:48 ` Alex Bennée
2020-01-14 13:57 ` Pavel Dovgalyuk [this message]
2019-12-23 9:48 ` [for-5.0 PATCH 09/11] gdbstub: add reverse step support in replay mode Pavel Dovgalyuk
2019-12-23 9:48 ` [for-5.0 PATCH 10/11] gdbstub: add reverse continue " Pavel Dovgalyuk
2019-12-23 9:48 ` [for-5.0 PATCH 11/11] replay: describe reverse debugging in docs/replay.txt Pavel Dovgalyuk
2020-01-09 6:13 ` [for-5.0 PATCH 00/11] Support for reverse debugging with GDB Pavel Dovgalyuk
2020-01-09 12:00 ` Kevin Wolf
2020-01-09 12:12 ` Pavel Dovgalyuk
2020-01-13 9:29 ` Markus Armbruster
2020-01-13 9:35 ` Pavel Dovgalyuk
2020-01-13 10:06 ` Kevin Wolf
2020-01-13 10:14 ` Peter Maydell
2020-01-13 10:27 ` Kevin Wolf
2020-01-13 10:47 ` Peter Maydell
2020-01-13 17:55 ` Alex Bennée
2020-01-16 11:11 ` Alex Bennée
2020-01-16 11:26 ` Pavel Dovgalyuk
2020-01-17 17:40 ` Alex Bennée
2020-01-20 11:58 ` Pavel Dovgalyuk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000c01d5cae2$906f4a90$b14ddfb0$@ru' \
--to=dovgaluk@ispras.ru \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=artem.k.pisarenko@gmail.com \
--cc=boost.lists@gmail.com \
--cc=ciro.santilli@gmail.com \
--cc=crosthwaite.peter@gmail.com \
--cc=dgilbert@redhat.com \
--cc=jasowang@redhat.com \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=maria.klimushenkova@ispras.ru \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=pavel.dovgaluk@ispras.ru \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=rth@twiddle.net \
--cc=thomas.dullien@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).