On Fri, 2021-07-09 at 12:05 +0200, Michal Prívozník wrote:
> On 7/8/21 4:28 PM, Tim Wiederhake wrote:
>> This simplyfies the code a bit and removes one "goto", one
>> "VIR_FREE",
>> and one "VIR_INSERT_ELEMENT_COPY".
>>
>> Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
>> ---
>> src/qemu/qemu_capabilities.c | 37 ++++++++++++++++++----------------
>> --
>> 1 file changed, 18 insertions(+), 19 deletions(-)
>>
>
> I'm not exactly sure what is causing this, but with this patch libvirtd
> crashes for me when I try to fetch capabilities:
>
> ==16567== Thread 3 rpc-worker:
> ==16567== Invalid read of size 8
> ==16567== at 0x49CB01A: virCapabilitiesFormatGuestXML
> (capabilities.c:1259)
> ==16567== by 0x49CB6AB: virCapabilitiesFormatXML
> (capabilities.c:1355)
> ==16567== by 0xAE898B1: qemuConnectGetCapabilities
> (qemu_driver.c:1316)
> ==16567== by 0x4C47014: virConnectGetCapabilities (libvirt-
> host.c:467)
> ==16567== by 0x1328FD: remoteDispatchConnectGetCapabilities
> (remote_daemon_dispatch_stubs.h:766)
> ==16567== by 0x1328A5: remoteDispatchConnectGetCapabilitiesHelper
> (remote_daemon_dispatch_stubs.h:748)
> ==16567== by 0x4AB4C0F: virNetServerProgramDispatchCall
> (virnetserverprogram.c:428)
> ==16567== by 0x4AB478A: virNetServerProgramDispatch
> (virnetserverprogram.c:302)
> ==16567== by 0x4ABBE71: virNetServerProcessMsg (virnetserver.c:135)
> ==16567== by 0x4ABBF31: virNetServerHandleJob (virnetserver.c:152)
> ==16567== by 0x49AC6D5: virThreadPoolWorker (virthreadpool.c:159)
> ==16567== by 0x49ABBEB: virThreadHelper (virthread.c:241)
> ==16567== Address 0x8 is not stack'd, malloc'd or (recently) free'd
>
> Michal
>
Weird. Pipeline passed for me:
https://gitlab.com/twiederh/libvirt/-/pipelines/333827544
Do you maybe have a reproducer for me, so I can investigate what's
going on here?
All I did was 'virsh capabilities'. I don't think that's something that
our CI tests because we mostly construct capabilities structure from
scratch.
Michal