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 790427 - The process:/usr/libexec/gvfs-udisks2-volume-monitor seems to have memory leaks when mounting a media iso in CentOS7.4
The process:/usr/libexec/gvfs-udisks2-volume-monitor seems to have memory lea...
Status: RESOLVED OBSOLETE
Product: gvfs
Classification: Core
Component: udisks2 volume monitor
1.22.x
Other Linux
: Normal major
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2017-11-16 02:45 UTC by tianhang
Modified: 2018-09-21 18:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
udisks2: Fix leaks when updating fstab volumes (1.45 KB, patch)
2017-11-17 07:52 UTC, Ondrej Holy
none Details | Review
udisks2: Fix leaks when updating volumes (1.05 KB, patch)
2017-11-17 08:33 UTC, Ondrej Holy
none Details | Review

Description tianhang 2017-11-16 02:45:57 UTC
when i mount some  media iso in CentOS7.4 ,I find that the memory of gvfs-udisks2-volume-monitor increased.
but when I unmount these media iso ,the memory of gvfs-udisks2-volume-monitor will not decrease anymore.

should this be a bug of gvfs ?

looking forward for your reply,thank you .
Comment 1 Ondrej Holy 2017-11-16 16:17:53 UTC
I got similar bug report downstream recently, see:
https://bugzilla.redhat.com/show_bug.cgi?id=1512887

But I don't see any significant increase in memory usage. How much does it increase? How do you measure it?

Yes, there are some leaks which would be nice to fix but we are talking about bytes, nothing crucial. But I will happily accept patches fixing those issues...
Comment 2 Ondrej Holy 2017-11-17 07:52:36 UTC
Created attachment 363889 [details] [review]
udisks2: Fix leaks when updating fstab volumes

g_list_remove_link is used by mistake when filtering mount points
instead of g_list_delete_link, which causes leaks with each update.
Fix this and two relevant leaks.
Comment 3 Ondrej Holy 2017-11-17 07:54:14 UTC
Is there any chance you can test the attached patch?
Comment 4 Ondrej Holy 2017-11-17 08:33:50 UTC
Created attachment 363894 [details] [review]
udisks2: Fix leaks when updating volumes

Icons and description may be leaked with each volume update, let's fix it.
Comment 5 Ondrej Holy 2017-11-17 08:41:13 UTC
I've also proposed one fix for udisks:
https://github.com/storaged-project/udisks/pull/450
Comment 6 tianhang 2017-11-17 08:50:13 UTC
(In reply to Ondrej Holy from comment #5)
> I've also proposed one fix for udisks:
> https://github.com/storaged-project/udisks/pull/450

thank you very much.
I am going to test these patches
Comment 7 tianhang 2017-11-21 02:16:40 UTC
Thank yo for your work, I have test these patches with the script in udisks2 page:

https://bugzilla.redhat.com/show_bug.cgi?id=1512887

#!/bin/sh
for((i=0;i<10000;i++))
{
modprobe zram num_devices=2048
rmmod zram
}

But i find the memory still increased,but never decrease.
Comment 8 Ondrej Holy 2017-11-21 07:41:48 UTC
Thanks for testing. How much does it increase? How do you measure it? Can you please provide valgrind output using the following steps:

1/ install necessary debuginfo:
debuginfo-install gvfs glib2 udisks2
2/ run udisks2 volume monitor in valgrind:
valgrind --leak-check=full --track-origins=yes --show-reachable=yes --log-file=valgrind.log /usr/libexec/gvfs-udisks2-volume-monitor --replace
3/ run the test from Comment 7
4/ interrupt valgrind by Ctrl+C and please attach valgrind.log here
Comment 9 GNOME Infrastructure Team 2018-09-21 18:15:03 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/319.