[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: |
Auger Eric |
Subject: |
Re: [question] qemu abort when object-add is called with an already used id |
Date: |
Fri, 19 Jun 2020 17:39:18 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
Hi Daniel,
On 6/18/20 7:12 PM, Daniel P. Berrangé wrote:
> 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.
OK thank you for the confirmation, I will work on this.
Thanks
Eric
>
>
> Regards,
> Daniel
>