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 86254 - gnome_vfs_monitor_add hanging at random directories
gnome_vfs_monitor_add hanging at random directories
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Async operations
unspecified
Other Linux
: High critical
: 2.2
Assigned To: gnome-vfs maintainers
Luis Villa
Depends on:
Blocks:
 
 
Reported: 2002-06-23 14:10 UTC by Jorn Baayen
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.0


Attachments
testcase (2.25 KB, text/plain)
2002-06-23 14:12 UTC, Jorn Baayen
Details
trace (876 bytes, text/plain)
2002-06-24 19:34 UTC, Jorn Baayen
Details

Description Jorn Baayen 2002-06-23 14:10:40 UTC
gnome_vfs_monitor_add seems to hang at seemingly random directories, every
time i run the testcase (which i will attach here) it hangs at a different dir.

Redhat 7.3 with its stock FAM.

Using gnome-2-0-0 branch since i can't get HEAD to compile.
Comment 1 Jorn Baayen 2002-06-23 14:12:09 UTC
Created attachment 9406 [details]
testcase
Comment 2 Ian McKellar 2002-06-24 19:22:57 UTC
Do you have a stack trace of where its hanging? Do you know if its
hanging in the fam library?
Comment 3 Jorn Baayen 2002-06-24 19:34:33 UTC
Created attachment 9436 [details]
trace
Comment 4 Ian McKellar 2002-06-24 19:52:12 UTC
Alex, from the stack trace it look like this is happening in the fam
library. Are you still hacking on that these days?
Comment 5 Alexander Larsson 2002-06-25 06:32:09 UTC
How many directories does it monitor before it hangs?

Someone else reported a problem with fam hanging when opening > 200
directories or so.
Comment 6 Jorn Baayen 2002-06-25 11:17:04 UTC
Yeah, it hangs between the 170th and 250th dir.
Comment 7 Luis Villa 2002-06-25 20:32:51 UTC
So I'm marking this 'high' out of principle... but if core apps aren't
monitoring 200+ dirs I'm not entirely sure this should be 'high.'
Comment 8 Alex Graveley 2002-07-03 19:50:03 UTC
So, my crack-laiden fix to disconnected NFS blocking stats (bug 74371)
also wraps libFAM hangs, which can happen when FAM is used to monitor
a disconnected NFS server or when it has exceeded the allowed number
of system monitors.

Btw, Alex, is there a way to remove this limit on the number of active
FAM monitors?
Comment 9 Alexander Larsson 2002-07-04 08:34:29 UTC
There really should be no such limit, but i haven't yet had time to
track that bug down.
Comment 10 Luis Villa 2002-07-10 22:14:35 UTC
AlexG: please don't NEEDINFO on questions to other devels. Also
reopening since it seems the question was answered.
Comment 11 Alex Graveley 2002-07-12 20:16:10 UTC
Okay, so just had a thought... if FAM is falling back to stat() after
not finding the required kernel extensions, perhaps it is hitting the
max number of simultaneous poll() fds, or something similar?

AlexL, this is total conjecture as I've never looked at the FAM code,
but what do you think?
Comment 12 Alexander Larsson 2002-07-15 07:36:27 UTC
It could be related to # of fds. But 200 sounds a bit low for that.
Comment 13 Luis Villa 2002-08-11 17:28:06 UTC
Putting this on the 2.2 milestone.
Comment 14 Seth Nickell 2002-08-24 19:08:27 UTC
Any further thinking Alex (L :-). This is preventing us from using
file monitoring in RhythmBox, which was a very nice feature (you could
add music to your library just by dropping it inside the ~/Music folder).
Comment 15 Alexander Larsson 2002-08-27 12:47:43 UTC
I think this is a deadlock.
the process keeps feeding fam requests, and not reading replys, while
fam seemingly stops reading request once it's output buffer for the
client is full. This leads to the process being ignored by fam, and
the process blocking on a full pipe.
Comment 16 Alexander Larsson 2002-08-27 13:12:23 UTC
Ok. I think the best solution here is to make the gnome-vfs monitor
requests read all pending fam events and queue them up for later
processing before sending a new monitor request.

Just make sure no events are reordered or missed.
Comment 17 Alexander Larsson 2003-02-10 15:57:15 UTC
Fixed in 2.2.1.