I'm seeing a very weird (and somewhat reproducable) crash in
setSchedulerParameters. The backtrace looks like this:
*** glibc detected *** python2.7: free(): invalid pointer:
0x000000000152bc48 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x76166)[0x7faa9e991166]
/usr/lib64/python2.7/site-packages/libvirtmod.so(virFree+0x29)[0x7faa9887bfe9]
/lib/libvirt.so.0(virTypedParamsClear+0x54)[0x7faa98342fe4]
/lib/libvirt.so.0(virTypedParamsFree+0x1e)[0x7faa9834302e]
/usr/lib64/python2.7/site-packages/libvirtmod.so(+0x1b4dc)[0x7faa9886c4dc]
/usr/lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5629)[0x7faa9f63a129]
/usr/lib64/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x68e8)[0x7faa9f63b3e8]
/usr/lib64/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x8ae)[0x7faa9f63bd5e]
/usr/lib64/libpython2.7.so.1.0(PyEval_EvalCode+0x32)[0x7faa9f63be72]
/usr/lib64/libpython2.7.so.1.0(+0xff25c)[0x7faa9f65625c]
/usr/lib64/libpython2.7.so.1.0(PyRun_FileExFlags+0x90)[0x7faa9f656330]
/usr/lib64/libpython2.7.so.1.0(PyRun_SimpleFileExFlags+0xef)[0x7faa9f6578cf]
/usr/lib64/libpython2.7.so.1.0(Py_Main+0xc56)[0x7faa9f6693f6]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x7faa9e939d1d]
python2.7[0x400649]
I am using:
Python2.7
Python-Libvirt 1.2.2 with the "[PATCH libvirt-python 1/2]
setPyVirTypedParameter: Copy full field name" patch.
Libvirt 1.2.1
A quick example:
import libvirt
for i in range(0,40):
conn = libvirt.open(None)
for domid in conn.listDomainsID():
dom = conn.lookupByID(domid)
print dom.name()
params = {}
params['vcpu_period'] = 50000
params['vcpu_quota'] = 100000
dom.setSchedulerParameters(params)
This will crash frequently (over 80% of the time), but not all the
time. Interestingly, if I add 'dom = None' before 'conn =
libvirt.open(None)', the crashes seem to stop.
This is just a simple test case from my actual application though, so
applying that workaround may be tough (and it seems like it shouldn't
crash, even without that.