qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC 6/6] device-crash-test: Multi-device device_add te


From: Thomas Huth
Subject: Re: [Qemu-devel] [RFC 6/6] device-crash-test: Multi-device device_add test
Date: Wed, 27 Sep 2017 13:17:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 27.09.2017 01:07, Eduardo Habkost wrote:
> When running device_add tests, test all devices in a single run
> instead of restarting QEMU every time.
> 
> There's a plug_all testcase argument that can be used to make the
> test code plug all devices at once.  I'm adding this mode because
> there's a crash that was detected while testing the script
> without any device_del command, but the crash goes away if we
> device_del every device immediately:
> 
>   $ ../scripts/device-crash-test ./x86_64-softmmu/qemu-system-x86_64 --quick 
> -t method=device_add  --strict -t plug_all=1
>   INFO: running test case: binary=./x86_64-softmmu/qemu-system-x86_64 
> plug_all=1 accel=kvm machine=pc-0.12 device=* method=device_add
>   WARNING: qemu received signal -6: ./x86_64-softmmu/qemu-system-x86_64 
> -chardev socket,id=mon,path=/var/tmp/qemu-23578-monitor.sock -mon 
> chardev=mon,mode=control -display none -vga none -S -machine pc-0.12,accel=kvm
>   ERROR: result: binary=./x86_64-softmmu/qemu-system-x86_64 plug_all=1 
> accel=kvm machine=pc-0.12 device=* method=device_add
>   ERROR: cmdline: ./x86_64-softmmu/qemu-system-x86_64 -S -machine 
> pc-0.12,accel=kvm
>   ERROR: log: audio: Could not init `oss' audio driver
>   ERROR: log: qemu-system-x86_64: .../qemu/migration/savevm.c:721: 
> vmstate_register_with_alias_id: Assertion `!se->compat || se->instance_id == 
> 0' failed.
>   ERROR: last device_add device: usb-net

FWIW, I've seen similar crashes while working on my HMP device_add
tester, when I skipped the device_del and plugged-in the devices a
couple of times instead. I think this happens because some devices are
doing a vmstate_register() in their instance_init() or realize()
function, instead of using dc->vmsd as they should. However, with the
git master branch as of today (31bc1d8481af414cfa2857f905e), I am
currently not able anymore to reproduce the problem with the HMP
device_add tester, so one of the recent "set user_creatable = false"
patches might have fixed the issue for me already...

 Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]