Leak #3
968 bytes in 1 blocks are definitely lost in loss record 1,313 of 1,405
at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x6D4BA21: xmlGetGlobalState (in /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.3)
by 0x6D4B214: __xmlIndentTreeOutput (in /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.3)
by 0x5149F7D: virDomainDefFormatInternal (domain_conf.c:21655)
by 0x514D0F2: virDomainDefFormat (domain_conf.c:22517)
by 0x515B93B: virDomainDefCopy (domain_conf.c:23041)
by 0x515B9FF: virDomainObjSetDefTransient (domain_conf.c:2818)
by 0x2B70CCD9: qemuProcessInit (qemu_process.c:4483)
by 0x2B70CFEE: qemuProcessStart (qemu_process.c:5150)
by 0x2B76D727: qemuDomainObjStart.constprop.47 (qemu_driver.c:7396)
by 0x2B76DE65: qemuDomainCreateWithFlags (qemu_driver.c:7450)
by 0x51CC7FB: virDomainCreate (libvirt-domain.c:6753)
I've checked the code in libxml2, and what is leaking is the struct _xmlGlobalState,
in function xmlNewGlobalState(), called from xmlGetGlobalState() - this is part
of thread orchestration mechanism in libxml. Using pahole I could check the struct
size, and it matches:
The struct is freed in xmlFreeGlobalState(), when thread exits. This is again a case
when there's a cleanup routine that seems to be skipped; we need to understand really
if the process is being killed without having chance to run these cleanups.
I'm preparing a test package to validate the cleanups execution.
Leak #3 valgrind/ vgpreload_ memcheck- amd64-linux. so) x86_64- linux-gnu/ libxml2. so.2.9. 3) Output (in /usr/lib/ x86_64- linux-gnu/ libxml2. so.2.9. 3) matInternal (domain_ conf.c: 21655) conf.c: 22517) conf.c: 23041) DefTransient (domain_ conf.c: 2818) c:4483) c:5150) art.constprop. 47 (qemu_driver. c:7396) eWithFlags (qemu_driver. c:7450) domain. c:6753)
968 bytes in 1 blocks are definitely lost in loss record 1,313 of 1,405
at 0x4C2AB80: malloc (in /usr/lib/
by 0x6D4BA21: xmlGetGlobalState (in /usr/lib/
by 0x6D4B214: __xmlIndentTree
by 0x5149F7D: virDomainDefFor
by 0x514D0F2: virDomainDefFormat (domain_
by 0x515B93B: virDomainDefCopy (domain_
by 0x515B9FF: virDomainObjSet
by 0x2B70CCD9: qemuProcessInit (qemu_process.
by 0x2B70CFEE: qemuProcessStart (qemu_process.
by 0x2B76D727: qemuDomainObjSt
by 0x2B76DE65: qemuDomainCreat
by 0x51CC7FB: virDomainCreate (libvirt-
I've checked the code in libxml2, and what is leaking is the struct _xmlGlobalState, te(), called from xmlGetGlobalState() - this is part
in function xmlNewGlobalSta
of thread orchestration mechanism in libxml. Using pahole I could check the struct
size, and it matches:
$ pahole --hex -C _xmlGlobalState <libxml_dbg_file> | grep size
/* size: 968, cachelines: 16, members: 33 */
The struct is freed in xmlFreeGlobalSt ate(), when thread exits. This is again a case
when there's a cleanup routine that seems to be skipped; we need to understand really
if the process is being killed without having chance to run these cleanups.
I'm preparing a test package to validate the cleanups execution.