Acceptance Tests: migration fails on sparc target

Bug #1922611 reported by Cleber Rosa
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Undecided
Unassigned

Bug Description

QEMU fails migration when using a sparc target.

This cab be verified/reproduced with the `tests/acceptance/migration.py` test. Running it with:

 $ make check-venv
 $ ./tests/venv/bin/avocado --show=test run -p qemu_bin=./qemu-system-sparc tests/acceptance/migration.py:Migration.test_migration_with_tcp_localhost

Right after a QMP `query-migrate` is executed, communication with the monitor is lost:

>>> {'execute': 'query-migrate'}
<<< {'timestamp': {'seconds': 1617667984, 'microseconds': 330282}, 'event': 'STOP'}
<<< {'return': {'blocked': False, 'status': 'completed', 'setup-time': 0, 'downtime': 1, 'total-time': 15, 'ram': {'total': 135274496, 'postcopy-requests': 0, 'dirty-sync-count': 2, 'multifd-bytes': 0, 'pages-per-second': 0, 'page-size': 4096, 'remaining': 0, 'mbps': 301.2234666666667, 'transferred': 528703, 'duplicate': 33202, 'dirty-pages-rate': 0, 'skipped': 0, 'normal-bytes': 229376, 'normal': 56}}}
>>> {'execute': 'query-migrate'}

Reproduced traceback from: /var/lib/users/cleber/build/qemu/tests/venv/lib64/python3.7/site-packages/avocado/core/test.py:756
Traceback (most recent call last):
  File "/var/lib/users/cleber/build/qemu/tests/acceptance/migration.py", line 80, in test_migration_with_tcp_localhost
    self.do_migrate(dest_uri)
  File "/var/lib/users/cleber/build/qemu/tests/acceptance/migration.py", line 69, in do_migrate
    self.assert_migration(source_vm, dest_vm)
  File "/var/lib/users/cleber/build/qemu/tests/acceptance/migration.py", line 41, in assert_migration
    args=(dst_vm,))
  File "/var/lib/users/cleber/build/qemu/tests/venv/lib64/python3.7/site-packages/avocado/utils/wait.py", line 34, in wait_for
    output = func(*args, **kwargs)
  File "/var/lib/users/cleber/build/qemu/tests/acceptance/migration.py", line 31, in migration_finished
    return vm.command('query-migrate')['status'] in ('completed', 'failed')
  File "/home/cleber/src/qemu/python/qemu/machine.py", line 572, in command
    return self._qmp.command(cmd, **qmp_args)
  File "/home/cleber/src/qemu/python/qemu/qmp.py", line 284, in command
    ret = self.cmd(cmd, kwds)
  File "/home/cleber/src/qemu/python/qemu/qmp.py", line 278, in cmd
    return self.cmd_obj(qmp_cmd)
  File "/home/cleber/src/qemu/python/qemu/qmp.py", line 256, in cmd_obj
    self.__sock.sendall(json.dumps(qmp_cmd).encode('utf-8'))
BrokenPipeError: [Errno 32] Broken pipe

The qemu-system-sparc binary outputs:

 qemu-system-sparc: warning: nic lance.0 has no peer
 qemu-system-sparc: Missing section footer for sysbusespscsi
 qemu-system-sparc: load of migration failed: Invalid argument

Revision history for this message
Philippe Mathieu-Daudé (philmd) wrote :

6cc88d6bf932a905ce36e933dc078eeb6b54ac92 is the first bad commit:

commit 6cc88d6bf932a905ce36e933dc078eeb6b54ac92
Author: Mark Cave-Ayland <email address hidden>
Date: Thu Mar 4 22:10:34 2021 +0000

    esp: remove dma_left from ESPState

Revision history for this message
Mark Cave-Ayland (mark-cave-ayland) wrote :

This should be fixed by the following patch:

https://lists.gnu.org/archive/html/qemu-devel/2021-04/msg00860.html

Revision history for this message
Cleber Rosa (cleber-gnu) wrote :

I can confirm this bug has been fixed. Relevant test output:

VM launch command: './qemu-system-sparc -display none -vga none -chardev socket,id=mon,path=/tmp/avo_qemu_sock_g0w15g26/qemu-1672256-monitor.sock -mon chardev=mon,mode=control -incoming tcp:localhost:53800 -nodefaults'
>>> {'execute': 'qmp_capabilities'}
<<< {'return': {}}
VM launch command: './qemu-system-sparc -display none -vga none -chardev socket,id=mon,path=/tmp/avo_qemu_sock_ajodgya5/qemu-1672256-monitor.sock -mon chardev=mon,mode=control -nodefaults'
>>> {'execute': 'qmp_capabilities'}
<<< {'return': {}}
>>> {'execute': 'migrate', 'arguments': {'uri': 'tcp:localhost:53800'}}
<<< {'return': {}}
>>> {'execute': 'query-migrate'}
<<< {'return': {'blocked': False, 'status': 'setup'}}
>>> {'execute': 'query-migrate'}
<<< {'timestamp': {'seconds': 1618444112, 'microseconds': 790928}, 'event': 'STOP'}
<<< {'return': {'blocked': False, 'status': 'completed', 'setup-time': 1, 'downtime': 1, 'total-time': 17, 'ram': {'total': 135274496, 'postcopy-requests': 0, 'dirty-sync-count': 2, 'multifd-bytes': 0, 'pages-per-second': 0, 'page-size': 4096, 'remaining': 0, 'mbps': 282.253, 'transferred': 528415, 'duplicate': 33170, 'dirty-pages-rate': 0, 'skipped': 0, 'normal-bytes': 229376, 'normal': 56}}}
>>> {'execute': 'query-migrate'}
<<< {'timestamp': {'seconds': 1618444112, 'microseconds': 792061}, 'event': 'RESUME'}
<<< {'return': {'blocked': False, 'status': 'completed'}}
>>> {'execute': 'query-migrate'}
<<< {'return': {'blocked': False, 'status': 'completed', 'setup-time': 1, 'downtime': 1, 'total-time': 17, 'ram': {'total': 135274496, 'postcopy-requests': 0, 'dirty-sync-count': 2, 'multifd-bytes': 0, 'pages-per-second': 0, 'page-size': 4096, 'remaining': 0, 'mbps': 282.253, 'transferred': 528415, 'duplicate': 33170, 'dirty-pages-rate': 0, 'skipped': 0, 'normal-bytes': 229376, 'normal': 56}}}
>>> {'execute': 'query-migrate'}
<<< {'return': {'blocked': False, 'status': 'completed'}}
>>> {'execute': 'query-status'}
<<< {'return': {'status': 'running', 'singlestep': False, 'running': True}}
>>> {'execute': 'query-status'}
<<< {'return': {'status': 'postmigrate', 'singlestep': False, 'running': False}}
>>> {'execute': 'quit'}
<<< {'return': {}}
>>> {'execute': 'quit'}
<<< {'return': {}}
DATA (filename=output.expected) => NOT FOUND (data sources: variant, test, file)
DATA (filename=stdout.expected) => NOT FOUND (data sources: variant, test, file)
DATA (filename=stderr.expected) => NOT FOUND (data sources: variant, test, file)
PASS 1-tests/acceptance/migration.py:Migration.test_migration_with_tcp_localhost

Changed in qemu:
status: New → Fix Committed
Thomas Huth (th-huth)
Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers