[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [question] qemu abort when object-add is called with an already used
From: |
Daniel P . Berrangé |
Subject: |
Re: [question] qemu abort when object-add is called with an already used id |
Date: |
Thu, 18 Jun 2020 18:12:54 +0100 |
User-agent: |
Mutt/1.14.0 (2020-05-02) |
On Thu, Jun 18, 2020 at 06:15:57PM +0200, Auger Eric wrote:
> Hi,
>
> While testing PCDIMM hotplug/coldplug I noted qemu aborts if we attempt
> to add from the QMP monitor an object whose id is already in use.
>
> for instance
> object-add qom-type=memory-backend-ram id=mem1 props.size=4294967296
> while mem1 is already used.
>
> We get:
> Unexpected error in object_property_try_add() at qom/object.c:1167:
> attempt to add duplicate property 'mem1' to object (type 'container')
>
> This is due to the fact &error_abort is passed to object_property_try_add().
>
> Is it the expected behavior?
No, this is highly undesirable. A user/mgmt app mistake in reusing a
property ID shouldn't result in loss of the entire running VM and the
user's live data within.
We must gracefully report the error back to the QMP client.
error_abort should really only be used in scenarios which are
not expected to happen in real world. eg it is more like an
assert() in terms of where it should be used.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|