On 6/2/25 16:18, Daniel P. Berrangé wrote:
> On Mon, Jun 02, 2025 at 03:27:32PM +0200, Michal Privoznik via Devel wrote:
>> From: Michal Privoznik <mpriv...@redhat.com>
>>
>> The virDomainCoreDump() API has VIR_DUMP_LIVE flag which is
>> documented to leave vCPUs running throughout making of the dump
>> of guest memory. Well, this is not the case for QEMU which pauses
>> vCPUs unconditionally (it calls vm_stop() in dump_init()).
>> Document this quirk. And also mention it in 'virsh dump --live'
>> manapage.
> 
> How long does QEMU keep the vCPUs paused for ?  If it is paused for the
> entire duration of the dump, then IMHO it is a libvirt bug to allow
> the VIR_DUMP_LIVE flag to have been set to begin with, rather than
> a behavioural quirk.
> 
> Essentially I'd consider VIR_DUMP_LIVE to mean that the vCPUs are
> running for the time window when the guest memory is being captured.
> 
> If there are small synchronizaiton steps a hypervisor does which
> result in temporarily pausing CPUs for only a fraction of a second
> that is acceptable wrt VIR_DUMP_LIVE semantics.


Unfortunately, it's the former:

2025-06-02 08:44:54.531+0000: 343: info : qemuMonitorIOWrite:339 :
QEMU_MONITOR_IO_WRITE: mon=0x7f9a4c04bcb0
buf={"execute":"dump-guest-memory","arguments":{"paging":false,"protocol":"fd:dump","detach":true},"id":"libvirt-502"}

 len=116 ret=116 errno=0
2025-06-02 08:44:54.532+0000: 343: debug :
qemuMonitorJSONIOProcessLine:193 : Line [{"timestamp": {"seconds":
1748853894, "microseconds": 532565}, "event": "STOP"}]

...

2025-06-02 08:44:55.720+0000: 343: debug :
qemuMonitorJSONIOProcessLine:193 : Line [{"timestamp": {"seconds":
1748853895, "microseconds": 720431}, "event": "DUMP_COMPLETED", "data":
{"result": {"total": 4303486976, "status": "completed", "completed":
4303486976}}}]
2025-06-02 08:44:55.720+0000: 343: info :

....

2025-06-02 08:44:55.720+0000: 343: debug :
qemuProcessHandleDumpCompleted:1645 : Dump completed for domain
0x7f9a401c4bf0 fedora with stats=0x7f9a50ffd760 error='<null>'
2025-06-02 08:44:55.720+0000: 343: debug :
qemuMonitorJSONIOProcessLine:193 : Line [{"timestamp": {"seconds":
1748853895, "microseconds": 720492}, "event": "RESUME"}]
2025-06-02 08:44:55.720+0000: 343: info :

Okay, I'll just make qemu driver refuse the flag.

Thanks!
Michal

Reply via email to