After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 563418 - gvfs backend leaks monitors
gvfs backend leaks monitors
Status: RESOLVED OBSOLETE
Product: gvfs
Classification: Core
Component: daemon
unspecified
Other All
: Normal minor
: ---
Assigned To: gvfs-maint
gvfs-maint
: 563419 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-12-06 06:05 UTC by Allison Karlitskaya (desrt)
Modified: 2018-09-21 16:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Send the object_path when canceling monitor (528 bytes, patch)
2009-03-10 16:00 UTC, Alexander Larsson
committed Details | Review
Fixes crash (1.16 KB, patch)
2009-03-13 09:47 UTC, Alexander Larsson
committed Details | Review

Description Allison Karlitskaya (desrt) 2008-12-06 06:05:28 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
Comment 1 Bruno Boaventura 2008-12-06 13:03:56 UTC
*** Bug 563419 has been marked as a duplicate of this bug. ***
Comment 2 David Zeuthen (not reading bugmail) 2008-12-06 15:03:08 UTC
sounds like you mean GFileMonitor (could also be GVolumeMonitor)
Comment 3 Allison Karlitskaya (desrt) 2008-12-06 18:21:39 UTC
gvfs/daemon/gvfsmonitor.c implements a dbus-exported object:

  * subscribe() dbus method -> g_object_ref()
  * unsubscribe() dbus method -> g_object_unref()

Comment 4 Allison Karlitskaya (desrt) 2008-12-12 17:20:44 UTC
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?
Comment 5 Alexander Larsson 2009-03-10 15:46:46 UTC
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.
Comment 6 Alexander Larsson 2009-03-10 16:00:26 UTC
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.
Comment 7 Alexander Larsson 2009-03-10 16:03:10 UTC
ryan: Oh, and we can't use signals, because this is using peer-to-peer connections, not the session bus.
Comment 8 Alexander Larsson 2009-03-10 16:09:25 UTC
However, we should be able to track clients dying in gvfsdaemon.c:peer_to_peer_filter_func().
Comment 9 Alexander Larsson 2009-03-10 16:22:42 UTC
commited the fix.
We should handle the client dying too though.
Comment 10 Alexander Larsson 2009-03-13 09:47:30 UTC
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.
Comment 11 Alexander Larsson 2009-03-13 13:10:26 UTC
crasher fix commited.
Comment 12 GNOME Infrastructure Team 2018-09-21 16:32:08 UTC
-- 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.