GNOME Bugzilla – Bug 381119
gnome-vfs-daemon crashes without /etc/fstab
Last modified: 2006-12-01 22:32:16 UTC
essentially trivial, as i don't use gnome-vfs-daemon much but, dbus spawns it when gnome-panel is launched from apple's crashreporter: ********** Date/Time: 2006-11-30 17:38:53 -0800 OS Version: 10.2.8 (Build 6R73) Host: shadesofgray Command: gnome-vfs-daemon PID: 6323 Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_INVALID_ADDRESS (0x0001) at 0xb4000005 Thread 0 Crashed: #0 0x00d2b448 in g_list_sort_real (glist.c:614) #1 0x00d2b554 in g_list_sort (glist.c:639) #2 0x0000d674 in update_fstab_drives (gnome-vfs-volume-monitor-daemon.c:733) #3 0x0000bdb8 in gnome_vfs_volume_monitor_daemon_init (gnome-vfs-volume-monitor-daemon.c:191) #4 0x00710504 in g_type_create_instance (gtype.c:1569) #5 0x006ef47c in g_object_constructor (gobject.c:1041) #6 0x006eec34 in g_object_newv (gobject.c:937) #7 0x006eef7c in g_object_new_valist (gobject.c:981) #8 0x006ee678 in g_object_new (gobject.c:795) #9 0x0000a1ac in _gnome_vfs_get_volume_monitor_internal (gnome-vfs-volume-monitor.c:315) #10 0x0000a2b0 in gnome_vfs_get_volume_monitor (gnome-vfs-volume-monitor.c:342) #11 0x00004cec in main (vfs-daemon.c:945) #12 0x00002924 in _start (crt.c:267) #13 0x000027a4 in start PPC Thread State: srr0: 0x00d2b448 srr1: 0x0000f030 vrsave: 0x00000000 xer: 0x00000000 lr: 0x00d2b554 ctr: 0x00d2b528 mq: 0x00000000 r0: 0xb4000001 r1: 0xbffff4a0 r2: 0xb4000001 r3: 0xb4000001 r4: 0x0000fdc4 r5: 0x00000000 r6: 0x80808080 r7: 0x00000002 r8: 0x0030a010 r9: 0xa0000dfc r10: 0x0030a290 r11: 0x00e1ce0c r12: 0x00d2b528 r13: 0x00000000 r14: 0x00000000 r15: 0x00000000 r16: 0x00000000 r17: 0x00000000 r18: 0x00000000 r19: 0x00000000 r20: 0x00000000 r21: 0x00000000 r22: 0x00000000 r23: 0x00000000 r24: 0x00000000 r25: 0x00000000 r26: 0xbffffa98 r27: 0x00000008 r28: 0x00000001 r29: 0x0007b018 r30: 0xbffff4a0 r31: 0x0000d630 and from good ol' gdb (gdb) r Starting program: /opt/local/libexec/gnome-vfs-daemon Reading symbols for shared libraries +++++++++++++.. done Reading symbols for shared libraries . done (process:6160): libgnomevfs-WARNING **: Unable to stat /etc/fstab: No such file or directory Program received signal EXC_BAD_ACCESS, Could not access memory. 0x00d2b448 in g_list_sort_real (list=0x11000001, compare_func=0xfdc4 <_gnome_vfs_unix_mount_point_compare>, user_data=0x0) at /Source/glib/glib/glib/glist.c:614 614 if (!list->next) (gdb) bt
+ Trace 90705
both gnome-vfs and glib are from cvs head
wow, ok so i looked at this today, and looking at the line numbers, realizing something was different gnome-vfs-volume-monitor-daemon.c line 190 is update_fstab_drives (volume_monitor_daemon); and with the warning that gnome-vfs gave me (process:6160): libgnomevfs-WARNING **: Unable to stat /etc/fstab: No such file or directory i decided to google update_fstab_drives which led me to bug 120222 which was from 3 years ago in nautilus, but, one of the problems was about bad entries in /etc/fstab on darwin, there is no fstab i decided to see what would happen if i gave gnome-vfs a blank fstab file touch /etc/fstab now, no crashing :) so i guess there should be some conditional about darwin cause afaik none of them has an /etc/fstab file
Thanks for your help! Raising priority/severity, changing OS to all. The problem seems to be that one variant of gnome-vfs-unix-mounts.c:_gnome_vfs_get_unix_mount_table (l. 864 as of writing) doesn't initialize the return value to NULL when the stat failed and the function returnes TRUE. Other than that I don't see how this can crash.
Created attachment 77496 [details] [review] Proposed patch Maybe you could try out whether this one helps? Please remember to delete /etc/fstab again before testing it.
(In reply to comment #3) works for me thanks
OK, thanks for your help! I informed the gnome-vfs-list about the issue, and we should get the patch committed within the next few days.
Go ahead and commit that maybe also on the stable branch!
Ohh and thanks to both of you ;-D
Committed, closing.