[libvirt] problem in pciFindStubDriver
by Chunyan Liu
For Xen PV guests, pciback is the only working driver, pci-stub
doesn't work. Current function finds pci-stub driver first, if
pci-stub doesn't exist, find pciback. It won't work for Xen PV guests
since it will find pci-stub driver and return, but in fact it needs
pciback.
One way is to prefer pciback rather than pci-stub like in following
patch. But that will change the behaviour of other drivers too. Is
there any preferred aprroach to handle this?
diff --git a/src/util/virpci.c b/src/util/virpci.c
index 5971764..c0a1c05 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -861,22 +861,22 @@ pciFindStubDriver(void)
int probed = 0;
recheck:
- if (pciDriverDir(&drvpath, "pci-stub") < 0) {
+ if (pciDriverDir(&drvpath, "pciback") < 0) {
return NULL;
}
if (virFileExists(drvpath)) {
VIR_FREE(drvpath);
- return "pci-stub";
+ return "pciback";
}
- if (pciDriverDir(&drvpath, "pciback") < 0) {
+ if (pciDriverDir(&drvpath, "pci-stub") < 0) {
return NULL;
}
if (virFileExists(drvpath)) {
VIR_FREE(drvpath);
- return "pciback";
+ return "pci-stub";
}
VIR_FREE(drvpath);
11 years, 10 months
[libvirt] [PATCH] qemu: Don't parse log output when starting up a domain
by Michal Privoznik
Despite our great effort we still parsed qemu log output.
We wouldn't notice unless qemu changed the format of the
logs slightly. Anyway, now we should gather all interesting
knobs like pty paths from monitor. Moreover, since for
historical reasons the first console can be just an alias to
the first serial port, we need to check this and copy the
pty path if that's the case to the first console.
---
src/qemu/qemu_capabilities.c | 7 +++++++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_process.c | 20 ++++++++++++++++++--
3 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 17e6679..f49a31c 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1695,6 +1695,7 @@ qemuCapsPtr qemuCapsNewCopy(qemuCapsPtr caps)
virBitmapCopy(ret->flags, caps->flags);
+ ret->usedQMP = caps->usedQMP;
ret->version = caps->version;
ret->kvmVersion = caps->kvmVersion;
ret->arch = caps->arch;
@@ -2633,3 +2634,9 @@ qemuCapsCacheFree(qemuCapsCachePtr cache)
virMutexDestroy(&cache->lock);
VIR_FREE(cache);
}
+
+bool
+qemuCapsUsedQMP(qemuCapsPtr caps)
+{
+ return caps->usedQMP;
+}
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 3457852..1417d7f 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -241,4 +241,5 @@ int qemuCapsParseDeviceStr(qemuCapsPtr caps, const char *str);
VIR_ENUM_DECL(qemuCaps);
+bool qemuCapsUsedQMP(qemuCapsPtr caps);
#endif /* __QEMU_CAPABILITIES_H__*/
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index eac6553..ff88192 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -1532,6 +1532,7 @@ qemuProcessFindCharDevicePTYsMonitor(virDomainObjPtr vm,
virHashTablePtr paths)
{
bool chardevfmt = qemuCapsGet(caps, QEMU_CAPS_CHARDEV);
+ int i = 0;
if (qemuProcessLookupPTYs(vm->def->serials, vm->def->nserials,
paths, chardevfmt) < 0)
@@ -1544,8 +1545,23 @@ qemuProcessFindCharDevicePTYsMonitor(virDomainObjPtr vm,
if (qemuProcessLookupPTYs(vm->def->channels, vm->def->nchannels,
paths, chardevfmt) < 0)
return -1;
+ /* For historical reasons, console[0] can be just an alias
+ * for serial[0]; That's why we need to update it as well */
+ if (vm->def->nconsoles) {
+ virDomainChrDefPtr chr = vm->def->consoles[0];
+
+ if (vm->def->nserials &&
+ chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE &&
+ chr->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL) {
+ /* yes, the first console is just an alias for serials[0] */
+ i = 1;
+ if (virDomainChrSourceDefCopy(&chr->source,
+ &((vm->def->serials[0])->source)) < 0)
+ return -1;
+ }
+ }
- if (qemuProcessLookupPTYs(vm->def->consoles, vm->def->nconsoles,
+ if (qemuProcessLookupPTYs(vm->def->consoles + i, vm->def->nconsoles - i,
paths, chardevfmt) < 0)
return -1;
@@ -1650,7 +1666,7 @@ qemuProcessWaitForMonitor(virQEMUDriverPtr driver,
virHashTablePtr paths = NULL;
qemuDomainObjPrivatePtr priv;
- if (pos != -1) {
+ if (!qemuCapsUsedQMP(caps) && pos != -1) {
if ((logfd = qemuDomainOpenLog(driver, vm, pos)) < 0)
return -1;
--
1.8.0.2
11 years, 10 months
[libvirt] [ESX:Error] HTTP 403 error for CURL upload operation
by Ata Bohra
Hi Everyone, Merry Christmas and Happy New Year! I'm trying to upload disk to ESX 5.0 server using the URL obtained by the server (during VM installation process); I'm using libcurl support in libvirt to upload the disk, but I get this error on file upload:----------------------* About to connect() to <ip> port 443 (#1)
* Trying <ip>... * connected
* found 153 certificates in /etc/ssl/certs/ca-certificates.crt
* server certificate verification SKIPPED
* compression: NULL
* cipher: AES-128-CBC
* MAC: SHA1
> PUT /ha-nfc/52c6d592-7636-67c5-29f3-d5b373be4f42/disk-0.vmdk HTTP/1.1
User-Agent: libvirt-esx
Host: <ip>
Accept: */*
Cookie: vmware_soap_session="521af33d-2bbe-38aa-21e8-13d474ccb023"
Content-Type: text/xml; charset=UTF-8
SOAPAction: "urn:vim25"
Content-Length: 7021568< HTTP/1.1 403 Forbidden
< Date: Sun, 30 Dec 2012 01:28:19 GMT
< Connection: close
< Content-Type: text; charset=plain
< Content-Length: 44
----------------------To achieve this operation I've added a routine to support file Upload (for ESX driver as currently it only support buffer upload), I verified its functioning my uploading a file using datastore based URL:(http(s)//<ip>/file??dcPath=ha-datacenter?dsName=xxx). CURL options provided by me are; ----------- curl_easy_setopt(curl->handle, CURLOPT_UPLOAD, 1L);
curl_easy_setopt(curl->handle, CURLOPT_URL, url);
curl_easy_setopt(curl->handle, CURLOPT_READDATA, <data pointer>);
curl_easy_setopt(curl->handle, CURLOPT_INFILESIZE_LARGE,
(curl_off_t) fileData->size);
curl_easy_setopt(curl->handle, CURLOPT_READFUNCTION,
<read function>);
curl_easy_setopt(curl->handle, CURLOPT_VERBOSE, 1);------------------------ My understanding is there needs to be some tuning done to ESX server to accept this upload operation, please suggest if anyone has faced this issue before. Thanks!Ata
11 years, 10 months
[libvirt] RFC: An "embedded" mode for QEMU/LXC drivers
by Daniel P. Berrange
This is something I was thinking about a little over the christmas
break. I've no intention of implementing this in the immediate
future, but wanted to post it while it was fresh in my mind.
Historically we have had 2 ways of using the stateful drivers like
QEMU/LXC/UML/etc.
- "system mode" - privileged libvirtd, one per host, started at boot
- "session mode" - unprivileged libvirtd, one per non-root user, autostarted
Within context of each daemon, VM name uniqueness is enforced. Operating
via the daemon means that all applications connected to libvirtd get the
same world view. This single world view is exactly what you want when
dealing with server / cloud / desktop virtualization, because it means
tools like 'virt-top', 'virt-viewer', 'virsh' can see the same VMs as
virt-manager / oVirt / OpenStack / Boxes / etc.
Recently we've seen increasing importance of a new use case which I will
refer to as "embedded" virtualization. The best example of this use case
is libguestfs which has long run a dedicated QEMU instance, but just now
switched to using libvirtd. The other use case is virt-sandbox which is
doing application confinement using LXC/KVM.
In both these cases, operating via libvirtd is sub-optimal. Users of so
called "embedded" virtualization, explicitly don't want to have interaction
with other libvirt applications. They likely don't even want to expose the
concept of virtualization to their users. For them virtualization is intended
to be just a hidden impl detail of their application.
Some issues which arise when using embedded virtualization
- Need to invent sensible unique names for each VM launched. This
leads to pollution of logfiles for QEMU instances run.
- User sees libguestfs / virt-sandbox VMs in virt-manager / oVirt
which they may then try to "manage", breaking libguestfs / etc
- Disassociated process context, so if 'virt-sandbox' is placed in
a cgroup, the VMs it launches are in a different cgroup. Likewise
if custom env variables are set, work is needed to propagate those
to VMs.
This leads me to wonder whether it is worth exploring the idea of a new
type of libvirt connection.
- "embed mode" - no libvirtd, driver runs in application context
The idea here is to take libvirtd out of the equation and directly use
the QEMU driver code in the libvirt.so client / application. Since
libvirtd (mostly) uses the same APIs as the public libvirt.so clients,
there isn't much required to make this work.
- A way for the application to invoke virStateInit for the driver
- Application must provide an event loop impl
- A way to specify alternative dirs for logs/state/config/etc
An application would access this mode using a different path for the
driver, and specifying the path to use for logs/state/config etc.
eg libguestfs might use
qemu:///embed?statedir=/tmp/libguestfsXXXXX/
to get an instance of the QEMU driver that is completely private
to itself. One question is whether there should be a single embed
instance per process, or whether an application should be allowed
to open multiple completely isolated embed instances. The latter
might require is to eliminate more static variables in our code.
This kind of embedded mode is not without its downsides though
- How to access virtual network / storage / node device APIs ?
- Extra SELinux policy work to allow each app to have the same
kind of privileges that libvirtd has to let it start VMs
- How to troubleshoot - can't use things like
'virsh qemu-monitor-command'
since the embedded instance is private to the application
in question.
One answer to the latter question, might be to actually allow the
application to expose the same RPC service as libvirtd does. So
virsh could connect to libguestfs using
qemu:///embed?socketdir=/tmp/libguestfsXXXXX/libvirt-sock
For the question of network/storage/node device access, the long
term answer is probably to split up the system libvirtd instance
into separate pieces. eg a virtnodedeviced, virtnetworkd,
virstoraged, virtqemud, virtlxcd, etc. Now a client app would
connect to their embedded QEMU instances, but to the shared
nodedevice/network/storage daemons.
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
11 years, 10 months
[libvirt] Build failed in Jenkins: libvirt-build #472
by Jenkins CI
See <http://honk.sigxcpu.org:8001/job/libvirt-build/472/changes>
Changes:
[eblake] maint: update to latest gnulib
------------------------------------------
[...truncated 5806 lines...]
GEN wchar.h
GEN wctype.h
make all-am
make[3]: Entering directory `<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/gnulib/lib'>
CC allocator.lo
CC areadlink.lo
CC base64.lo
CC binary-io.lo
CC bitrotate.lo
CC c-ctype.lo
CC c-strcasecmp.lo
CC c-strncasecmp.lo
CC c-strcasestr.lo
CC careadlinkat.lo
CC cloexec.lo
CC count-one-bits.lo
CC md5.lo
CC sha256.lo
CC dirname-lgpl.lo
CC basename-lgpl.lo
CC stripslash.lo
CC fd-hook.lo
CC freading.lo
CC localcharset.lo
CC lock.lo
CC malloca.lo
CC nonblocking.lo
CC passfd.lo
CC physmem.lo
CC pipe2.lo
CC sig-handler.lo
CC sockets.lo
CC stat-time.lo
CC stdio.lo
CC strnlen1.lo
CC sys_socket.lo
CC tempname.lo
CC threadlib.lo
CC unistd.lo
CC wctype-h.lo
CC xsize.lo
CC asnprintf.lo
CC fclose.lo
CC fcntl.lo
CC fflush.lo
CC fpurge.lo
CC fseek.lo
CC fseeko.lo
CC ioctl.lo
CC mktime.lo
CC perror.lo
CC printf-args.lo
CC printf-parse.lo
CC strerror.lo
CC strerror_r.lo
CC vasnprintf.lo
CCLD libgnu.la
GEN charset.alias
GEN ref-add.sed
GEN ref-del.sed
make[3]: Leaving directory `<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/gnulib/lib'>
make[2]: Leaving directory `<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/gnulib/lib'>
Making all in include
make[2]: Entering directory `<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/include'>
Making all in libvirt
make[3]: Entering directory `<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/include/libvirt'>
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/include/libvirt'>
make[3]: Entering directory `<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/include'>
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/include'>
make[2]: Leaving directory `<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/include'>
Making all in src
make[2]: Entering directory `<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/src'>
GEN libvirt.syms
GEN libvirt.def
make all-am
make[3]: Entering directory `<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/src'>
CC libvirt_util_la-viralloc.lo
CC libvirt_util_la-virarch.lo
CC libvirt_util_la-viratomic.lo
CC libvirt_util_la-viraudit.lo
CC libvirt_util_la-virauth.lo
CC libvirt_util_la-virauthconfig.lo
CC libvirt_util_la-virbitmap.lo
CC libvirt_util_la-virbuffer.lo
CC libvirt_util_la-vircgroup.lo
CC libvirt_util_la-vircommand.lo
CC libvirt_util_la-virconf.lo
CC libvirt_util_la-virdbus.lo
CC libvirt_util_la-virdnsmasq.lo
CC libvirt_util_la-virebtables.lo
CC libvirt_util_la-virerror.lo
CC libvirt_util_la-virevent.lo
CC libvirt_util_la-vireventpoll.lo
CC libvirt_util_la-virfile.lo
CC libvirt_util_la-virhash.lo
CC libvirt_util_la-virhashcode.lo
CC libvirt_util_la-virhook.lo
CC libvirt_util_la-virinitctl.lo
CC libvirt_util_la-viriptables.lo
CC libvirt_util_la-virjson.lo
CC libvirt_util_la-virkeycode.lo
CC libvirt_util_la-virkeyfile.lo
CC libvirt_util_la-virlockspace.lo
CC libvirt_util_la-virlog.lo
CC libvirt_util_la-virmacaddr.lo
CC libvirt_util_la-virnetdev.lo
CC libvirt_util_la-virnetdevbandwidth.lo
CC libvirt_util_la-virnetdevbridge.lo
CC libvirt_util_la-virnetdevmacvlan.lo
CC libvirt_util_la-virnetdevopenvswitch.lo
CC libvirt_util_la-virnetdevtap.lo
CC libvirt_util_la-virnetdevveth.lo
CC libvirt_util_la-virnetdevvlan.lo
CC libvirt_util_la-virnetdevvportprofile.lo
CC libvirt_util_la-virnetlink.lo
CC libvirt_util_la-virnodesuspend.lo
CC libvirt_util_la-virobject.lo
CC libvirt_util_la-virpci.lo
CC libvirt_util_la-virpidfile.lo
CC libvirt_util_la-virprocess.lo
CC libvirt_util_la-virrandom.lo
CC libvirt_util_la-virsexpr.lo
CC libvirt_util_la-virsocketaddr.lo
CC libvirt_util_la-virstatslinux.lo
CC libvirt_util_la-virstoragefile.lo
CC libvirt_util_la-virstring.lo
CC libvirt_util_la-virsysinfo.lo
CC libvirt_util_la-virthread.lo
CC libvirt_util_la-virthreadpool.lo
CC libvirt_util_la-virtime.lo
CC libvirt_util_la-virtypedparam.lo
CC libvirt_util_la-virusb.lo
CC libvirt_util_la-viruri.lo
CC libvirt_util_la-virutil.lo
CC libvirt_util_la-viruuid.lo
CC libvirt_util_la-virxml.lo
CCLD libvirt_util.la
CC libvirt_conf_la-netdev_bandwidth_conf.lo
CC libvirt_conf_la-netdev_vport_profile_conf.lo
CC libvirt_conf_la-netdev_vlan_conf.lo
CC libvirt_conf_la-capabilities.lo
CC libvirt_conf_la-domain_conf.lo
CC libvirt_conf_la-domain_audit.lo
CC libvirt_conf_la-domain_nwfilter.lo
CC libvirt_conf_la-snapshot_conf.lo
CC libvirt_conf_la-domain_event.lo
CC libvirt_conf_la-network_conf.lo
CC libvirt_conf_la-nwfilter_params.lo
CC libvirt_conf_la-nwfilter_ipaddrmap.lo
CC libvirt_conf_la-nwfilter_conf.lo
CC libvirt_conf_la-node_device_conf.lo
CC libvirt_conf_la-storage_conf.lo
CC libvirt_conf_la-storage_encryption_conf.lo
CC libvirt_conf_la-interface_conf.lo
CC libvirt_conf_la-secret_conf.lo
CC libvirt_conf_la-cpu_conf.lo
CC libvirt_conf_la-virconsole.lo
CC libvirt_conf_la-device_conf.lo
CCLD libvirt_conf.la
CC libvirt_cpu_la-cpu.lo
CC libvirt_cpu_la-cpu_generic.lo
CC libvirt_cpu_la-cpu_x86.lo
CC libvirt_cpu_la-cpu_s390.lo
CC libvirt_cpu_la-cpu_arm.lo
CC libvirt_cpu_la-cpu_map.lo
CC libvirt_cpu_la-cpu_powerpc.lo
CCLD libvirt_cpu.la
CC libvirt_vmx_la-vmx.lo
CCLD libvirt_vmx.la
CC libvirt_xenxs_la-xen_sxpr.lo
CC libvirt_xenxs_la-xen_xm.lo
CCLD libvirt_xenxs.la
CC libvirt_driver_la-driver.lo
CC libvirt_driver_la-datatypes.lo
CC libvirt_driver_la-fdstream.lo
CC libvirt_driver_la-nodeinfo.lo
CC libvirt_driver_la-libvirt.lo
CC libvirt_driver_la-lock_manager.lo
CC libvirt_driver_la-lock_driver_nop.lo
CC libvirt_driver_la-domain_lock.lo
CCLD libvirt_driver.la
CC libvirt_driver_test_la-test_driver.lo
CCLD libvirt_driver_test.la
CC libvirt_driver_remote_la-remote_driver.lo
CC libvirt_driver_remote_la-remote_protocol.lo
CC libvirt_driver_remote_la-qemu_protocol.lo
CC libvirt_net_rpc_client_la-virnetclientprogram.lo
CC libvirt_net_rpc_client_la-virnetclientstream.lo
CC libvirt_net_rpc_client_la-virnetclient.lo
CCLD libvirt-net-rpc-client.la
CC libvirt_net_rpc_server_la-virnetserverprogram.lo
CC libvirt_net_rpc_server_la-virnetserverservice.lo
CC libvirt_net_rpc_server_la-virnetserverclient.lo
CC libvirt_net_rpc_server_la-virnetservermdns.lo
CC libvirt_net_rpc_server_la-virnetserver.lo
CCLD libvirt-net-rpc-server.la
CC libvirt_net_rpc_la-virnetmessage.lo
CC libvirt_net_rpc_la-virnetprotocol.lo
CC libvirt_net_rpc_la-virnetsocket.lo
CC libvirt_net_rpc_la-virnettlscontext.lo
CC libvirt_net_rpc_la-virkeepaliveprotocol.lo
CC libvirt_net_rpc_la-virkeepalive.lo
CC libvirt_net_rpc_la-virnetsaslcontext.lo
CCLD libvirt-net-rpc.la
CCLD libvirt_driver_remote.la
CC libvirt_driver_openvz_la-openvz_conf.lo
CC libvirt_driver_openvz_la-openvz_driver.lo
CC libvirt_driver_openvz_la-openvz_util.lo
CCLD libvirt_driver_openvz.la
CC libvirt_driver_vmware_la-vmware_driver.lo
CC libvirt_driver_vmware_la-vmware_conf.lo
CCLD libvirt_driver_vmware.la
CC libvirt_driver_vbox_la-vbox_glue.lo
CC libvirt_driver_vbox_la-vbox_driver.lo
CC libvirt_driver_vbox_la-vbox_V2_2.lo
CC libvirt_driver_vbox_la-vbox_V3_0.lo
CC libvirt_driver_vbox_la-vbox_V3_1.lo
CC libvirt_driver_vbox_la-vbox_V3_2.lo
CC libvirt_driver_vbox_la-vbox_V4_0.lo
CC libvirt_driver_vbox_la-vbox_V4_1.lo
CCLD libvirt_driver_vbox.la
CC libvirt_security_manager_la-security_driver.lo
CC libvirt_security_manager_la-security_nop.lo
CC libvirt_security_manager_la-security_stack.lo
CC libvirt_security_manager_la-security_dac.lo
CC libvirt_security_manager_la-security_manager.lo
CC libvirt_security_manager_la-security_selinux.lo
CCLD libvirt_security_manager.la
CCLD libvirt.la
./.libs/libvirt_util.a(libvirt_util_la-virnetdevtap.o): In function `rpl_fwrite':
<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/src/../gnulib/lib/stdio.h>:903: multiple definition of `rpl_fwrite'
./.libs/libvirt_util.a(libvirt_util_la-virnetdev.o):<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/src/../gnulib/lib/stdio.h>:903: first defined here
./.libs/libvirt_util.a(libvirt_util_la-virnetlink.o): In function `rpl_fwrite':
<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/src/../gnulib/lib/stdio.h>:903: multiple definition of `rpl_fwrite'
./.libs/libvirt_util.a(libvirt_util_la-virnetdev.o):<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/src/../gnulib/lib/stdio.h>:903: first defined here
../gnulib/lib/.libs/libgnu.a(stdio.o): In function `rpl_fwrite':
<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/gnulib/lib/stdio.h>:903: multiple definition of `rpl_fwrite'
./.libs/libvirt_util.a(libvirt_util_la-virnetdev.o):<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/src/../gnulib/lib/stdio.h>:903: first defined here
collect2: error: ld returned 1 exit status
make[3]: *** [libvirt.la] Error 1
make[3]: Leaving directory `<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/src'>
make[2]: *** [all] Error 2
make[2]: Leaving directory `<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/src'>
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `<http://honk.sigxcpu.org:8001/job/libvirt-build/ws/'>
make: *** [all] Error 2
Build step 'Execute shell' marked build as failure
11 years, 10 months
[libvirt] [PATCH 0/2] Split out parts of qemu_driver.c into separate files
by Peter Krempa
qemu_driver.c is starting to grow out of proportions. This series
creates two(actualy four) files to split out some code from the main file.
1) qemu_util.c - various qemu-related tools and common code (~0.5k lines)
2) qemu_snapshot.c - snapshot related code (~1.7k lines)
Apart from reformating function headers, no changes were made to the code.
Peter Krempa (2):
qemu: Split out various utility functions to qemu_util.c
qemu: Split out snapshot related functions to qemu_snapshot.c
po/POTFILES.in | 2 +
src/Makefile.am | 2 +
src/qemu/qemu_driver.c | 2191 +---------------------------------------------
src/qemu/qemu_snapshot.c | 1752 ++++++++++++++++++++++++++++++++++++
src/qemu/qemu_snapshot.h | 38 +
src/qemu/qemu_util.c | 486 ++++++++++
src/qemu/qemu_util.h | 111 +++
7 files changed, 2404 insertions(+), 2178 deletions(-)
create mode 100644 src/qemu/qemu_snapshot.c
create mode 100644 src/qemu/qemu_snapshot.h
create mode 100644 src/qemu/qemu_util.c
create mode 100644 src/qemu/qemu_util.h
--
1.8.0.2
e
11 years, 10 months
[libvirt] libvirtd segfault
by Scott Sullivan
### Libvirt version: ###
libvirt tagged v1.0.0 from git , with
f0e72b2f5c675f927d04545dc5095f9e5998f171 applied
### Problem: ###
Libvirtd segfaults
### Steps to reproduce: ###
This is difficult to reproduce; but appears to happen only when doing
'virsh destroys', and when they are ran in concurrent intervals, over
extended periods of time.
Here are the steps I have taken to reproduce this problem
(debian_6.0_amd64_kvm.img.gz is just a zipped up squeeze stock ISO install):
First, copy this script to ease the steps (assumed to be at
/root/libvirt_crash.pl later):
#!/usr/bin/env perl
use strict;
use warnings;
use Getopt::Long qw(:config no_ignore_case);
use String::Random;
use UUID::Random;
my ($lvms,$sleep,$restarts_per_lvm);
GetOptions(
'lvms=i' => \$lvms,
'restarts_per_lvm=i' => \$restarts_per_lvm,
'sleep=i' => \$sleep,
);
die "USAGE:\n$0 [--lvms int | --restarts_per_lvm int | --sleep int
(optional) ]\n" unless ( $lvms && $restarts_per_lvm );
sub _create_lvm {
my $opts = shift;
print "\tlvcreate -n $opts->{lvm} -L 5G /dev/LVM\n";
system("lvcreate -n $opts->{lvm} -L 5G /dev/LVM");
}
sub _kpartx_lvm {
my $opts = shift;
die "_kpartx_lvm needs modifier!\n" unless ( $opts->{modifier} );
print "\tkpartx -p p -$opts->{modifier} -v
/dev/LVM/$opts->{lvm}\n";
system("kpartx -p p -$opts->{modifier} -v /dev/LVM/$opts->{lvm}");
}
sub _remove_lvm {
my $opts = shift;
print "\tlvremove -f /dev/LVM/$opts->{lvm}\n";
system("lvremove -f /dev/LVM/$opts->{lvm}");
unlink("/xen/configs/$opts->{lvm}.cfg");
}
sub _display_lvm {
my $opts = shift;
print "\tparted -s /dev/LVM/$opts->{lvm} unit gb p\n";
system("parted -s /dev/LVM/$opts->{lvm} unit gb p");
}
sub _dd_template {
my $opts = shift;
print "\tdd if=/root/ssullivan/debian_6.0_amd64_kvm.img.gz
bs=1M | gunzip -c | dd of=/dev/LVM/$opts->{lvm} bs=1M\n";
system("dd if=/root/ssullivan/debian_6.0_amd64_kvm.img.gz bs=1M
| gunzip -c | dd of=/dev/LVM/$opts->{lvm} bs=1M");
}
sub _e2fsck_lvm {
my $opts = shift;
print "\te2fsck -y -f /dev/mapper/LVM-$opts->{lvm}p1\n";
system("e2fsck -y -f /dev/mapper/LVM-$opts->{lvm}p1");
print "\te2fsck -y -f /dev/mapper/LVM-$opts->{lvm}p3\n";
system("e2fsck -y -f /dev/mapper/LVM-$opts->{lvm}p3")
}
sub _place_virtconf {
my $opts = shift;
my $uuid = UUID::Random::generate;
my $virt_conf = <<END;
<domain type="kvm">
<name>$opts->{lvm}</name>
<uuid>$uuid</uuid>
<memory>450560</memory>
<currentMemory>450560</currentMemory>
<vcpu>2</vcpu>
<cpu>
<topology sockets="2" cores="4" threads="1"/>
</cpu>
<os>
<type arch="x86_64" machine="pc-1.1">hvm</type>
<boot dev="hd"/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset="localtime"/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/opt/libexec/qemu-kvm-wrapper</emulator>
<disk type="block" device="disk">
<driver name="qemu" cache="none"/>
<source dev="/dev/LVM/$opts->{lvm}"/>
<target dev="vda" bus="virtio"/>
</disk>
<serial type="pty">
<target port="1"/>
</serial>
<console type="pty">
<target port="1"/>
</console>
<input type="tablet" bus="usb"/>
<input type="mouse" bus="ps2"/>
<graphics type="vnc" port="-1" autoport="yes" keymap="en-us"/>
</devices>
</domain>
END
open(my $fh, '>', "/xen/configs/$opts->{lvm}.cfg") || die
"Error opening [/xen/configs/$opts->{lvm}.cfg] [$!]";
print $fh "$virt_conf\n";
close($fh) || die "Error closing
[/xen/configs/$opts->{lvm}.cfg] [$!]";
}
sub _shutdown_lvm {
my $opts = shift;
print "\tvirsh destroy $opts->{lvm}\n";
system("virsh destroy $opts->{lvm}");
_virsh_list();
}
sub _virsh_list {
print "\tvirsh list\n";
system('virsh list');
}
sub _start_lvm {
my $opts = shift;
print "\tvirsh create /xen/configs/$opts->{lvm}.cfg\n";
system("virsh create /xen/configs/$opts->{lvm}.cfg");
_virsh_list();
}
my $rnd = new String::Random;
my $count = 0;
while ( $count < $lvms ) {
my $id = $rnd->randpattern("cccccccc");
print "####\nLVM PASS: $count\nLVM: $id\n####\n";
print "Creating LVM...\n";
_create_lvm({ lvm => $id });
print "DD'ing template...\n";
_dd_template({ lvm => $id });
print "kpartxA LVM...\n";
_kpartx_lvm({ lvm => $id, modifier => 'a' });
print "e2fsck LVM..\n";
_e2fsck_lvm({ lvm => $id });
print "kpartxD LVM...\n";
_kpartx_lvm({ lvm => $id, modifier => 'd' });
print "Placing libvirt conf...\n";
_place_virtconf({ lvm => $id });
print "Partition setup:\n";
_display_lvm({ lvm => $id });
print "Performing $restarts_per_lvm restarts on $id...\n";
my $restart_cnt = 0;
while ( $restart_cnt < $restarts_per_lvm ) {
print "####\nRESTART PASS: $restart_cnt\nLVM: $id\n####\n";
print "Shutting down LVM...\n";
_shutdown_lvm({ lvm => $id });
sleep $sleep if ( $sleep );
print "Starting LVM...\n";
_start_lvm({ lvm => $id });
$restart_cnt++;
}
print "Removing LVM...\n";
_shutdown_lvm({ lvm => $id });
_remove_lvm({ lvm => $id });
$count++;
}
I then started 21 of these scripts, with the below commands (preferably
in a screen to reduce spamming):
perl /root/libvirt_crash.pl --lvms 1000 --restarts_per_lvm 2000 &
perl /root/libvirt_crash.pl --lvms 1000 --restarts_per_lvm 2000 &
perl /root/libvirt_crash.pl --lvms 1000 --restarts_per_lvm 2000 &
perl /root/libvirt_crash.pl --lvms 1000 --restarts_per_lvm 2000 &
perl /root/libvirt_crash.pl --lvms 1000 --restarts_per_lvm 2000 --sleep 10 &
perl /root/libvirt_crash.pl --lvms 1000 --restarts_per_lvm 2000 --sleep 10 &
perl /root/libvirt_crash.pl --lvms 1000 --restarts_per_lvm 2000 &
perl /root/libvirt_crash.pl --lvms 1000 --restarts_per_lvm 2000 &
perl /root/libvirt_crash.pl --lvms 1000 --restarts_per_lvm 2000 &
perl /root/libvirt_crash.pl --lvms 1000 --restarts_per_lvm 2000 &
perl /root/libvirt_crash.pl --lvms 6000 --restarts_per_lvm 30 &
perl /root/libvirt_crash.pl --lvms 6000 --restarts_per_lvm 30 &
perl /root/libvirt_crash.pl --lvms 6000 --restarts_per_lvm 30 &
perl /root/libvirt_crash.pl --lvms 6000 --restarts_per_lvm 30 &
perl /root/libvirt_crash.pl --lvms 6000 --restarts_per_lvm 30 &
perl /root/libvirt_crash.pl --lvms 6000 --restarts_per_lvm 30 &
perl /root/libvirt_crash.pl --lvms 6000 --restarts_per_lvm 30 &
perl /root/libvirt_crash.pl --lvms 6000 --restarts_per_lvm 30 &
perl /root/libvirt_crash.pl --lvms 6000 --restarts_per_lvm 30 &
perl /root/libvirt_crash.pl --lvms 6000 --restarts_per_lvm 30 &
perl /root/libvirt_crash.pl --lvms 6000 --restarts_per_lvm 30 &
I already had libvirtd started under GDB at this point. I waited about
3-6 hours, and I found this in my GDB session:
2012-12-27 17:23:35.922+0000: 7445: error : qemuMonitorIO:614 : internal
error End of file from monitor
2012-12-27 17:23:36.558+0000: 7445: error : qemuMonitorIO:614 : internal
error End of file from monitor
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff8e1fc700 (LWP 31142)]
qemuDomainObjBeginJobInternal (driver=0x7fffe401d740,
driver_locked=true, obj=0x7fff80001b00, job=QEMU_JOB_DESTROY,
asyncJob=QEMU_ASYNC_JOB_NONE) at qemu/qemu_domain.c:768
768 priv->jobs_queued++;
Missing separate debuginfos, use: debuginfo-install
audit-libs-2.1.3-3.el6.x86_64 augeas-libs-0.9.0-1.el6.x86_64
avahi-libs-0.6.25-11.el6.x86_64 cyrus-sasl-gssapi-2.1.23-13.el6.x86_64
cyrus-sasl-lib-2.1.23-13.el6.x86_64 cyrus-sasl-md5-2.1.23-13.el6.x86_64
cyrus-sasl-plain-2.1.23-13.el6.x86_64 db4-4.7.25-16.el6.x86_64
dbus-libs-1.2.24-5.el6_1.x86_64 device-mapper-libs-1.02.66-6.el6.x86_64
glibc-2.12-1.47.el6.x86_64 gnutls-2.8.5-4.el6.x86_64
keyutils-libs-1.4-3.el6.x86_64 krb5-libs-1.9-22.el6_2.1.x86_64
libblkid-2.17.2-12.4.el6.x86_64 libcap-ng-0.6.4-3.el6_0.1.x86_64
libcom_err-1.41.12-11.el6.x86_64 libcurl-7.19.7-26.el6_1.2.x86_64
libgcrypt-1.4.5-9.el6.x86_64 libgpg-error-1.7-4.el6.x86_64
libidn-1.18-2.el6.x86_64 libnl-1.1-14.el6.x86_64
libpcap-1.0.0-6.20091201git117cb5.el6.x86_64
libpciaccess-0.12.1-1.el6.x86_64 libselinux-2.0.94-5.2.el6.x86_64
libsepol-2.0.41-4.el6.x86_64 libtasn1-2.3-3.el6.x86_64
libudev-147-2.40.el6.x86_64 libuuid-2.17.2-12.4.el6.x86_64
libxml2-2.7.6-4.el6.x86_64 libxslt-1.1.26-2.el6.x86_64
netcf-libs-0.1.9-2.el6.x86_64 nspr-4.8.8-3.el6.x86_64
nss-3.12.10-17.el6_2.x86_64 nss-softokn-freebl-3.12.9-11.el6.x86_64
nss-util-3.12.10-2.el6.x86_64 numactl-2.0.3-9.el6.x86_64
openldap-2.4.23-20.el6.x86_64 openssl-1.0.0-20.el6.x86_64
yajl-1.0.7-3.el6.x86_64 zlib-1.2.3-27.el6.x86_64
(gdb)
Here is the output of 'thread apply all bt' from this session:
Thread 30 (Thread 0x7fff8e1fc700 (LWP 31142)):
#0 qemuDomainObjBeginJobInternal (driver=0x7fffe401d740,
driver_locked=true, obj=0x7fff80001b00, job=QEMU_JOB_DESTROY,
asyncJob=QEMU_ASYNC_JOB_NONE) at qemu/qemu_domain.c:768
#1 0x00007fffeac2b223 in qemuDomainDestroyFlags (dom=<value optimized
out>, flags=<value optimized out>) at qemu/qemu_driver.c:2052
#2 0x00000039f10f97df in virDomainDestroy (domain=0x7fff741b8540) at
libvirt.c:2201
#3 0x0000000000428e22 in remoteDispatchDomainDestroy (server=<value
optimized out>, client=<value optimized out>, msg=<value optimized out>,
rerr=0x7fff8e1fbbe0, args=<value optimized out>, ret=<value optimized
out>) at remote_dispatch.h:1277
#4 remoteDispatchDomainDestroyHelper (server=<value optimized out>,
client=<value optimized out>, msg=<value optimized out>,
rerr=0x7fff8e1fbbe0, args=<value optimized out>, ret=<value optimized
out>) at remote_dispatch.h:1255
#5 0x00000039f1146152 in virNetServerProgramDispatchCall
(prog=0x6884a0, server=0x67fe60, client=0x68eb50, msg=0x6930b0) at
rpc/virnetserverprogram.c:431
#6 virNetServerProgramDispatch (prog=0x6884a0, server=0x67fe60,
client=0x68eb50, msg=0x6930b0) at rpc/virnetserverprogram.c:304
#7 0x00000039f1143fee in virNetServerProcessMsg (srv=<value optimized
out>, client=0x68eb50, prog=<value optimized out>, msg=0x6930b0) at
rpc/virnetserver.c:171
#8 0x00000039f1144a8b in virNetServerHandleJob (jobOpaque=<value
optimized out>, opaque=<value optimized out>) at rpc/virnetserver.c:192
#9 0x00000039f10643ec in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:144
#10 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#11 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#12 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 29 (Thread 0x7fff8ebfd700 (LWP 20241)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 28 (Thread 0x7fff8f5fe700 (LWP 20235)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 27 (Thread 0x7fff8ffff700 (LWP 29349)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 26 (Thread 0x7fffb8dfa700 (LWP 29348)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 25 (Thread 0x7fffb97fb700 (LWP 28577)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 24 (Thread 0x7fffba1fc700 (LWP 28576)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 23 (Thread 0x7fffbabfd700 (LWP 28180)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 22 (Thread 0x7fffbb5fe700 (LWP 28178)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 21 (Thread 0x7fffe0dfa700 (LWP 12076)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 20 (Thread 0x7fffe17fb700 (LWP 5934)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 19 (Thread 0x7fffe21fc700 (LWP 5904)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 18 (Thread 0x7fffe2bfd700 (LWP 5860)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 17 (Thread 0x7fffbbfff700 (LWP 855)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 16 (Thread 0x7fffe97c4700 (LWP 835)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 11 (Thread 0x7fffec73f700 (LWP 7457)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 10 (Thread 0x7fffed140700 (LWP 7456)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 9 (Thread 0x7fffedb41700 (LWP 7455)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 8 (Thread 0x7fffee542700 (LWP 7454)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 7 (Thread 0x7fffeef43700 (LWP 7453)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 6 (Thread 0x7fffef944700 (LWP 7452)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 5 (Thread 0x7ffff0345700 (LWP 7451)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 4 (Thread 0x7ffff0d46700 (LWP 7450)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 3 (Thread 0x7ffff1747700 (LWP 7449)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 2 (Thread 0x7ffff2148700 (LWP 7448)):
#0 0x000000300a20b3dc in pthread_cond_wait@(a)GLIBC_2.3.2 () from
/lib64/libpthread.so.0
#1 0x00000039f1063eb6 in virCondWait (c=<value optimized out>, m=<value
optimized out>) at util/threads-pthread.c:117
#2 0x00000039f1064483 in virThreadPoolWorker (opaque=<value optimized
out>) at util/threadpool.c:103
#3 0x00000039f1063cd9 in virThreadHelper (data=<value optimized out>)
at util/threads-pthread.c:161
#4 0x000000300a2077f1 in start_thread () from /lib64/libpthread.so.0
#5 0x0000003009ae570d in clone () from /lib64/libc.so.6
Thread 1 (Thread 0x7ffff7fda800 (LWP 7445)):
#0 0x0000003009a46f60 in vfprintf () from /lib64/libc.so.6
#1 0x0000003009afc970 in __vsnprintf_chk () from /lib64/libc.so.6
#2 0x0000003009afc8aa in __snprintf_chk () from /lib64/libc.so.6
#3 0x00000039f108144a in snprintf (when=<value optimized out>,
buf=0x7fffffffd470 "2012-12-27 17:23:36.561+0000") at
/usr/include/bits/stdio2.h:65
#4 virTimeStringThenRaw (when=<value optimized out>, buf=0x7fffffffd470
"2012-12-27 17:23:36.561+0000") at util/virtime.c:219
#5 0x00000039f108167a in virTimeStringNowRaw (buf=0x7fffffffd470
"2012-12-27 17:23:36.561+0000") at util/virtime.c:195
#6 0x00000039f105834b in virLogVMessage (source=VIR_LOG_FROM_FILE,
priority=<value optimized out>, filename=0x39f11ad70b
"util/event_poll.c", linenr=378, funcname=0x39f11adcc0
"virEventPollMakePollFDs", fmt=<value optimized out>,
vargs=0x7fffffffd4f0) at util/logging.c:822
#7 0x00000039f10586ec in virLogMessage (source=<value optimized out>,
priority=<value optimized out>, filename=<value optimized out>,
linenr=<value optimized out>, funcname=<value optimized out>, fmt=<value
optimized out>) at util/logging.c:753
#8 0x00000039f1052241 in virEventPollMakePollFDs () at
util/event_poll.c:374
#9 virEventPollRunOnce () at util/event_poll.c:605
#10 0x00000039f1051666 in virEventRunDefaultImpl () at util/event.c:247
#11 0x00000039f11437dd in virNetServerRun (srv=0x67fe60) at
rpc/virnetserver.c:1004
#12 0x000000000040c5a3 in main (argc=<value optimized out>, argv=<value
optimized out>) at libvirtd.c:1354
(gdb)
Does anyone have any insights as to the cause of this, or any potential
solutions? If there's anything I can add that would help let me know.
11 years, 10 months
Re: [libvirt] [libvirt-php][PATCH 00/20] compilation under OS X and various
by Michal Novotny
Hi Tugdual!
Thanks for the patch series. I've applied and tested it and it's working
great!
Thanks again for the series. I've noted your major contribution in the
AUTHORS file
with big thanks going to you :-)
Michal
On 01/03/2013 10:34 AM, Tugdual Saunier wrote:
> These patches are the result of my work to get libvirt-php compiled
> under OS X.
> As I suceeded to compiled it, I found some bugs/warnings
> that are also fixed in the following commits.
> The most important is probably the vnc_get_bitmap and vnc_refresh_screen now working.
>
> Tugdual Saunier (20):
> Fixed compilation under OS X
> fixed a malloc_error_break in doc generation
> fixed wrong xpath in domain type retrieving
> fixed PHP warnings in uuid generation
> fixed warnings
> fixed resource counter changes in libvirt_list_active_domains
> init array only if needed in libvirt_list_inactive_domains
> fixed wrong maxsize type in libvirt_logfile_set
> fixed wrong types in libvirt_check_version
> fixed wrong byte_order determination under other OS by improving it
> fixed wrong test on virConnectClose return value
> fixed vnc_get_bitmap
> Fixed infinite loop in vnc_refresh_screen
> fixed last warnings
> fixed doc generation under OSX
> Made tests more universal by using libvirt test driver
> reorder tests by dependency
> improved test-install.phpt, no more need of a random name
> fixed some segfault in test-domain-snapshot.phpt
> fixed wrong doc alignment for libvirt_domain_managedsave
>
> configure.ac | 10 +
> docs/Makefile.am | 14 +-
> src/Makefile.am | 5 +-
> src/libvirt-php.c | 330 +++++++++++++--------------
> src/libvirt-php.h | 16 +-
> src/vncfunc.c | 25 +-
> tests/data/example-no-disk-and-media.xml | 3 +-
> tests/functions.phpt | 8 +
> tests/php.ini | 2 +
> tests/runtests.sh | 11 +-
> tests/test-conn-limit.phpt | 2 +-
> tests/test-connect.phpt | 40 +---
> tests/test-domain-create-and-coredump.phpt | 2 +-
> tests/test-domain-create-and-get-xpath.phpt | 4 +-
> tests/test-domain-create.phpt | 2 +-
> tests/test-domain-define-create-destroy.phpt | 2 +-
> tests/test-domain-define-undefine.phpt | 2 +-
> tests/test-domain-snapshot.phpt | 14 +-
> tests/test-get-emulator.phpt | 10 +-
> tests/test-install.phpt | 14 +-
> tests/test-logging.phpt | 6 +-
> tools/generate-api-docs.c | 1 +
> 22 files changed, 260 insertions(+), 263 deletions(-)
> create mode 100644 tests/data/test-libvirt-php.img
> create mode 100644 tests/php.ini
>
> --
> 1.8.0.1
>
--
Michal Novotny <minovotn(a)redhat.com>, RHCE, Red Hat
Virtualization | libvirt-php bindings | php-virt-control.org
11 years, 10 months