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 660295 - Remote volume monitor proxy disposed but not finalized
Remote volume monitor proxy disposed but not finalized
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2011-09-27 21:32 UTC by David Zeuthen (not reading bugmail)
Modified: 2011-09-28 13:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (5.91 KB, patch)
2011-09-27 21:33 UTC, David Zeuthen (not reading bugmail)
none Details | Review

Description David Zeuthen (not reading bugmail) 2011-09-27 21:32:55 UTC
Due to reference count juggling, we can easily end up in a situation where an instance of a subclass of GProxyVolumeMonitor is disposed but not yet finalized. For example, this happens in situations where you run 'gvfs-mount -d /dev/sdb1'.

I discovered this problem while developing an udisks2-based volume monitor (to replace the gdu volume monitor).

While it's possible to fix this [1], a much better solution is just to keep the remote volume monitor proxy around forever.

[1] : for example, by moving

 g_hash_table_remove (the_volume_monitors, (gpointer) type);

into the dispose handler... but this fix alone is not sufficient.
Comment 1 David Zeuthen (not reading bugmail) 2011-09-27 21:33:53 UTC
Created attachment 197609 [details] [review]
Patch

Once constructed, keep proxies for remote volume monitor processes around forever.
Comment 2 David Zeuthen (not reading bugmail) 2011-09-28 13:55:49 UTC
Committed on master (branched for 3.2 before that):

 http://git.gnome.org/browse/gvfs/commit/?id=7f976371da249ef587925145c0eedf9f86f4696d