Skip to contentSkip to conversation

QEMU iotest 267 failure / assertion in migration code

PATCH Thomas Huth 2 participants 3 messages Jan 18, 2023 – Jan 20, 2023

lore
Share & tools
lore
#0 lore raw

Hi!

I just ran "make check" in a build directory where I did not compile qemu-system-x86_64, and got a failure with iotest 267.

Re-running the "check" script directly got me some more information:

$ ./check -qcow2 267
QEMU          -- "/tmp/qemu/tests/qemu-iotests/../../qemu-system-alpha" -nodefaults -display none -accel qtest
QEMU_IMG      -- "/tmp/qemu/tests/qemu-iotests/../../qemu-img"
QEMU_IO       -- "/tmp/qemu/tests/qemu-iotests/../../qemu-io" --cache writeback --aio threads -f qcow2
QEMU_NBD      -- "/tmp/qemu/tests/qemu-iotests/../../qemu-nbd"
IMGFMT        -- qcow2
IMGPROTO      -- file
PLATFORM      -- Linux/x86_64 thuth 4.18.0-425.3.1.el8.x86_64
TEST_DIR      -- /tmp/qemu/tests/qemu-iotests/scratch
SOCK_DIR      -- /tmp/tmp_qbcjhsu
GDB_OPTIONS   --
VALGRIND_QEMU --
PRINT_QEMU_OUTPUT --

267 fail [18:39:41] [18:39:44] 3.5s output mismatch (see /tmp/qemu/tests/qemu-iotests/scratch/267.out.bad)

tmp/qemu/tests/qemu-iotests/scratch/267.out.bad renamed from qemu/tests/qemu-iotests/267.out +6 -6
@@ -31,23 +31,23 @@
 Testing: -drive driver=IMGFMT,file=TEST_DIR/t.IMGFMT,if=none
 QEMU X.Y.Z monitor - type 'help' for more information
 (qemu) savevm snap0
-(qemu) info snapshots
-List of snapshots present on all disks:
-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
+QEMU_PROG: ../../qemu/migration/ram.c:874: pss_find_next_dirty: Assertion `pss->host_page_end' failed.
+./common.rc: line 181: 1903770 Aborted                 (core dumped) ( if [ -n "${QEMU_NEED_PID}" ]; then
+    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
+fi; GDB=""; if [ -n "${GDB_OPTIONS}" ]; then
+    GDB="gdbserver ${GDB_OPTIONS}";
+fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec "${VALGRIND_LOGFILE}" $GDB "$QEMU_PROG" $QEMU_OPTIONS "$@" )
 
 

Looks like this test does not work if the main machine of the selected QEMU binary does not support migration?

Should we remove this test from the "auto" group?

Anyway, QEMU should also not trigger an assertion, so this sounds like another bug?

Thomas

#1 lore raw
Quoted 28 lines · * Thomas Huth ([email protected]) wrote:

Hi!

I just ran "make check" in a build directory where I did not compile qemu-system-x86_64, and got a failure with iotest 267.

Re-running the "check" script directly got me some more information:

$ ./check -qcow2 267
QEMU          -- "/tmp/qemu/tests/qemu-iotests/../../qemu-system-alpha" -nodefaults -display none -accel qtest
QEMU_IMG      -- "/tmp/qemu/tests/qemu-iotests/../../qemu-img"
QEMU_IO       -- "/tmp/qemu/tests/qemu-iotests/../../qemu-io" --cache writeback --aio threads -f qcow2
QEMU_NBD      -- "/tmp/qemu/tests/qemu-iotests/../../qemu-nbd"
IMGFMT        -- qcow2
IMGPROTO      -- file
PLATFORM      -- Linux/x86_64 thuth 4.18.0-425.3.1.el8.x86_64
TEST_DIR      -- /tmp/qemu/tests/qemu-iotests/scratch
SOCK_DIR      -- /tmp/tmp_qbcjhsu
GDB_OPTIONS   --
VALGRIND_QEMU --
PRINT_QEMU_OUTPUT --

267 fail [18:39:41] [18:39:44] 3.5s output mismatch (see /tmp/qemu/tests/qemu-iotests/scratch/267.out.bad)

tmp/qemu/tests/qemu-iotests/scratch/267.out.bad line 34

Quoted 10 lines
tmp/qemu/tests/qemu-iotests/scratch/267.out.bad renamed from qemu/tests/qemu-iotests/267.out +1 -6
@@ -31,23 +31,23 @@
 Testing: -drive driver=IMGFMT,file=TEST_DIR/t.IMGFMT,if=none
 QEMU X.Y.Z monitor - type 'help' for more information
 (qemu) savevm snap0
-(qemu) info snapshots
-List of snapshots present on all disks:
-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
+QEMU_PROG: ../../qemu/migration/ram.c:874: pss_find_next_dirty: Assertion `pss->host_page_end' failed.

I don't understand how that can trigger - it needs investigating as a bug.

Quoted 9 lines
tmp/qemu/tests/qemu-iotests/scratch/267.out.bad renamed from qemu/tests/qemu-iotests/267.out +5 -0
+./common.rc: line 181: 1903770 Aborted                 (core dumped) ( if [ -n "${QEMU_NEED_PID}" ]; then
+    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
+fi; GDB=""; if [ -n "${GDB_OPTIONS}" ]; then
+    GDB="gdbserver ${GDB_OPTIONS}";
+fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec "${VALGRIND_LOGFILE}" $GDB "$QEMU_PROG" $QEMU_OPTIONS "$@" )
 
 

Looks like this test does not work if the main machine of the selected QEMU binary does not support migration?

Why doesn't it support migration?

Quoted 4 lines

Should we remove this test from the "auto" group?

Anyway, QEMU should also not trigger an assertion, so this sounds like another bug?

Yeh; that's a weird failure.

(Alpha page size seems to be 8k from what I can tell; which should be fine, if you're running on an x86 host)

Dave

Quoted 2 lines

Thomas

Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK
#2 lore raw
Quoted 34 lines · Dr. David Alan Gilbert
Quoted 33 lines · * Thomas Huth ([email protected]) wrote:

Hi!

I just ran "make check" in a build directory where I did not compile qemu-system-x86_64, and got a failure with iotest 267.

Re-running the "check" script directly got me some more information:

$ ./check -qcow2 267
QEMU          -- "/tmp/qemu/tests/qemu-iotests/../../qemu-system-alpha" -nodefaults -display none -accel qtest
QEMU_IMG      -- "/tmp/qemu/tests/qemu-iotests/../../qemu-img"
QEMU_IO       -- "/tmp/qemu/tests/qemu-iotests/../../qemu-io" --cache writeback --aio threads -f qcow2
QEMU_NBD      -- "/tmp/qemu/tests/qemu-iotests/../../qemu-nbd"
IMGFMT        -- qcow2
IMGPROTO      -- file
PLATFORM      -- Linux/x86_64 thuth 4.18.0-425.3.1.el8.x86_64
TEST_DIR      -- /tmp/qemu/tests/qemu-iotests/scratch
SOCK_DIR      -- /tmp/tmp_qbcjhsu
GDB_OPTIONS   --
VALGRIND_QEMU --
PRINT_QEMU_OUTPUT --

267 fail [18:39:41] [18:39:44] 3.5s output mismatch (see /tmp/qemu/tests/qemu-iotests/scratch/267.out.bad)

tmp/qemu/tests/qemu-iotests/scratch/267.out.bad renamed from qemu/tests/qemu-iotests/267.out +0 -2
@@ -31,23 +31,23 @@
  Testing: -drive driver=IMGFMT,file=TEST_DIR/t.IMGFMT,if=none
  QEMU X.Y.Z monitor - type 'help' for more information
  (qemu) savevm snap0
-(qemu) info snapshots
-List of snapshots present on all disks:
Quoted 8 lines

tmp/qemu/tests/qemu-iotests/scratch/267.out.bad line 34

Quoted 5 lines
tmp/qemu/tests/qemu-iotests/scratch/267.out.bad renamed from qemu/tests/qemu-iotests/267.out +1 -4
-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
+QEMU_PROG: ../../qemu/migration/ram.c:874: pss_find_next_dirty: Assertion `pss->host_page_end' failed.

I don't understand how that can trigger - it needs investigating as a bug.

I've created a ticket so we don't forget:

https://gitlab.com/qemu-project/qemu/-/issues/1456

Quoted 11 lines
Quoted 9 lines
tmp/qemu/tests/qemu-iotests/scratch/267.out.bad renamed from qemu/tests/qemu-iotests/267.out +5 -0
+./common.rc: line 181: 1903770 Aborted                 (core dumped) ( if [ -n "${QEMU_NEED_PID}" ]; then
+    echo $BASHPID > "${QEMU_TEST_DIR}/qemu-${_QEMU_HANDLE}.pid";
+fi; GDB=""; if [ -n "${GDB_OPTIONS}" ]; then
+    GDB="gdbserver ${GDB_OPTIONS}";
+fi; VALGRIND_QEMU="${VALGRIND_QEMU_VM}" _qemu_proc_exec "${VALGRIND_LOGFILE}" $GDB "$QEMU_PROG" $QEMU_OPTIONS "$@" )
 
 

Looks like this test does not work if the main machine of the selected QEMU binary does not support migration?

Why doesn't it support migration?

Hmm, maybe I just got that wrong and it's really just the problem that the qemu-system-alpha is crashing.

Thomas