From 0973d6e3314cc0f0ff1e5024feb131c2187d97f2 Mon Sep 17 00:00:00 2001 From: Tony Asleson Date: Fri, 12 Aug 2016 14:31:06 -0500 Subject: [PATCH] notify: Fix hang with lvm shell & --enable-notify-dbus When lvm is compiled with --enable-notify-dbus and a user uses lvm shell, after they issue 200+ commands the lvm shell will hang for ~30 seconds trying to notify the lvm dbus service that a change has occurred. This appears to be caused by resource exhaustion, because the sockets used for dbus communication are not be closed. --- lib/notify/lvmnotify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/notify/lvmnotify.c b/lib/notify/lvmnotify.c index afad93b61..e9f8e290e 100644 --- a/lib/notify/lvmnotify.c +++ b/lib/notify/lvmnotify.c @@ -73,7 +73,7 @@ void lvmnotify_send(struct cmd_context *cmd) out: sd_bus_error_free(&error); sd_bus_message_unref(m); - sd_bus_unref(bus); + sd_bus_flush_close_unref(bus); } void set_vg_notify(struct cmd_context *cmd)