Bug 486286 - gnome-vfs-daemon exits on dbus, and constantly restarted causing dbus/hal to hog CPU
gnome-vfs-daemon exits on dbus, and constantly restarted causing dbus/hal to...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gnome-vfs2 (Show other bugs)
5.3
All Linux
high Severity high
: rc
: ---
Assigned To: Tomáš Bžatek
desktop-bugs@redhat.com
: Patch
Depends On:
Blocks: 499522
  Show dependency treegraph
 
Reported: 2009-02-19 03:38 EST by ritz
Modified: 2015-03-03 17:34 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-01-13 07:08:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Proposed patch (1.61 KB, patch)
2009-07-07 06:46 EDT, Olivier Fourdan
no flags Details | Diff

  None (edit)
Description ritz 2009-02-19 03:38:12 EST
Description of problem:
gnome-vfs-daemon exits shortly after starting up, and is transparently restarted by nautilus ( infinite loop ), and g-vfs-d uses hal to obtain a list of drives/disks mounted/available on system, and comunicated to hal via dbus. This leads to dbus/hal hogging cpu.

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1) Netapp filer which has snapshot configured
2) windows client from where you need to create a folder which has international characters [like czech or french characters]
3) Mount the NFS share from the filer
4) Browse through the /mounpoint/.snapshot/snapshotname/folder created in step 2 through the Gnome GUI [Gnome Main menu->places->my computer-> filesystem-etc etc]
5) Take a look at cat /proc/mounts. All the folders  under the ".snapshot" would be mounted separately
5) log out from the GNOME session and then login back [or just kill the gnome-vfs-daemon. when you browse again it would automatically start the process]
6) This results in dbus-daemon, hald and gnome-vfs-daemo hogging the CPU.  

Actual results:
g-vfs-daemon keeps restarting, and 100% CPU usgae by dbus and hal

Expected results:
g-vfs-daemon should not keep restarting

Additional info:


Breakpoint 1, _exit (status=1) at ../sysdeps/unix/sysv/linux/_exit.c:29
29 ../sysdeps/unix/sysv/linux/_exit.c: No such file or directory.
in ../sysdeps/unix/sysv/linux/_exit.c
(gdb) bt
#0  _exit (status=1) at ../sysdeps/unix/sysv/linux/_exit.c:29
#1  0x00002b225736a939 in _dbus_exit (code=1) at dbus-sysdeps-unix.c:2469
#2  0x00002b22573503f1 in _dbus_connection_update_dispatch_status_and_unlock (connection=0x410ec80,
   new_status=DBUS_DISPATCH_COMPLETE) at dbus-connection.c:4003
#3  0x00002b225735104d in dbus_connection_dispatch (connection=0x410ec80) at dbus-connection.c:4500
#4  0x00002b225712d4b5 in message_queue_dispatch (source=<value optimized out>, callback=<value optimized out>,
   user_data=<value optimized out>) at dbus-gmain.c:101
#5  0x000000396822cf44 in IA__g_main_context_dispatch (context=<value optimized out>) at gmain.c:2045
#6  0x000000396822fd7d in g_main_context_iterate (context=<value optimized out>, block=<value optimized out>,
   dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2677
#7  0x000000396823008a in IA__g_main_loop_run (loop=<value optimized out>) at gmain.c:2881
#8  0x0000000000408291 in main (argc=1, argv=0x7fff53c00898) at vfs-daemon.c:969
(gdb) list dbus-sysdeps-unix.c:2469
2464 dbus-sysdeps-unix.c: No such file or directory.
in dbus-sysdeps-unix.c

probably related : 
http://lists.freedesktop.org/archives/dbus/2006-October/005928.html
Comment 4 Olivier Fourdan 2009-07-07 06:46:17 EDT
Created attachment 350771 [details]
Proposed patch

gnome-vfs-daemon reads /proc/mounts at startup and uses HAL via libhal_drive_from_device_file() in multiple places in gnome-vfs-hal-mounts.c

Strings in DBUS must be valid UTF8. If the device path is not valid UTF8, dbus_connection_send() will cause a disconnect of the caller and an exit.

Threfore if the device path contains invalid utf8, gnome-vfs-daemon will fail to start. If that happens during a session, gnome-vfs-daemon will be restarted by any gnome application wich cause a lot of start/stop of gnome-vfs-daemon.

The following patch simply ensures that we use valid utf8 for device path to avoid problems with hal/dbus.
Comment 14 errata-xmlrpc 2010-01-13 07:08:57 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0032.html

Note You need to log in before you can comment on or make changes to this bug.