GNOME Bugzilla – Bug 563418
gvfs backend leaks monitors
Last modified: 2018-09-21 16:32:08 UTC
1) neither nautilus nor gvfs-monitor-dir seem to ever call unsubscribe 2) there's no checking for NameOwnerChanged when a process disconnects (or crashes) without unsubscribing
*** Bug 563419 has been marked as a duplicate of this bug. ***
sounds like you mean GFileMonitor (could also be GVolumeMonitor)
gvfs/daemon/gvfsmonitor.c implements a dbus-exported object: * subscribe() dbus method -> g_object_ref() * unsubscribe() dbus method -> g_object_unref()
out of interest of simplifying the way the subscribing to monitors works would it be possible to change the current system (where subscribers are each directly sent a method call message) to a system where signals are used instead?
We do get a G_VFS_DBUS_MONITOR_OP_UNSUBSCRIBE message sent, but when parsing the args we get: "org.freedesktop.DBus.Error.InvalidArgs", "Argument 0 is specified to be of type \"object_path\", but is actually of type \"invalid\"\n" Need to look into this.
Created attachment 130409 [details] [review] Send the object_path when canceling monitor Turns out we weren't constructing the cancel message correctly, we forgot to add the object path of the client side monitor.
ryan: Oh, and we can't use signals, because this is using peer-to-peer connections, not the session bus.
However, we should be able to track clients dying in gvfsdaemon.c:peer_to_peer_filter_func().
commited the fix. We should handle the client dying too though.
Created attachment 130575 [details] [review] Fixes crash Seems that there was a crasher in the unsubscribe code that shows up now that we actually unsubscribe.
crasher fix commited.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gvfs/issues/75.