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 661619 - glib trying to put inotify watch on old directory
glib trying to put inotify watch on old directory
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: gio
2.28.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-10-13 02:18 UTC by Patrick H
Modified: 2018-05-24 13:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdb stack trace of firefox being hung (3.22 KB, text/plain)
2011-10-13 02:18 UTC, Patrick H
Details
break point on ip_watched_dir_new opening file selection dialog (11.77 KB, text/plain)
2011-10-13 02:19 UTC, Patrick H
Details
break point on ip_watched_dir_new after unmounting (4.12 KB, text/plain)
2011-10-13 02:20 UTC, Patrick H
Details

Description Patrick H 2011-10-13 02:18:09 UTC
Created attachment 198900 [details]
gdb stack trace of firefox being hung

I'm bringing this bug from firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=692545).

What appears to be happening is that when using a GTK file selection dialog, an inotify watch is being added to the directory, and then after the dialog is closed, glib still tries to keep the inotify watch on the directory as a result of im_scan_missing(). This can result in the application hanging if the inotify watch is being put on an autofs mount which is no longer available (the watch hangs until automount returns).

This behavior has been observed in firefox and evince.


I am including 3 attachments.
The first is a stack trace of firefox being hung after the autofs mount becomes unavailable. The file selection dialog had been closed, and there are no open file handles on the mount point. I simulated the mount going unavailable by unmounting and then putting in an iptables DROP rule for traffic to the network share.

The second attachment is firefox opening the file selection dialog with a break point on ip_watched_dir_new.

The third attachment is also a break point on ip_watched_dir_new, but this break triggered a few seconds after the mount was unmounted and made unavailable.
Comment 1 Patrick H 2011-10-13 02:19:13 UTC
Created attachment 198901 [details]
break point on ip_watched_dir_new opening file selection dialog
Comment 2 Patrick H 2011-10-13 02:20:25 UTC
Created attachment 198902 [details]
break point on ip_watched_dir_new after unmounting
Comment 3 Patrick H 2011-10-13 02:24:07 UTC
Oh, forgot to put the exact version of glib. Its 2.28.8
Comment 4 Colin Walters 2011-10-13 14:39:39 UTC
This could happen because gtk+ is leaking inotify watches.  Note also if told to watch a nonexistent file, gio internally will periodically poll.
Comment 5 GNOME Infrastructure Team 2018-05-24 13:27:04 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/glib/issues/463.