[PULL 00/27] migration queue

Dr. David Alan Gilbert (git) posted 27 patches 3 years, 3 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210204163959.377618-1-dgilbert@redhat.com
Maintainers: Eduardo Habkost <ehabkost@redhat.com>, Greg Kurz <groug@kaod.org>, Markus Armbruster <armbru@redhat.com>, Eric Blake <eblake@redhat.com>, David Gibson <david@gibson.dropbear.id.au>, Juan Quintela <quintela@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Cleber Rosa <crosa@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>
There is a newer version of this series
block/monitor/block-hmp-cmds.c |   7 +-
block/snapshot.c               | 256 ++++++++++++++++++--------
hw/ppc/spapr_pci.c             |  11 ++
include/block/snapshot.h       |  23 ++-
include/exec/memory.h          |   8 +
include/migration/snapshot.h   |  47 ++++-
include/qemu/userfaultfd.h     |  35 ++++
migration/migration.c          | 409 +++++++++++++++++++++++++++++++++++++++--
migration/migration.h          |   6 +-
migration/page_cache.c         |   8 +-
migration/page_cache.h         |   2 +-
migration/qemu-file.c          |   2 +-
migration/ram.c                | 305 +++++++++++++++++++++++++++++-
migration/ram.h                |   8 +-
migration/savevm.c             | 341 +++++++++++++++++++++++++++++-----
migration/savevm.h             |   3 +
migration/trace-events         |   2 +
migration/vmstate.c            |   1 +
monitor/hmp-cmds.c             |  45 +++--
qapi/job.json                  |   9 +-
qapi/migration.json            | 218 ++++++++++++++++++++--
replay/replay-debugging.c      |  12 +-
replay/replay-snapshot.c       |   5 +-
scripts/userfaultfd-wrlat.py   | 122 ++++++++++++
softmmu/vl.c                   |   2 +-
tests/qemu-iotests/267.out     |  12 +-
tests/qemu-iotests/common.qemu | 106 ++++++++++-
tests/qemu-iotests/common.rc   |  10 +-
util/meson.build               |   1 +
util/trace-events              |   9 +
util/userfaultfd.c             | 345 ++++++++++++++++++++++++++++++++++
31 files changed, 2145 insertions(+), 225 deletions(-)
create mode 100644 include/qemu/userfaultfd.h
create mode 100755 scripts/userfaultfd-wrlat.py
create mode 100644 util/userfaultfd.c
[PULL 00/27] migration queue
Posted by Dr. David Alan Gilbert (git) 3 years, 3 months ago
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

The following changes since commit 1ba089f2255bfdb071be3ce6ac6c3069e8012179:

  Merge remote-tracking branch 'remotes/armbru/tags/pull-qmp-2021-02-04' into staging (2021-02-04 14:15:35 +0000)

are available in the Git repository at:

  git://github.com/dagrh/qemu.git tags/pull-migration-20210204a

for you to fetch changes up to ef74d46576a9e5aff96f285b74150f341a525688:

  migration: introduce snapshot-{save, load, delete} QMP commands (2021-02-04 16:29:03 +0000)

----------------------------------------------------------------
Migration pull 2020-02-04

 New snapshot features:
   a) Andrey's RAM snapshot feature using userfault-wp
   b) Dan's native-QMP snapshots

Cleanups:
   c) Jinhao's memory leeak fixes
   d) Wainer's maybe unitialized fix
   e) Markus's parameter fixes

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

----------------------------------------------------------------
Andrey Gruzdev (5):
      migration: introduce 'background-snapshot' migration capability
      migration: introduce UFFD-WP low-level interface helpers
      migration: support UFFD write fault processing in ram_save_iterate()
      migration: implementation of background snapshot thread
      migration: introduce 'userfaultfd-wrlat.py' script

Daniel P. Berrangé (11):
      block: push error reporting into bdrv_all_*_snapshot functions
      migration: stop returning errno from load_snapshot()
      block: add ability to specify list of blockdevs during snapshot
      block: allow specifying name of block device for vmstate storage
      block: rename and alter bdrv_all_find_snapshot semantics
      migration: control whether snapshots are ovewritten
      migration: wire up support for snapshot device selection
      migration: introduce a delete_snapshot wrapper
      iotests: add support for capturing and matching QMP events
      iotests: fix loading of common.config from tests/ subdir
      migration: introduce snapshot-{save, load, delete} QMP commands

Dr. David Alan Gilbert (2):
      migration: Add blocker information
      migration: Display the migration blockers

Jinhao Gao (3):
      spapr_pci: Fix memory leak of vmstate_spapr_pci
      savevm: Fix memory leak of vmstate_configuration
      vmstate: Fix memory leak in vmstate_handle_alloc()

Markus Armbruster (4):
      migration: Fix migrate-set-parameters argument validation
      migration: Clean up signed vs. unsigned XBZRLE cache-size
      migration: Fix cache_init()'s "Failed to allocate" error messages
      migration: Fix a few absurdly defective error messages

Philippe Mathieu-Daudé (1):
      migration: Make save_snapshot() return bool, not 0/-1

Wainer dos Santos Moschetta (1):
      migration/qemu-file: Fix maybe uninitialized on qemu_get_buffer_in_place()

 block/monitor/block-hmp-cmds.c |   7 +-
 block/snapshot.c               | 256 ++++++++++++++++++--------
 hw/ppc/spapr_pci.c             |  11 ++
 include/block/snapshot.h       |  23 ++-
 include/exec/memory.h          |   8 +
 include/migration/snapshot.h   |  47 ++++-
 include/qemu/userfaultfd.h     |  35 ++++
 migration/migration.c          | 409 +++++++++++++++++++++++++++++++++++++++--
 migration/migration.h          |   6 +-
 migration/page_cache.c         |   8 +-
 migration/page_cache.h         |   2 +-
 migration/qemu-file.c          |   2 +-
 migration/ram.c                | 305 +++++++++++++++++++++++++++++-
 migration/ram.h                |   8 +-
 migration/savevm.c             | 341 +++++++++++++++++++++++++++++-----
 migration/savevm.h             |   3 +
 migration/trace-events         |   2 +
 migration/vmstate.c            |   1 +
 monitor/hmp-cmds.c             |  45 +++--
 qapi/job.json                  |   9 +-
 qapi/migration.json            | 218 ++++++++++++++++++++--
 replay/replay-debugging.c      |  12 +-
 replay/replay-snapshot.c       |   5 +-
 scripts/userfaultfd-wrlat.py   | 122 ++++++++++++
 softmmu/vl.c                   |   2 +-
 tests/qemu-iotests/267.out     |  12 +-
 tests/qemu-iotests/common.qemu | 106 ++++++++++-
 tests/qemu-iotests/common.rc   |  10 +-
 util/meson.build               |   1 +
 util/trace-events              |   9 +
 util/userfaultfd.c             | 345 ++++++++++++++++++++++++++++++++++
 31 files changed, 2145 insertions(+), 225 deletions(-)
 create mode 100644 include/qemu/userfaultfd.h
 create mode 100755 scripts/userfaultfd-wrlat.py
 create mode 100644 util/userfaultfd.c


Re: [PULL 00/27] migration queue
Posted by Peter Maydell 3 years, 3 months ago
On Thu, 4 Feb 2021 at 17:16, Dr. David Alan Gilbert (git)
<dgilbert@redhat.com> wrote:
>
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> The following changes since commit 1ba089f2255bfdb071be3ce6ac6c3069e8012179:
>
>   Merge remote-tracking branch 'remotes/armbru/tags/pull-qmp-2021-02-04' into staging (2021-02-04 14:15:35 +0000)
>
> are available in the Git repository at:
>
>   git://github.com/dagrh/qemu.git tags/pull-migration-20210204a
>
> for you to fetch changes up to ef74d46576a9e5aff96f285b74150f341a525688:
>
>   migration: introduce snapshot-{save, load, delete} QMP commands (2021-02-04 16:29:03 +0000)
>
> ----------------------------------------------------------------
> Migration pull 2020-02-04
>
>  New snapshot features:
>    a) Andrey's RAM snapshot feature using userfault-wp
>    b) Dan's native-QMP snapshots
>
> Cleanups:
>    c) Jinhao's memory leeak fixes
>    d) Wainer's maybe unitialized fix
>    e) Markus's parameter fixes
>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

Fails iotest 267 on ppc64 host:
  TEST   iotest-qcow2: 267 [fail]
QEMU          --
"/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-system-ppc64"
-nodefaults -display none -accel q
test
QEMU_IMG      -- "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-img"
QEMU_IO       --
"/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-io" --cache
writeback --aio threads -f qcow2
QEMU_NBD      -- "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-nbd"
IMGFMT        -- qcow2
IMGPROTO      -- file
PLATFORM      -- Linux/ppc64 gcc1-power7.osuosl.org 3.10.0-862.14.4.el7.ppc64
TEST_DIR      -- /home/pm215/qemu/build/all/tests/qemu-iotests/scratch
SOCK_DIR      -- /tmp/tmpea7m6_b4
SOCKET_SCM_HELPER --
/home/pm215/qemu/build/all/tests/qemu-iotests/socket_scm_helper
--- /home/pm215/qemu/tests/qemu-iotests/267.out
+++ 267.out.bad
@@ -36,7 +36,9 @@
 ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
 --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
 (qemu) loadvm snap0
-(qemu) quit
+./common.rc: line 163: 24600 Segmentation fault      ( if [ -n
"${QEMU_NEED_PID}" ]; then
+    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
+fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
"${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )

 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
 Testing: -drive driver=IMGFMT,file=TEST_DIR/t.IMGFMT,if=none -device
virtio-blk,drive=none0
@@ -47,7 +49,9 @@
 ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
 --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
 (qemu) loadvm snap0
-(qemu) quit
+./common.rc: line 163: 24653 Segmentation fault      ( if [ -n
"${QEMU_NEED_PID}" ]; then
+    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
+fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
"${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )


 === -drive if=virtio ===
@@ -72,7 +76,9 @@
 ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
 --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
 (qemu) loadvm snap0
-(qemu) quit
+./common.rc: line 163: 24760 Segmentation fault      ( if [ -n
"${QEMU_NEED_PID}" ]; then
+    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
+fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
"${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )


 === Simple -blockdev ===
@@ -97,7 +103,9 @@
 ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
 --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
 (qemu) loadvm snap0
-(qemu) quit
+./common.rc: line 163: 24866 Segmentation fault      ( if [ -n
"${QEMU_NEED_PID}" ]; then
+    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
+fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
"${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )

 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
 Testing: -blockdev
driver=file,filename=TEST_DIR/t.IMGFMT,node-name=file -blockdev
driver=raw,file=file,node-name=raw -blockdev
driver=IMGFMT,file=raw,node-name=fmt
@@ -108,7 +116,9 @@
 ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
 --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
 (qemu) loadvm snap0
-(qemu) quit
+./common.rc: line 163: 24919 Segmentation fault      ( if [ -n
"${QEMU_NEED_PID}" ]; then
+    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
+fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
"${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )


 === -blockdev with a filter on top ===
@@ -122,7 +132,9 @@
 ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
 --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
 (qemu) loadvm snap0
-(qemu) quit
+./common.rc: line 163: 24972 Segmentation fault      ( if [ -n
"${QEMU_NEED_PID}" ]; then
+    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
+fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
"${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )


 === -blockdev with a backing file ===
@@ -137,7 +149,9 @@
 ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
 --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
 (qemu) loadvm snap0
-(qemu) quit
+./common.rc: line 163: 25056 Segmentation fault      ( if [ -n
"${QEMU_NEED_PID}" ]; then
+    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
+fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
"${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )

 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT
 Testing: -blockdev
driver=file,filename=TEST_DIR/t.IMGFMT.base,node-name=backing-file
-blockdev driver=IMGFMT,file=backing-file,node-name=backing-fmt
-blockdev driver=file,filename=TEST_DIR/t.IMGFMT,node-name=file
-blockdev driver=IMGFMT,file=file,backing=backing-fmt,node-name=fmt
@@ -148,7 +162,9 @@
 ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
 --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
 (qemu) loadvm snap0
-(qemu) quit
+./common.rc: line 163: 25109 Segmentation fault      ( if [ -n
"${QEMU_NEED_PID}" ]; then
+    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
+fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
"${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )

 Internal snapshots on overlay:
 Snapshot list:
@@ -169,7 +185,9 @@
 ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
 --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
 (qemu) loadvm snap0
-(qemu) quit
+./common.rc: line 163: 25179 Segmentation fault      ( if [ -n
"${QEMU_NEED_PID}" ]; then
+    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
+fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
"${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )

 Internal snapshots on overlay:
 Snapshot list:
  TEST   iotest-qcow2: 268


thanks
-- PMM

Re: [PULL 00/27] migration queue
Posted by Dr. David Alan Gilbert 3 years, 3 months ago
* Peter Maydell (peter.maydell@linaro.org) wrote:
> On Thu, 4 Feb 2021 at 17:16, Dr. David Alan Gilbert (git)
> <dgilbert@redhat.com> wrote:
> >
> > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> >
> > The following changes since commit 1ba089f2255bfdb071be3ce6ac6c3069e8012179:
> >
> >   Merge remote-tracking branch 'remotes/armbru/tags/pull-qmp-2021-02-04' into staging (2021-02-04 14:15:35 +0000)
> >
> > are available in the Git repository at:
> >
> >   git://github.com/dagrh/qemu.git tags/pull-migration-20210204a
> >
> > for you to fetch changes up to ef74d46576a9e5aff96f285b74150f341a525688:
> >
> >   migration: introduce snapshot-{save, load, delete} QMP commands (2021-02-04 16:29:03 +0000)
> >
> > ----------------------------------------------------------------
> > Migration pull 2020-02-04
> >
> >  New snapshot features:
> >    a) Andrey's RAM snapshot feature using userfault-wp
> >    b) Dan's native-QMP snapshots
> >
> > Cleanups:
> >    c) Jinhao's memory leeak fixes
> >    d) Wainer's maybe unitialized fix
> >    e) Markus's parameter fixes
> >
> > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> 
> Fails iotest 267 on ppc64 host:
>   TEST   iotest-qcow2: 267 [fail]

Hmm sorry about that; I'll attack it next week.

Dave

> QEMU          --
> "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-system-ppc64"
> -nodefaults -display none -accel q
> test
> QEMU_IMG      -- "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-img"
> QEMU_IO       --
> "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-io" --cache
> writeback --aio threads -f qcow2
> QEMU_NBD      -- "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-nbd"
> IMGFMT        -- qcow2
> IMGPROTO      -- file
> PLATFORM      -- Linux/ppc64 gcc1-power7.osuosl.org 3.10.0-862.14.4.el7.ppc64
> TEST_DIR      -- /home/pm215/qemu/build/all/tests/qemu-iotests/scratch
> SOCK_DIR      -- /tmp/tmpea7m6_b4
> SOCKET_SCM_HELPER --
> /home/pm215/qemu/build/all/tests/qemu-iotests/socket_scm_helper
> --- /home/pm215/qemu/tests/qemu-iotests/267.out
> +++ 267.out.bad
> @@ -36,7 +36,9 @@
>  ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
>  --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
>  (qemu) loadvm snap0
> -(qemu) quit
> +./common.rc: line 163: 24600 Segmentation fault      ( if [ -n
> "${QEMU_NEED_PID}" ]; then
> +    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
> +fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
> "${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )
> 
>  Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
>  Testing: -drive driver=IMGFMT,file=TEST_DIR/t.IMGFMT,if=none -device
> virtio-blk,drive=none0
> @@ -47,7 +49,9 @@
>  ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
>  --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
>  (qemu) loadvm snap0
> -(qemu) quit
> +./common.rc: line 163: 24653 Segmentation fault      ( if [ -n
> "${QEMU_NEED_PID}" ]; then
> +    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
> +fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
> "${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )
> 
> 
>  === -drive if=virtio ===
> @@ -72,7 +76,9 @@
>  ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
>  --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
>  (qemu) loadvm snap0
> -(qemu) quit
> +./common.rc: line 163: 24760 Segmentation fault      ( if [ -n
> "${QEMU_NEED_PID}" ]; then
> +    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
> +fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
> "${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )
> 
> 
>  === Simple -blockdev ===
> @@ -97,7 +103,9 @@
>  ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
>  --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
>  (qemu) loadvm snap0
> -(qemu) quit
> +./common.rc: line 163: 24866 Segmentation fault      ( if [ -n
> "${QEMU_NEED_PID}" ]; then
> +    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
> +fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
> "${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )
> 
>  Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
>  Testing: -blockdev
> driver=file,filename=TEST_DIR/t.IMGFMT,node-name=file -blockdev
> driver=raw,file=file,node-name=raw -blockdev
> driver=IMGFMT,file=raw,node-name=fmt
> @@ -108,7 +116,9 @@
>  ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
>  --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
>  (qemu) loadvm snap0
> -(qemu) quit
> +./common.rc: line 163: 24919 Segmentation fault      ( if [ -n
> "${QEMU_NEED_PID}" ]; then
> +    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
> +fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
> "${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )
> 
> 
>  === -blockdev with a filter on top ===
> @@ -122,7 +132,9 @@
>  ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
>  --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
>  (qemu) loadvm snap0
> -(qemu) quit
> +./common.rc: line 163: 24972 Segmentation fault      ( if [ -n
> "${QEMU_NEED_PID}" ]; then
> +    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
> +fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
> "${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )
> 
> 
>  === -blockdev with a backing file ===
> @@ -137,7 +149,9 @@
>  ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
>  --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
>  (qemu) loadvm snap0
> -(qemu) quit
> +./common.rc: line 163: 25056 Segmentation fault      ( if [ -n
> "${QEMU_NEED_PID}" ]; then
> +    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
> +fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
> "${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )
> 
>  Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
> backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT
>  Testing: -blockdev
> driver=file,filename=TEST_DIR/t.IMGFMT.base,node-name=backing-file
> -blockdev driver=IMGFMT,file=backing-file,node-name=backing-fmt
> -blockdev driver=file,filename=TEST_DIR/t.IMGFMT,node-name=file
> -blockdev driver=IMGFMT,file=file,backing=backing-fmt,node-name=fmt
> @@ -148,7 +162,9 @@
>  ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
>  --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
>  (qemu) loadvm snap0
> -(qemu) quit
> +./common.rc: line 163: 25109 Segmentation fault      ( if [ -n
> "${QEMU_NEED_PID}" ]; then
> +    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
> +fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
> "${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )
> 
>  Internal snapshots on overlay:
>  Snapshot list:
> @@ -169,7 +185,9 @@
>  ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
>  --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
>  (qemu) loadvm snap0
> -(qemu) quit
> +./common.rc: line 163: 25179 Segmentation fault      ( if [ -n
> "${QEMU_NEED_PID}" ]; then
> +    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
> +fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
> "${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )
> 
>  Internal snapshots on overlay:
>  Snapshot list:
>   TEST   iotest-qcow2: 268
> 
> 
> thanks
> -- PMM
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


Re: [PULL 00/27] migration queue
Posted by Dr. David Alan Gilbert 3 years, 2 months ago
* Peter Maydell (peter.maydell@linaro.org) wrote:
> On Thu, 4 Feb 2021 at 17:16, Dr. David Alan Gilbert (git)
> <dgilbert@redhat.com> wrote:
> >
> > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> >
> > The following changes since commit 1ba089f2255bfdb071be3ce6ac6c3069e8012179:
> >
> >   Merge remote-tracking branch 'remotes/armbru/tags/pull-qmp-2021-02-04' into staging (2021-02-04 14:15:35 +0000)
> >
> > are available in the Git repository at:
> >
> >   git://github.com/dagrh/qemu.git tags/pull-migration-20210204a
> >
> > for you to fetch changes up to ef74d46576a9e5aff96f285b74150f341a525688:
> >
> >   migration: introduce snapshot-{save, load, delete} QMP commands (2021-02-04 16:29:03 +0000)
> >
> > ----------------------------------------------------------------
> > Migration pull 2020-02-04
> >
> >  New snapshot features:
> >    a) Andrey's RAM snapshot feature using userfault-wp
> >    b) Dan's native-QMP snapshots
> >
> > Cleanups:
> >    c) Jinhao's memory leeak fixes
> >    d) Wainer's maybe unitialized fix
> >    e) Markus's parameter fixes
> >
> > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> 
> Fails iotest 267 on ppc64 host:
>   TEST   iotest-qcow2: 267 [fail]

OK, found it - I'll work up a new pull.

Dave

> QEMU          --
> "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-system-ppc64"
> -nodefaults -display none -accel q
> test
> QEMU_IMG      -- "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-img"
> QEMU_IO       --
> "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-io" --cache
> writeback --aio threads -f qcow2
> QEMU_NBD      -- "/home/pm215/qemu/build/all/tests/qemu-iotests/../../qemu-nbd"
> IMGFMT        -- qcow2
> IMGPROTO      -- file
> PLATFORM      -- Linux/ppc64 gcc1-power7.osuosl.org 3.10.0-862.14.4.el7.ppc64
> TEST_DIR      -- /home/pm215/qemu/build/all/tests/qemu-iotests/scratch
> SOCK_DIR      -- /tmp/tmpea7m6_b4
> SOCKET_SCM_HELPER --
> /home/pm215/qemu/build/all/tests/qemu-iotests/socket_scm_helper
> --- /home/pm215/qemu/tests/qemu-iotests/267.out
> +++ 267.out.bad
> @@ -36,7 +36,9 @@
>  ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
>  --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
>  (qemu) loadvm snap0
> -(qemu) quit
> +./common.rc: line 163: 24600 Segmentation fault      ( if [ -n
> "${QEMU_NEED_PID}" ]; then
> +    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
> +fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
> "${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )
> 
>  Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
>  Testing: -drive driver=IMGFMT,file=TEST_DIR/t.IMGFMT,if=none -device
> virtio-blk,drive=none0
> @@ -47,7 +49,9 @@
>  ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
>  --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
>  (qemu) loadvm snap0
> -(qemu) quit
> +./common.rc: line 163: 24653 Segmentation fault      ( if [ -n
> "${QEMU_NEED_PID}" ]; then
> +    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
> +fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
> "${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )
> 
> 
>  === -drive if=virtio ===
> @@ -72,7 +76,9 @@
>  ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
>  --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
>  (qemu) loadvm snap0
> -(qemu) quit
> +./common.rc: line 163: 24760 Segmentation fault      ( if [ -n
> "${QEMU_NEED_PID}" ]; then
> +    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
> +fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
> "${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )
> 
> 
>  === Simple -blockdev ===
> @@ -97,7 +103,9 @@
>  ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
>  --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
>  (qemu) loadvm snap0
> -(qemu) quit
> +./common.rc: line 163: 24866 Segmentation fault      ( if [ -n
> "${QEMU_NEED_PID}" ]; then
> +    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
> +fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
> "${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )
> 
>  Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
>  Testing: -blockdev
> driver=file,filename=TEST_DIR/t.IMGFMT,node-name=file -blockdev
> driver=raw,file=file,node-name=raw -blockdev
> driver=IMGFMT,file=raw,node-name=fmt
> @@ -108,7 +116,9 @@
>  ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
>  --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
>  (qemu) loadvm snap0
> -(qemu) quit
> +./common.rc: line 163: 24919 Segmentation fault      ( if [ -n
> "${QEMU_NEED_PID}" ]; then
> +    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
> +fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
> "${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )
> 
> 
>  === -blockdev with a filter on top ===
> @@ -122,7 +132,9 @@
>  ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
>  --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
>  (qemu) loadvm snap0
> -(qemu) quit
> +./common.rc: line 163: 24972 Segmentation fault      ( if [ -n
> "${QEMU_NEED_PID}" ]; then
> +    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
> +fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
> "${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )
> 
> 
>  === -blockdev with a backing file ===
> @@ -137,7 +149,9 @@
>  ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
>  --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
>  (qemu) loadvm snap0
> -(qemu) quit
> +./common.rc: line 163: 25056 Segmentation fault      ( if [ -n
> "${QEMU_NEED_PID}" ]; then
> +    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
> +fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
> "${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )
> 
>  Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
> backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT
>  Testing: -blockdev
> driver=file,filename=TEST_DIR/t.IMGFMT.base,node-name=backing-file
> -blockdev driver=IMGFMT,file=backing-file,node-name=backing-fmt
> -blockdev driver=file,filename=TEST_DIR/t.IMGFMT,node-name=file
> -blockdev driver=IMGFMT,file=file,backing=backing-fmt,node-name=fmt
> @@ -148,7 +162,9 @@
>  ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
>  --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
>  (qemu) loadvm snap0
> -(qemu) quit
> +./common.rc: line 163: 25109 Segmentation fault      ( if [ -n
> "${QEMU_NEED_PID}" ]; then
> +    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
> +fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
> "${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )
> 
>  Internal snapshots on overlay:
>  Snapshot list:
> @@ -169,7 +185,9 @@
>  ID        TAG               VM SIZE                DATE     VM CLOCK     ICOUNT
>  --        snap0                SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000
>  (qemu) loadvm snap0
> -(qemu) quit
> +./common.rc: line 163: 25179 Segmentation fault      ( if [ -n
> "${QEMU_NEED_PID}" ]; then
> +    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
> +fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec
> "${VALGRIND_LOGFILE}" "$QEMU_PROG" $QEMU_OPTIONS "$@" )
> 
>  Internal snapshots on overlay:
>  Snapshot list:
>   TEST   iotest-qcow2: 268
> 
> 
> thanks
> -- PMM
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK