[PATCH 0/9] Fix stream event opaque data leak and improve debugging

Peter Krempa via Devel posted 9 patches 5 months, 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1778776606.git.pkrempa@redhat.com
src/libvirt_probes.d                | 12 +++++------
src/remote/remote_daemon_dispatch.c |  5 +++++
src/remote/remote_daemon_stream.c   |  5 +++--
src/remote/remote_driver.c          |  9 +++++++-
src/rpc/virnetclientstream.c        |  4 ++++
src/util/virobject.c                | 33 +++++++++++++++++++++++++----
src/util/virprobe.h                 | 14 ++++++++++++
7 files changed, 69 insertions(+), 13 deletions(-)
[PATCH 0/9] Fix stream event opaque data leak and improve debugging
Posted by Peter Krempa via Devel 5 months, 4 weeks ago
This series fixes a leak of the 'opaque' pointer registered as private
data for virStream Event callback. This manifests itself as leak of
connections to virtstoraged in modular deployments if e.g. virsh
vol-upload is used.

The rest of the series adds various VIR_DEBUG statements and logging of
class name and reference count for virObject(Un)Ref.

Peter Krempa (9):
  remote_driver: Don't leak opaque pointer passed to
    'virStreamEventAddCallback'
  libvirt_probes: Fix alignment of 'virobject' probe points
  util: probe: Add 'PROBE_DEBUG'
  util: object: Downgrade PROBE points to PROBE_DEBUG
  util: object: Add class name to the Ref/Unref/Dispose debug messages
  daemonRemoveClientStream: Add debug log
  remoteClientFree: Add debug log of parameters
  virNetClientStreamEventRemoveCallback: Add debug log
  util: virobject: Add debug refcounting output

 src/libvirt_probes.d                | 12 +++++------
 src/remote/remote_daemon_dispatch.c |  5 +++++
 src/remote/remote_daemon_stream.c   |  5 +++--
 src/remote/remote_driver.c          |  9 +++++++-
 src/rpc/virnetclientstream.c        |  4 ++++
 src/util/virobject.c                | 33 +++++++++++++++++++++++++----
 src/util/virprobe.h                 | 14 ++++++++++++
 7 files changed, 69 insertions(+), 13 deletions(-)

-- 
2.54.0
Re: [PATCH 0/9] Fix stream event opaque data leak and improve debugging
Posted by Ján Tomko via Devel 5 months, 4 weeks ago
On a Thursday in 2026, Peter Krempa via Devel wrote:
>This series fixes a leak of the 'opaque' pointer registered as private
>data for virStream Event callback. This manifests itself as leak of
>connections to virtstoraged in modular deployments if e.g. virsh
>vol-upload is used.
>
>The rest of the series adds various VIR_DEBUG statements and logging of
>class name and reference count for virObject(Un)Ref.
>
>Peter Krempa (9):
>  remote_driver: Don't leak opaque pointer passed to
>    'virStreamEventAddCallback'
>  libvirt_probes: Fix alignment of 'virobject' probe points
>  util: probe: Add 'PROBE_DEBUG'
>  util: object: Downgrade PROBE points to PROBE_DEBUG
>  util: object: Add class name to the Ref/Unref/Dispose debug messages
>  daemonRemoveClientStream: Add debug log
>  remoteClientFree: Add debug log of parameters
>  virNetClientStreamEventRemoveCallback: Add debug log
>  util: virobject: Add debug refcounting output
>
> src/libvirt_probes.d                | 12 +++++------
> src/remote/remote_daemon_dispatch.c |  5 +++++
> src/remote/remote_daemon_stream.c   |  5 +++--
> src/remote/remote_driver.c          |  9 +++++++-
> src/rpc/virnetclientstream.c        |  4 ++++
> src/util/virobject.c                | 33 +++++++++++++++++++++++++----
> src/util/virprobe.h                 | 14 ++++++++++++
> 7 files changed, 69 insertions(+), 13 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano