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 357704 - Infinite loop in monitoring code
Infinite loop in monitoring code
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Monitoring (inotify)
2.16.x
Other Linux
: Normal critical
: ---
Assigned To: John McCutchan
gnome-vfs maintainers
: 357721 361089 366128 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-09-25 23:02 UTC by Josselin Mouette
Modified: 2006-11-12 07:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Josselin Mouette 2006-09-25 23:02:25 UTC
Sometimes, generally after I do something which involves lots of modifications on disk, which means lots of events received by gnome-vfs, I experience infinite loops in nautilus. The browser stays usable, but it uses 100% CPU.

Looking at the traces, it is continuously processing events. Because of the following trace, I highly suspect the fix for bug#341585 to be the cause of this one.

When analysing the stack this is how most traces look (starting from install_timeout):
  • #0 g_list_remove_link
    from /usr/lib/libglib-2.0.so.0
  • #1 g_source_attach
    from /usr/lib/libglib-2.0.so.0
  • #2 g_idle_add_full
    from /usr/lib/libglib-2.0.so.0
  • #3 install_timeout
    at gnome-vfs-monitor.c line 215
  • #4 actually_dispatch_callback
    at gnome-vfs-monitor.c line 319
  • #5 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #6 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #7 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #8 IA__gtk_main
    at gtkmain.c line 1000
  • #9 POA_Nautilus_MetafileMonitor__init
  • #10 __libc_start_main
    from /lib/libc.so.6
  • #11 ??
  • #12 ??
  • #13 ??
  • #0 ioctl
    from /lib/libc.so.6
  • #1 _XEventsQueued
    from /usr/lib/libX11.so.6
  • #2 XPending
    from /usr/lib/libX11.so.6
  • #3 gdk_event_prepare
    at gdkevents-x11.c line 2277
  • #4 g_main_context_prepare
    from /usr/lib/libglib-2.0.so.0
  • #5 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #6 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #7 IA__gtk_main
    at gtkmain.c line 1000
  • #8 POA_Nautilus_MetafileMonitor__init
  • #9 __libc_start_main
    from /lib/libc.so.6
  • #10 ??
  • #11 ??
  • #12 ??

I'm trying to understand what this code does, but any help to fix it is appreciated.
Comment 1 James "Doc" Livingston 2006-10-29 04:40:25 UTC
*** Bug 366128 has been marked as a duplicate of this bug. ***
Comment 2 Sebastien Bacher 2006-10-29 17:29:50 UTC
*** Bug 357721 has been marked as a duplicate of this bug. ***
Comment 3 Sebastien Bacher 2006-10-29 17:30:55 UTC
Ubuntu bug about that: https://launchpad.net/distros/ubuntu/+source/gnome-vfs2/+bug/54684
Comment 4 Alexander Larsson 2006-11-02 19:46:52 UTC
Fixed in cvs:

2006-11-02  Alexander Larsson  <alexl@redhat.com>

	* libgnomevfs/gnome-vfs-monitor.c:
	Avoid ending up in a loop via timeouts spending 100% cpu if
	a monitor is cancelled when there are outstanding callbacks.
	Fixes #357704
Comment 5 James "Doc" Livingston 2006-11-12 07:08:24 UTC
*** Bug 361089 has been marked as a duplicate of this bug. ***