[Libvirt-announce] Release of libvirt-0.9.6
by Daniel Veillard
That's what is now usually called a brown paper bag release (dixit Linus) [*]
since 0.9.5 had broken shudown with the two last released versions of QEmu
0.9.6 should be available at the usual place:
ftp://libvirt.org/libvirt/
and obviously only contains a few bug fixes and local improvements.
People should not ship 0.9.5, and use 0.9.6 instead, thanks in advance !
Bug Fixes:
- snapshot: fix logic bug in qemu undefine (Eric Blake)
- sanlock: fix memory leak (Eric Blake)
- virsh: fix regression in argv parsing (Eric Blake)
- storage: Wait udev events are handled before removing lvm vol (Osier Yang)
- qemu: avoid dereferencing a NULL pointer (Alex Jia)
- qemu: Avoid loop of fake reboots (Jiri Denemark)
- qemu: Fix shutdown regression with buggy qemu (Jiri Denemark)
- remote: fix crash on OOM (Eric Blake)
Improvements:
- snapshot: also delete empty directory (Eric Blake)
- snapshot: remove snapshot metadata on transient exit (Eric Blake)
- snapshot: prepare to remove transient snapshot metadata (Eric Blake)
- virsh: More friendly err if no pool is specified for looking up a vol (Osier Yang)
- tests: improve test failure diagnosis (Oskari Saarenmaa)
- API: prefer to use NULLSTR macro (Osier Yang)
- xen: use typical allocations (Eric Blake)
- virsh: Remove useless codes of cmdVolPath (Osier Yang)
Portability:
- build: silence warning on 32-bit build (Eric Blake)
Thanks to all who reported and helped fix those issues quickly !!!
Daniel
[*] and no I won't carry one, they are non-existent where I live
for context http://lwn.net/1999/0204/kernel.php3
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
13 years, 3 months
Re: [Libvirt-announce] [libvirt] libvirt-0.9.5 availability of rc2
by Daniel Veillard
On Wed, Sep 21, 2011 at 10:55:37AM +0100, Daniel P. Berrange wrote:
> On Tue, Sep 20, 2011 at 12:03:00PM +0800, Daniel Veillard wrote:
> > On Mon, Sep 19, 2011 at 08:15:18AM -0500, Adam Litke wrote:
> > > On Mon, Sep 19, 2011 at 04:04:04PM +0800, Daniel Veillard wrote:
> > > > On Sun, Sep 18, 2011 at 09:37:22AM -0500, Adam Litke wrote:
> > > > Hum, I wonder if remoteRelayDomainEventBlockJob shouldn't strdup the
> > > > path string instead of using it directly in the
> > > > remote_domain_event_block_job_msg block. As a result since we now
> > > > free the datapointed by the xdr message within
> > > > remoteDispatchDomainEventSend() , this errors wasn't shown before but
> > > > leads to a double free now.
> > > >
> > > > BTW it seems we don't check all allocations in the xdr code (on purpose
> > > > ?) for example make_nonnull_domain() doesn't check a strdup.
> > > >
> > > > Could you check the following patch ?
> > >
> > > Yep, this seems to fix the problem (and an extra check with valgrind shows no
> > > memory leaks. Although I haven't verified it, the functions:
> > >
> > > remoteRelayDomainEventIOError
> > > remoteRelayDomainEventIOErrorReason
> > > remoteRelayDomainEventGraphics
> > >
> > > appear to have the same problem as well.
> >
> > Right though they do far more allocations. I ended up pushing the
> > following patch which tries to be a bit better on handling memory
> > allocation error, but it's not fully complete yet:
> >
> >
> > Fix crash on events due to allocation errors
> >
> > remoteRelayDomainEventBlockJob, remoteRelayDomainEventIOError,
> > remoteRelayDomainEventIOErrorReason and remoteRelayDomainEventGraphics
> > were using const string directly in rpc structure, before calling
> > remoteDispatchDomainEventSend(). But that routine now frees up all
> > the pointed allocated memory from the rpc structure and we end up
> > with a double free.
> > This now strdup() all the strings passed and provide mem_error goto
> > labels to be used when an allocation error occurs.
> > Note that the cleanup isn't completely finished because all relaying
> > function also call make_nonnull_domain() which also allocate a string
> > and never handle the error case. This patches doesn't try to address
> > this as this is only error correctness a priori and touches far more
> > functions in this module:
> >
> > * daemon/remote.c: fix string allocations and memory error handling
> > for remoteRelayDomainEventBlockJob, remoteRelayDomainEventIOError,
> > remoteRelayDomainEventIOErrorReason and remoteRelayDomainEventGraphics
> >
> > diff --git a/daemon/remote.c b/daemon/remote.c
> > index 45244f8..74e759a 100644
> > --- a/daemon/remote.c
> > +++ b/daemon/remote.c
> > @@ -234,9 +234,13 @@ static int remoteRelayDomainEventIOError(virConnectPtr conn ATTRIBUTE_UNUSED,
> >
> > /* build return data */
> > memset(&data, 0, sizeof data);
> > + data.srcPath = strdup(srcPath);
> > + if (data.srcPath == NULL)
> > + goto mem_error;
> > + data.devAlias = strdup(devAlias);
> > + if (data.devAlias == NULL)
> > + goto mem_error;
> > make_nonnull_domain(&data.dom, dom);
> > - data.srcPath = (char*)srcPath;
> > - data.devAlias = (char*)devAlias;
> > data.action = action;
> >
> > remoteDispatchDomainEventSend(client, remoteProgram,
> > @@ -244,6 +248,11 @@ static int remoteRelayDomainEventIOError(virConnectPtr conn ATTRIBUTE_UNUSED,
> > (xdrproc_t)xdr_remote_domain_event_io_error_msg, &data);
> >
> > return 0;
> > +mem_error:
> > + virReportOOMError();
> > + virFree(data.srcPath);
> > + virFree(data.devAlias);
> > + return -1;
>
> s/virFree/VIR_FREE/ throughout all this code.
Yeah Eric pointed that out, I already commited his patch and the
associated make syntax-check test :-)
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
13 years, 3 months
[Libvirt-announce] Release of libvirt-0.9.5
by Daniel Veillard
Okay, it is finally out of the box :-) available as usual on
ftp://libvirt.org/libvirt/
The snapshot support in that version should have improved a lot, and
for the curious there is some early support for Microsoft hypervisor
now, updated support for USB should also be a major user improvement.
Considering the amount of bug fixes, I would suggest to upgrade
to that version even if you don't need any new features !
Features:
- many snapshot improvements (Eric Blake)
- latency: Define new public API and structure (Osier Yang)
- USB2 and various USB improvements (Marc-André Lureau)
- storage: Add fs pool formatting (Osier Yang)
- Add public API for getting migration speed (Jim Fehlig)
- Add basic driver for Microsoft Hyper-V (Matthias Bolte)
Documentation:
- virsh: tweak previous domblkstat patch (Eric Blake)
- virsh: doc: Fix supported driver types for attach-disk command (Peter Krempa)
- doc: Add statment about permissions needed to do a core dump (Peter Krempa)
- snapshot: tweak snapshot-create-as diskspec docs (Eric Blake)
- qemu_api: doc improvements (Eric Blake)
- virsh: Fix command name in man page (Peter Krempa)
- fix incorrect option in send-key (Alex Jia)
- virsh: improve send-key documentation (Eric Blake)
- hyperv: Add basic documentation (Matthias Bolte)
- schedinfo: update man page about virsh schedinfo command (Taku Izumi)
- virsh: Clarify documentation of -d option (Jiri Denemark)
- schedinfo: add missing documentation (Taku Izumi)
- Improve tokenizing of linkable terms (Philipp Hahn)
- Add some docs about the RPC protocol and APIs (Daniel P. Berrange)
- Align table cells on top (Philipp Hahn)
- use IPv6 addresses in range reserved for documentation (Laine Stump)
- describe new virtual switch configuration in network XML docs (Laine Stump)
Portability:
- Update to require sanlock 1.8 for license compliance (Daniel P. Berrange)
- build: work around lack of MacOS fdatasync (Eric Blake)
- python: Fix bindings generated in VPATH build (Jiri Denemark)
- build: storage: Macro 'MKFS' is undefined on some platforms. (Peter Krempa)
- build: storage: Conditionaly compiled structure caused build fail on OSX (Peter Krempa)
- Avoid using "devname" as an identifier. (Peter Krempa)
- mingw: Don't use interface as an identifier (Matthias Bolte)
- esx: Use $(PYTHON) instead of the shebang to run the generator (Matthias Bolte)
- build: work around older systemtap header (Eric Blake)
- build: fix compilation on mingw64 (Eric Blake)
- build: fix virnetsocket on mingw (Eric Blake)
- build: fix virpidfile on mingw (Eric Blake)
- maint: fix some compilation issues on non-linux platforms (part 2) (Stefan Berger)
- maint: fix some compilation issues on non-linux platforms (Stefan Berger)
- Fix detection of GnuTLS 1.x.y (Matthias Bolte)
Bug Fixes:
- Fix crash on events due to allocation errors (Daniel Veillard)
- conf: Assign newDef of active domain as persistent conf if it is NULL (Osier Yang)
- storage: Ensure the device path exists before refreshing disk pool (Osier Yang)
- daemon: Error and exit if specified value for timeout is not valid (Osier Yang)
- vmx: avoid memory leak (Alex Jia)
- util: avoid memory leak (Alex Jia)
- remote: avoid memory leak (Alex Jia)
- qemu: avoid memory leak (Alex Jia)
- daemon: avoid memory leak (Alex Jia)
- Prevent crash from dlclose() of libvirt.so (Daniel P. Berrange)
- qemu: add return value check (Alex Jia)
- Avoid crash on restart if running guest has filterref (Stefan Berger)
- conf: avoid memory leak on virDomainDefParseXML (Alex Jia)
- Fix build after commit 829bce17 (Jim Fehlig)
- conf: add missing break in virDomainAuditRedirdev (Marc-André Lureau)
- snapshot: ABI stability must include memory sizing (Eric Blake)
- make: Fix 'make syntax-check' failing. (Peter Krempa)
- snapshot: fix double free of qemuImgBinary (Guannan Ren)
- virnetsocket: Pass KRB5CCNAME env variable (Michal Privoznik)
- Fix URL-escaping for domainDefine (Philipp Hahn)
- snapshot: fix regression with system checkpoints (Eric Blake)
- Don't treat pci_system_init failure as fatal if no PCI bus is present (Soren Hansen)
- rpc: avoid memory leak on virNetTLSContextValidCertificate (Alex Jia)
- tests: avoid memory leak on testTLSSessionInit (Alex Jia)
- libxl: avoid a dereference of a null pointer (Alex Jia)
- blockinfo: fix qemu regression in handling disk name (Eric Blake)
- esx: Fix managed object lookup with optional occurrence (Matthias Bolte)
- Threadpool: Initialize new dynamic workers (Michal Privoznik)
- Default USB device is on slot 1 function 2 (Marc-André Lureau)
- Fix localtime handling for Xen-PV domains (Philipp Hahn)
- snapshot: fix corner case on OOM during creation (Eric Blake)
- API: Init conn in case of it might be used uninitialized (Osier Yang)
- qemu: detect incomplete save files (Eric Blake)
- reserve slot 1 on pci bus0 (Wen Congyang)
- libvirtd: create run dir when running at non-root user (Xu He Jie)
- Don't overwrite errors from xend_{get,req} (Jim Fehlig)
- virsh: avoid memory leak on cmdVolCreateAs (Alex Jia)
- Fix tracking of RPC messages wrt streams (Daniel P. Berrange)
- Avoid use-after-free on streams, due to message callbacks (Daniel P. Berrange)
- Fix parted sector size assumption (Daniel P. Berrange)
- qemu: Fix a regression of domain save (Osier Yang)
- lxc: Fix incorrect changes on error codes. (Osier Yang)
- Stop libxl driver polluting logs on non-Xen hosts (Daniel P. Berrange)
- Fix memory leak parsing 'relabel' attribute in domain security XML (Daniel P. Berrange)
- Fix memory leak dispatching domain events (Daniel P. Berrange)
- Don't leak memory if a cgroup is mounted multiple times (Daniel P. Berrange)
- stream: remove redundant reference to client while sending stream data (Guannan Ren)
- Fix sanlock socket security labelling (Daniel P. Berrange)
- Fix incorrect path length check in sanlock lockspace setup (Daniel P. Berrange)
- snapshot: forbid snapshot on autodestroy domain (Eric Blake)
- Fix error detection in device change (Philipp Hahn)
- qemu: properly label outgoing pipe for tunneled migration (Eric Blake)
- Fix persistent migration config save (KAMEZAWA Hiroyuki)
- rpc: Don't close connection if program is unknown (Jiri Denemark)
- remote: Refuse connecting to remote socket (Michal Privoznik)
- Detect errors from the 'sendkey' command (Daniel P. Berrange)
- qemu: Correctly label migration TCP socket (Jiri Denemark)
- Do not try to cancel non-existent migration on source (Jiri Denemark)
- snapshot: don't leak resources on qemu snapshot failure (Eric Blake)
- Fix command test wrt gnutls initialize & fix debugging (Daniel P. Berrange)
- daemon: Move TLS initialization to virInitialize (Michal Privoznik)
- util: only fchown newly created files in virFileOpenAs (Laine Stump)
- qemu: fix off-by-one in pci slot reservation (Shradha Shah)
- pci: fix pciDeviceListSteal on multiple devices (Shradha Shah)
- qemu: Report error if qemu monitor command not found for BlockJob (Osier Yang)
- send-key: fix scan keycode map (KAMEZAWA Hiroyuki)
- storage: Flush host cache after write (Michal Privoznik)
- daemon: initialize GnuTLS (Michal Privoznik)
- Ensure async packets never get marked for sync replies (Daniel P. Berrange)
- Don't attempt to read from a stream if it is closed (Daniel P. Berrange)
- qemu: Init reattaching related members of pciDevice before reattach (Osier Yang)
- Fix race condition in abort of stream (Daniel P. Berrange)
- Ensure client streams are closed when marking a client for close (Daniel P. Berrange)
- Ensure stream is aborted when exiting console (Daniel P. Berrange)
- daemon: Add early libvirtd start verbose errors. (Peter Krempa)
- qemu: error message should show uri instead of (null) (Peter Krempa)
- libvirtd.init.in: stop/restart() - wrong return value in case of failure (Douglas Schilling Landgraf)
- daemon: Fix regression of libvirtd reloading support (Osier Yang)
- virsh: fix logic bug (Eric Blake)
- storage: Directory shouldn't be listed as type 'file' (Peter Krempa)
- network: eliminate potential memory leak on parse failure (Laine Stump)
- nwfilter: tolerate disappearing interfaces while instantiating filter (Stefan Berger)
- qemu: Fix -chardev udp if parameters are omitted (Cole Robinson)
- managedsave: prohibit use on transient domains (Eric Blake)
- Check stdoutWatch before removing the handler. (Juerg Haefliger)
- Fix memory leak while scanning snapshots (Philipp Hahn)
- build: fix regression in large file support (Eric Blake)
- Don't mount /dev for application containers (Daniel P. Berrange)
- qemu: avoid crash on process attach (Eric Blake)
- rpc:fix sasl session relocking intead of unlocking it (Guannan Ren)
- daemon: Unlink unix socket paths on shutdown (Osier Yang)
Improvements:
- Remove devname identifier from autogenerated RPC code (Peter Krempa)
- maint: Prefer names over email in 'git shortlog' (Eric Blake)
- virsh: Add more human-friendly output of domblkstat command (Peter Krempa)
- spec: silence warnings when installing in F16 (Eric Blake)
- snapshot: allow disk snapshots of qcow2 disks (Eric Blake)
- snapshot: affect persistent xml after disk snapshot (Eric Blake)
- qemu: Introduce shutdown reason for paused state (Jiri Denemark)
- qemu: Prevent disk corruption on domain shutdown (Jiri Denemark)
- qemu: Properly detect crash of a rebooted domain (Jiri Denemark)
- qemu: Fix shutoff reason when domain crashes (Jiri Denemark)
- rpc: convert unknown procedures to VIR_ERR_NO_SUPPORT (Eric Blake)
- python: Fix libvirt.py generation to include virterror info (Cole Robinson)
- sanlock: add missing test command in virt-sanlock-cleanup.in (Alex Jia)
- spec: Require augeas for sanlock (Michal Privoznik)
- Use max bandwidth from qemuDomainObjPrivate struct when migrating (Jim Fehlig)
- Set qemu migration speed unlimited when migrating to file (Jim Fehlig)
- Save migration speed in qemuDomainMigrateSetMaxSpeed (Jim Fehlig)
- Impl virDomainMigrateGetMaxSpeed in qemu driver (Jim Fehlig)
- Store max migration bandwidth in qemuDomainObjPrivate struct (Jim Fehlig)
- network: add missing exports (Eric Blake)
- xml: Clean up rest of virtual XML document names for XML strings (Peter Krempa)
- qemu_api: Update libvirt spec file (Osier Yang)
- qemu_api: Update Makefile to generate libvirtmod_qemu lib (Osier Yang)
- qemu_api: Update Py binding generator to generate files for QEMU APIs (Osier Yang)
- qemu_api: Add override XML and C files for QEMU APIs (Osier Yang)
- qemu_api: Add comments for API virDomainQemuMonitorCommand (Osier Yang)
- qemu_api: Update Makefile for subdir docs (Osier Yang)
- qemu_api: Modify apibuild.py to generate docs for QEMU APIs (Osier Yang)
- Do not log invalid operations in libvirtd logs (Daniel Veillard)
- selinux: Detect virt_use_nfs boolean set (Michal Privoznik)
- xml: Change virtual file names of xml documents parsed in memory (Peter Krempa)
- maint: update to latest gnulib (Eric Blake)
- snapshot: use new API for less work (Eric Blake)
- snapshot: new APIs for inspecting snapshot object (Eric Blake)
- virsh: fix typo in opts_send_key (Alex Jia)
- link-state: virsh: Add wrapper commands for changing link state (Peter Krempa)
- link-state: qemu: Add net intf modification to virUpdateDeviceFlags (Peter Krempa)
- link-state: qemu: Add monitor handling for link state modification (Peter Krempa)
- link-state: conf: Add element to XML for controling link state (Peter Krempa)
- link-state: util: Add equality comparison functions for structures (Peter Krempa)
- XML: Improve XML parsing error messages (Peter Krempa)
- redirdev: allows to specify device address (Marc-André Lureau)
- latency: Update virsh command domblkstat to use new API (Osier Yang)
- latency: Expose the new API for Python binding (Osier Yang)
- latency: Implemente internal API for qemu driver (Osier Yang)
- latency: Update monitor functions for new latency fields (Osier Yang)
- latency: Wire up the remote protocol (Osier Yang)
- latency: Implemente the public API (Osier Yang)
- latency: Define the internal driver callback (Osier Yang)
- qemu: Deal with stucked qemu on daemon startup (Michal Privoznik)
- qemu: Introduce job queue size limit (Michal Privoznik)
- daemon: Create priority workers pool (Michal Privoznik)
- snapshot: use SELinux and lock manager with external snapshots (Eric Blake)
- snapshot: wire up live qemu disk snapshots (Eric Blake)
- snapshot: wire up new qemu monitor command (Eric Blake)
- snapshot: make it possible to audit external snapshot (Eric Blake)
- snapshot: reject unimplemented disk snapshot features (Eric Blake)
- snapshot: wire up disk-only flag to snapshot-create (Eric Blake)
- snapshot: add flag for requesting disk snapshot (Eric Blake)
- snapshot: add virsh domblklist command (Eric Blake)
- snapshot: also support disks by path (Eric Blake)
- snapshot: add <disks> to snapshot xml (Eric Blake)
- snapshot: support extra state in snapshots (Eric Blake)
- snapshot: expose halt-after-creation in virsh (Eric Blake)
- snapshot: allow halting after snapshot (Eric Blake)
- snapshot: expose new delete flag in virsh (Eric Blake)
- snapshot: introduce new deletion flag (Eric Blake)
- snapshot: reject transient disks where code is not ready (Eric Blake)
- snapshot: additions to domain xml for disks (Eric Blake)
- Check for source conflicts in storage pools (Lei Li)
- Add a usb1 & usb2 qemuxml2argv test (Marc-André Lureau)
- PIIX3 USB controller is on function 2 (Marc-André Lureau)
- snapshot: store qemu domain details in xml (Eric Blake)
- snapshot: update rng to support full domain in xml (Eric Blake)
- snapshot: correctly escape generated xml (Eric Blake)
- snapshot: allow full domain xml in snapshot (Eric Blake)
- snapshot: refactor domain xml output (Eric Blake)
- snapshot: prevent migration from stranding snapshot data (Eric Blake)
- snapshot: support new undefine flags in qemu (Eric Blake)
- snapshot: cache qemu-img location (Eric Blake)
- snapshot: refactor some qemu code (Eric Blake)
- snapshot: teach virsh about new undefine flags (Eric Blake)
- snapshot: prevent stranding snapshot data on domain destruction (Eric Blake)
- snapshot: add qemu snapshot redefine support (Eric Blake)
- snapshot: add qemu snapshot creation without metadata (Eric Blake)
- snapshot: improve virsh snapshot-create, add snapshot-edit (Eric Blake)
- snapshot: refactor virsh snapshot creation (Eric Blake)
- snapshot: allow recreation of metadata (Eric Blake)
- snapshot: identify qemu snapshot roots (Eric Blake)
- snapshot: reflect new dumpxml and list options in virsh (Eric Blake)
- snapshot: identify which snapshots have metadata (Eric Blake)
- snapshot: let qemu discard only snapshot metadata (Eric Blake)
- snapshot: allow deletion of just snapshot metadata (Eric Blake)
- snapshot: simplify acting on just children (Eric Blake)
- snapshot: track current domain across deletion of children (Eric Blake)
- snapshot: avoid crash when deleting qemu snapshots (Eric Blake)
- snapshot: speed up snapshot location (Eric Blake)
- snapshot: add snapshot-list --parent to virsh (Eric Blake)
- snapshot: fine-tune qemu snapshot revert states (Eric Blake)
- snapshot: properly revert qemu to offline snapshots (Eric Blake)
- snapshot: improve reverting to qemu paused snapshots (Eric Blake)
- snapshot: fine-tune qemu saved images starting paused (Eric Blake)
- snapshot: expose --running and --paused in virsh (Eric Blake)
- snapshot: fine-tune ability to start paused (Eric Blake)
- snapshot: better events when starting paused (Eric Blake)
- Learn to use spicevmc as a redirection type for usb-redir (Marc-André Lureau)
- Add "redirdev" redirection device (Marc-André Lureau)
- qemu: Don't append 0 at usb id, so that it is compatible with legacy -usb (Marc-André Lureau)
- qemu: don't reserve slot 1 if a PIIX3 USB controller is defined there (Marc-André Lureau)
- Modify USB port to be defined as a port path (Marc-André Lureau)
- Add USB companion controllers support (Marc-André Lureau)
- USB devices gain a new USB address child element (Marc-André Lureau)
- test: USB controller can have a PCI address child element (Marc-André Lureau)
- Add a new controller type 'usb' with optionnal 'model' (Marc-André Lureau)
- Add USB controller models (Marc-André Lureau)
- Rename virDomainControllerModel to virDomainControllerModelSCSI (Marc-André Lureau)
- Add various USB devices QEMU_CAPS (Marc-André Lureau)
- tests: add missing files (Eric Blake)
- Add directsync cache mode support for disk driver (Osier Yang)
- storage: Add virsh support for fs pool formating (Osier Yang)
- storage: Add mkfs and libblkid to build system (Osier Yang)
- qemu: refactor file opening (Eric Blake)
- lxc: do not require 'ifconfig' or 'ipconfig' in container (Scott Moser)
- Create ptmx as a device (Serge Hallyn)
- BlockPull: Set initial bandwidth limit if specified (Adam Litke)
- BlockJob: Bandwidth parameter is in MB when using text monitor (Adam Litke)
- Increase size of buffer for xend response (Jim Fehlig)
- virsh: support 'virsh start --force-boot' on older servers (Eric Blake)
- build: fix 'make check' with pdwtags (Eric Blake)
- virsh: Expose virDomainMigrateGetMaxSpeed API (Jim Fehlig)
- virsh: prefer unsigned flags (Eric Blake)
- storage: Fix incorrect error codes (Osier Yang)
- remote: Fix incorrect error codes (Osier Yang)
- nodeinfo: Fix incorrect error codes (Osier Yang)
- conf: Substitute OPERATION_INVALID with INTERNAL_ERROR (Osier Yang)
- start: allow discarding managed save (Eric Blake)
- build: simplify use of verify (Eric Blake)
- rpc: fix a typo in debugging log in virNetServerProgramSendStreamData (Guannan Ren)
- maint: fix spelling errors on lose (Eric Blake)
- Fix generator to cope with call-by-ref long types (Jim Fehlig)
- hyperv: Add OpenWSMAN based client for the Hyper-V WMI API (Matthias Bolte)
- hyperv: Add driver skeleton (Matthias Bolte)
- hyperv: Add configure check for OpenWSMAN (Matthias Bolte)
- virterror: Fix error message for VIR_ERR_INVALID_ARG (Michal Privoznik)
- Fix keymap used to talk with QEMU (Daniel P. Berrange)
- security: Introduce SetSocketLabel (Jiri Denemark)
- security: Rename SetSocketLabel APIs to SetDaemonSocketLabel (Jiri Denemark)
- Ignore unused streams in virStreamAbort (Jiri Denemark)
- snapshot: track current snapshot across restarts (Eric Blake)
- snapshot: only pass snapshot to qemu command line when reverting (Eric Blake)
- libvirt: log all flags parameters (Eric Blake)
- virsh: add list --managed-save (Eric Blake)
- esx: Refactor a repeated string in the generator (Matthias Bolte)
- maint: fix comment typos (Eric Blake)
- virsh: Substitute goto label out with cleanup (Osier Yang)
- virsh: Do not try to free domain if it is NULL (Osier Yang)
- xen: Cleanup improper VIR_ERR_NO_SUPPORT use (Osier Yang)
- storage: Cleanup improper VIR_ERR_NO_SUPPORT use (Osier Yang)
- remote: Cleanup improper VIR_ERR_NO_SUPPORT use (Osier Yang)
- qemu: Cleanup improper VIR_ERR_NO_SUPPORT use (Osier Yang)
- nodeinfo: Cleanup improper VIR_ERR_NO_SUPPORT use (Osier Yang)
- lxc: Cleanup improper VIR_ERR_NO_SUPPORT use (Osier Yang)
- conf: Cleanup improper use of VIR_ERR_NO_SUPPORT in node_device_conf (Osier Yang)
- qemu: Substitute VIR_ERR_NO_SUPPORT with VIR_ERR_OPERATION_INVALID (Osier Yang)
- virsh: Print error if specified bandwidth is invalid for blockjob (Osier Yang)
- virsh: properly interleave shared stdout and stderr (Eric Blake)
- maint: simplify lots of libxml2 clients (Eric Blake)
- xml: add another convenience function (Eric Blake)
- maint: treat more libxml2 functions as free-like (Eric Blake)
- test: rewrite test to match change in behavior (Eric Blake)
- build: fix typo in recent test patch (Eric Blake)
- vmware: Allow to undefine a running domain (Osier Yang)
- uml: Allow to undefine a running domain (Osier Yang)
- test: Allow to undefine a running domain (Osier Yang)
- qemu: Allow to undefine a running domain (Osier Yang)
- openvz: Allow to undefine a running domain (Osier Yang)
- lxc: Allow to undefine a running domain (Osier Yang)
- libxl: Allow to undefine a running domain. (Osier Yang)
- qemu: Get memory balloon info correctly for text monitor (Osier Yang)
- qemu: disk migration verbose progress (Tom Vijlbrief)
- virsh: concatenate qemu-monitor-command arguments (Eric Blake)
- virsh: tweak misleading wording (Eric Blake)
- Tweak debugging message in RPC client code (Daniel P. Berrange)
- maint: add missing symbols (Stefan Berger)
- macvtap: Fix getPhysfn to get the PF of a direct attach network interface (Roopa Prabhu)
- interface: Add functions to get sriov PF/VF relationship of a net interface (Roopa Prabhu)
- pci: Add helper functions for sriov devices (Roopa Prabhu)
- pci: Move some pci sriov helper code out of node device driver to util/pci (Roopa Prabhu)
- qemu: support event_idx parameter for virtio disk and net devices (Laine Stump)
- qemu: Use fd: protocol for migration (Jiri Denemark)
- qemu: Use virNetSocket for tunneled migration (Jiri Denemark)
- qemu: Refactor do{Tunnel,Native}Migrate functions (Jiri Denemark)
- Support changing UNIX socket owner in virNetSocketNewListenUNIX (Jiri Denemark)
- Add backlog parameter to virNetSocketListen (Jiri Denemark)
- Add API for duplicating a socket/client file descriptor (Daniel P. Berrange)
- Swap virDomain / virDomainSnapshot declaration (Philipp Hahn)
- build: fix recent build failures (Eric Blake)
- Convert libvirtd to use crash-safe pidfile APIs (Daniel P. Berrange)
- Add some APIs which use locking for crashsafe pidfile handling (Daniel P. Berrange)
- Introduce functions for checking whether a pidfile is valid (Daniel P. Berrange)
- Move pidfile functions into util/virpidfile.{c,h} (Daniel P. Berrange)
- Add virFileLock and virFileUnlock APIs (Daniel P. Berrange)
- vbox, xenapi: add virDomainUndefineFlags (Eric Blake)
- virsh: don't reject undefine on active domain (Eric Blake)
- virsh: Add dir type for listing volumes with vol-list (Peter Krempa)
- virsh: add snapshot-parent (Eric Blake)
- virsh: add virsh snapshot-current --name (Eric Blake)
- virsh: fix snapshot-create-as to handle arbitrary names (Eric Blake)
- qemu: minor formatting cleanup (Eric Blake)
- Allow use of file images for LXC container filesystems (Daniel P. Berrange)
- Fix typo in LXC cgroups setup error message (Daniel P. Berrange)
- Allow use of block devices for guest filesystem (Daniel P. Berrange)
- qemu: Avoid overwriting errors from virGetHostname (Jiri Denemark)
- network: eliminate lag in updating dnsmasq hosts files (Laine Stump)
- build: update to latest gnulib (Eric Blake)
Cleanups:
- maint: ignore generated files (Eric Blake)
- Remove two references to files not generated (Daniel Veillard)
- latency: fix make check for remote protocol structs and numbers (Daniel Veillard)
- security: fix build (Eric Blake)
- Remove bogus virSecurityManagerSetProcessFDLabel method (Daniel P. Berrange)
- libvirt: avoid dead store in virDomainMigrateVersion3 (Alex Jia)
- qemu: avoid dead store in doPeer2PeerMigrate3 (Alex Jia)
- maint: ignore generated file (Eric Blake)
- maint: ignore generated file (Eric Blake)
- maint: let emacs avoid tabs in rng files (Eric Blake)
- virsh: fix dead store (Eric Blake)
- qemu: silence clang false positive (Eric Blake)
- qemu: avoid dead store in qemuMonitorTextBlockJob (Alex Jia)
- qemu: avoid dead store in qemuProcessStart (Alex Jia)
Thanks to everybody who contributed to this release, by submitting
bug, reports, documentation, patches or just ideas !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
13 years, 3 months
Re: [Libvirt-announce] [libvirt] libvirt-0.9.5 availability of rc2
by Daniel Veillard
On Mon, Sep 19, 2011 at 08:15:18AM -0500, Adam Litke wrote:
> On Mon, Sep 19, 2011 at 04:04:04PM +0800, Daniel Veillard wrote:
> > On Sun, Sep 18, 2011 at 09:37:22AM -0500, Adam Litke wrote:
> > Hum, I wonder if remoteRelayDomainEventBlockJob shouldn't strdup the
> > path string instead of using it directly in the
> > remote_domain_event_block_job_msg block. As a result since we now
> > free the datapointed by the xdr message within
> > remoteDispatchDomainEventSend() , this errors wasn't shown before but
> > leads to a double free now.
> >
> > BTW it seems we don't check all allocations in the xdr code (on purpose
> > ?) for example make_nonnull_domain() doesn't check a strdup.
> >
> > Could you check the following patch ?
>
> Yep, this seems to fix the problem (and an extra check with valgrind shows no
> memory leaks. Although I haven't verified it, the functions:
>
> remoteRelayDomainEventIOError
> remoteRelayDomainEventIOErrorReason
> remoteRelayDomainEventGraphics
>
> appear to have the same problem as well.
Right though they do far more allocations. I ended up pushing the
following patch which tries to be a bit better on handling memory
allocation error, but it's not fully complete yet:
Fix crash on events due to allocation errors
remoteRelayDomainEventBlockJob, remoteRelayDomainEventIOError,
remoteRelayDomainEventIOErrorReason and remoteRelayDomainEventGraphics
were using const string directly in rpc structure, before calling
remoteDispatchDomainEventSend(). But that routine now frees up all
the pointed allocated memory from the rpc structure and we end up
with a double free.
This now strdup() all the strings passed and provide mem_error goto
labels to be used when an allocation error occurs.
Note that the cleanup isn't completely finished because all relaying
function also call make_nonnull_domain() which also allocate a string
and never handle the error case. This patches doesn't try to address
this as this is only error correctness a priori and touches far more
functions in this module:
* daemon/remote.c: fix string allocations and memory error handling
for remoteRelayDomainEventBlockJob, remoteRelayDomainEventIOError,
remoteRelayDomainEventIOErrorReason and remoteRelayDomainEventGraphics
diff --git a/daemon/remote.c b/daemon/remote.c
index 45244f8..74e759a 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -234,9 +234,13 @@ static int remoteRelayDomainEventIOError(virConnectPtr conn ATTRIBUTE_UNUSED,
/* build return data */
memset(&data, 0, sizeof data);
+ data.srcPath = strdup(srcPath);
+ if (data.srcPath == NULL)
+ goto mem_error;
+ data.devAlias = strdup(devAlias);
+ if (data.devAlias == NULL)
+ goto mem_error;
make_nonnull_domain(&data.dom, dom);
- data.srcPath = (char*)srcPath;
- data.devAlias = (char*)devAlias;
data.action = action;
remoteDispatchDomainEventSend(client, remoteProgram,
@@ -244,6 +248,11 @@ static int remoteRelayDomainEventIOError(virConnectPtr conn ATTRIBUTE_UNUSED,
(xdrproc_t)xdr_remote_domain_event_io_error_msg, &data);
return 0;
+mem_error:
+ virReportOOMError();
+ virFree(data.srcPath);
+ virFree(data.devAlias);
+ return -1;
}
@@ -266,17 +275,31 @@ static int remoteRelayDomainEventIOErrorReason(virConnectPtr conn ATTRIBUTE_UNUS
/* build return data */
memset(&data, 0, sizeof data);
- make_nonnull_domain(&data.dom, dom);
- data.srcPath = (char*)srcPath;
- data.devAlias = (char*)devAlias;
+ data.srcPath = strdup(srcPath);
+ if (data.srcPath == NULL)
+ goto mem_error;
+ data.devAlias = strdup(devAlias);
+ if (data.devAlias == NULL)
+ goto mem_error;
data.action = action;
- data.reason = (char*)reason;
+ data.reason = strdup(reason);
+ if (data.reason == NULL)
+ goto mem_error;
+
+ make_nonnull_domain(&data.dom, dom);
remoteDispatchDomainEventSend(client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_IO_ERROR_REASON,
(xdrproc_t)xdr_remote_domain_event_io_error_reason_msg, &data);
return 0;
+
+mem_error:
+ virReportOOMError();
+ virFree(data.srcPath);
+ virFree(data.devAlias);
+ virFree(data.reason);
+ return -1;
}
@@ -308,33 +331,62 @@ static int remoteRelayDomainEventGraphics(virConnectPtr conn ATTRIBUTE_UNUSED,
/* build return data */
memset(&data, 0, sizeof data);
- make_nonnull_domain(&data.dom, dom);
data.phase = phase;
- data.authScheme = (char*)authScheme;
-
data.local.family = local->family;
- data.local.node = (char *)local->node;
- data.local.service = (char *)local->service;
-
data.remote.family = remote->family;
- data.remote.node = (char*)remote->node;
- data.remote.service = (char*)remote->service;
+ data.authScheme = strdup(authScheme);
+ if (data.authScheme == NULL)
+ goto mem_error;
+
+ data.local.node = strdup(local->node);
+ if (data.local.node == NULL)
+ goto mem_error;
+ data.local.service = strdup(local->service);
+ if (data.local.service == NULL)
+ goto mem_error;
+
+ data.remote.node = strdup(remote->node);
+ if (data.remote.node == NULL)
+ goto mem_error;
+ data.remote.service = strdup(remote->service);
+ if (data.remote.service == NULL)
+ goto mem_error;
data.subject.subject_len = subject->nidentity;
- if (VIR_ALLOC_N(data.subject.subject_val, data.subject.subject_len) < 0) {
- virReportOOMError();
- return -1;
- }
+ if (VIR_ALLOC_N(data.subject.subject_val, data.subject.subject_len) < 0)
+ goto mem_error;
+
for (i = 0 ; i < data.subject.subject_len ; i++) {
- data.subject.subject_val[i].type = (char*)subject->identities[i].type;
- data.subject.subject_val[i].name = (char*)subject->identities[i].name;
+ data.subject.subject_val[i].type = strdup(subject->identities[i].type);
+ if (data.subject.subject_val[i].type == NULL)
+ goto mem_error;
+ data.subject.subject_val[i].name = strdup(subject->identities[i].name);
+ if (data.subject.subject_val[i].name == NULL)
+ goto mem_error;
}
+ make_nonnull_domain(&data.dom, dom);
remoteDispatchDomainEventSend(client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_GRAPHICS,
(xdrproc_t)xdr_remote_domain_event_graphics_msg, &data);
return 0;
+
+mem_error:
+ virReportOOMError();
+ virFree(data.authScheme);
+ virFree(data.local.node);
+ virFree(data.local.service);
+ virFree(data.remote.node);
+ virFree(data.remote.service);
+ if (data.subject.subject_val != NULL) {
+ for (i = 0 ; i < data.subject.subject_len ; i++) {
+ virFree(data.subject.subject_val[i].type);
+ virFree(data.subject.subject_val[i].name);
+ }
+ virFree(data.subject.subject_val);
+ }
+ return -1;
}
static int remoteRelayDomainEventBlockJob(virConnectPtr conn ATTRIBUTE_UNUSED,
@@ -355,16 +407,23 @@ static int remoteRelayDomainEventBlockJob(virConnectPtr conn ATTRIBUTE_UNUSED,
/* build return data */
memset(&data, 0, sizeof data);
- make_nonnull_domain(&data.dom, dom);
- data.path = (char*)path;
+ data.path = strdup(path);
+ if (data.path == NULL)
+ goto mem_error;
data.type = type;
data.status = status;
+ make_nonnull_domain(&data.dom, dom);
remoteDispatchDomainEventSend(client, remoteProgram,
REMOTE_PROC_DOMAIN_EVENT_BLOCK_JOB,
(xdrproc_t)xdr_remote_domain_event_block_job_msg, &data);
return 0;
+
+mem_error:
+ virReportOOMError();
+ virFree(data.path);
+ return -1;
}
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
13 years, 3 months
Re: [Libvirt-announce] [libvirt] libvirt-0.9.5 availability of rc2
by Daniel Veillard
On Sun, Sep 18, 2011 at 09:37:22AM -0500, Adam Litke wrote:
> I am getting SIGABRT and SIGSEGV in libvirtd when trying to catch blockJob
> events.
>
> When running under valgrind I get the following:
> ==19819== Thread 1:
> ==19819== Invalid free() / delete / delete[]
> ==19819== at 0x4C282ED: free (vg_replace_malloc.c:366)
> ==19819== by 0x4E7B48: virFree (memory.c:310)
> ==19819== by 0x7669C32: virDomainEventFree (domain_event.c:510)
> ==19819== by 0x766AFE2: virDomainEventQueueDispatch (domain_event.c:1154)
> ==19819== by 0x766B19D: virDomainEventStateFlush (domain_event.c:1195)
> ==19819== by 0x483E15: qemuDomainEventFlush (qemu_domain.c:134)
> ==19819== by 0x507535: virEventPollRunOnce (event_poll.c:421)
> ==19819== by 0x4E6D44: virEventRunDefaultImpl (event.c:247)
> ==19819== by 0x44813C: virNetServerRun (virnetserver.c:701)
> ==19819== by 0x41FECE: main (libvirtd.c:1564)
> ==19819== Address 0x131b0a30 is 0 bytes inside a block of size 15 free'd
> ==19819== at 0x4C282ED: free (vg_replace_malloc.c:366)
> ==19819== by 0x7FB006C: xdr_string (xdr.c:722)
> ==19819== by 0x43A5FD: xdr_remote_nonnull_string (remote_protocol.c:30)
> ==19819== by 0x442E2B: xdr_remote_domain_event_block_job_msg
> (remote_protocol.c:4000)
> ==19819== by 0x7FAF6C4: xdr_free (xdr.c:72)
> ==19819== by 0x431BDA: remoteRelayDomainEventBlockJob (remote.c:363)
Hum, I wonder if remoteRelayDomainEventBlockJob shouldn't strdup the
path string instead of using it directly in the
remote_domain_event_block_job_msg block. As a result since we now
free the datapointed by the xdr message within
remoteDispatchDomainEventSend() , this errors wasn't shown before but
leads to a double free now.
BTW it seems we don't check all allocations in the xdr code (on purpose
?) for example make_nonnull_domain() doesn't check a strdup.
Could you check the following patch ?
Daniel
diff --git a/daemon/remote.c b/daemon/remote.c
index 38bbb10..1d9156c 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -356,7 +356,11 @@ static int remoteRelayDomainEventBlockJob(virConnectPtr conn ATTRIBUTE_UNUSED,
/* build return data */
memset(&data, 0, sizeof data);
make_nonnull_domain(&data.dom, dom);
- data.path = (char*)path;
+ data.path = strdup(path);
+ if (data.path == NULL) {
+ virReportOOMError();
+ return -1;
+ }
data.type = type;
data.status = status;
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
13 years, 3 months
Re: [Libvirt-announce] [libvirt] libvirt-0.9.5 availability of rc3
by Daniel Veillard
On Sun, Sep 18, 2011 at 08:48:23PM -0700, Jason Helfman wrote:
> On Sun, Sep 18, 2011 at 06:55:06PM +0800, Daniel Veillard thus spake:
> >I have made a third release candidate tarball (and associated rpms) at
> > ftp://libvirt.org/libvirt/libvirt-0.9.5-rc2.tar.gz
> >and tagged in git for it.
> >This one should fis the MacOS-X/BSD portability problem thanks to Peter
> >and Eric, and if everything goes well I will probably release 0.9.5 on
> >Monday or more likely on Tuesday to give people a bit more time to test that
> >latest candidate
> >
> > So give it a try, thanks !
> >
> >Daniel
> >
>
> Failed build on FreeBSD:
>
> gmake[3]: Entering directory
> `/home/jhelfman/ports/devel/libvirt/work/libvirt-0.9.5/src'
> CCLD libvirt_iohelper
> ./.libs/libvirt_util.a(libvirt_util_la-threads.o)(.text+0x263): In
> function `virThreadCreate':
> : undefined reference to `pthread_create'
Hum, it compiles so you have pthreads on the system, but maybe it
needs to be linked through a special -lpthread linker option
Looking at configure.ac it seems that gnulib is setting $LIB_PTHREAD
can you look in your config.log for pthread lookup result and
in the resulting src/Makefile to see how LIB_PTHREAD is set,
thanks,
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
13 years, 3 months