Bug 368628

Summary: gvfs: Random crashes
Product: [openSUSE] openSUSE 11.0 Reporter: Magnus Boman <captain.magnus>
Component: GNOMEAssignee: Hans Petter Jansson <hpj>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P3 - Medium CC: alexio44, asklein, behr, carlos.e.r, David, erik.putrycz, federico, hmuelle
Version: RC 1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard: gnomeup-gvfs, gnome-crash
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: gvfs-bnc368628-fuse-robustness.patch
gvfs-from-0.2.3-to-20080812.patch

Description Magnus Boman 2008-03-10 11:53:25 UTC
gvfs keeps crashing. The vfs.debug does not show anything of importance, just lines like;

vfs_getattr: -> No such file or directory
vfs_getattr: /.Trash-1000
vfs_getattr: -> No such file or directory
vfs_getattr: /.Trash
vfs_getattr: -> No such file or directory
vfs_getattr: /.Trash-1000
vfs_getattr: -> No such file or directory
vfs_getattr: /
vfs_getattr: -> Success
vfs_getattr: /
vfs_getattr: -> Success
vfs_getattr: /
vfs_getattr: -> Success
vfs_getattr: /.Trash
vfs_getattr: -> No such file or directory
vfs_getattr: /.Trash-1000
vfs_getattr: -> No such file or directory
vfs_getattr: /
vfs_getattr: -> Success
vfs_getattr: /
vfs_getattr: -> Success
vfs_getattr: /
vfs_getattr: -> Success
vfs_getattr: /
vfs_getattr: -> Success
vfs_getattr: /
vfs_getattr: -> Success
Comment 1 JP Rosevear 2008-03-10 21:15:38 UTC
This is probably http://bugzilla.gnome.org/show_bug.cgi?id=519050, fixed post 2.21.92.
Comment 2 JP Rosevear 2008-03-17 13:12:49 UTC
Maw updated to nautilus 2.22.0 now, so we're good.
Comment 3 Magnus Boman 2008-04-01 09:48:11 UTC
It's back and several other people on IRC see it to.

Easy way to check;

Do the following in the home directory;
du --si -s

mboman@mblxsrv01:~> mount
gvfs-fuse-daemon on /home/mboman/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=mboman)


In my home directory;

d?????????  ? ?      ?          ?                ? .gvfs/


mboman@mblxsrv01:~> ps aux|grep -i gvfs
mboman   20168  0.0  0.0  34248  2092 ?        S    19:57   0:00 /usr/lib64/gvfs/gvfsd
mboman   20180  0.0  0.0  45000  2604 ?        S    19:57   0:00 /usr/lib64/gvfs/gvfsd-trash --spawner :1.8 /org/gtk/gvfs/exec_spaw/0
mboman   20251  0.0  0.0  34460  2140 ?        S    19:57   0:00 /usr/lib64/gvfs/gvfsd-burn --spawner :1.8 /org/gtk/gvfs/exec_spaw/1







When it works;
mboman@mblxsrv01:~> ps aux|grep gvfs
mboman   23455  0.0  0.0  34248  2084 ?        S    20:45   0:00 /usr/lib64/gvfs/gvfsd
mboman   23463  0.0  0.0  60144  2268 ?        Ssl  20:45   0:00 /usr/lib64/gvfs//gvfs-fuse-daemon /home/mboman/.gvfs
mboman   23471  0.0  0.0  45132  2688 ?        S    20:45   0:00 /usr/lib64/gvfs/gvfsd-trash --spawner :1.7 /org/gtk/gvfs/exec_spaw/0
mboman   23539  0.0  0.0  34460  2140 ?        S    20:46   0:00 /usr/lib64/gvfs/gvfsd-burn --spawner :1.7 /org/gtk/gvfs/exec_spaw/1

In my home directory;
dr-x------  2 mboman users     0 2008-04-01 20:46 .gvfs/
Comment 4 Hans Petter Jansson 2008-04-01 20:26:05 UTC
The FUSE daemon is crashing for some reason. Could you attach to it with gdb and then trigger the bug, and post a backtrace here (t a a bt)?
Comment 5 Magnus Boman 2008-04-01 22:43:01 UTC
It seems as if gvfs-fuse-daemon does not unmount on logout. So after a user logs out, the mount is still there.

Attaching gdb to the process I can see that g-f-d receives a SIGHUP and then exists cleanly so looks like it "forgets" to unmount.

The best way to fix this, IMHO, is to clean up the stale mount on login again (that way, even if the system crashes, it will still work).
Comment 6 Magnus Boman 2008-04-21 00:45:51 UTC
*** Bug 381741 has been marked as a duplicate of this bug. ***
Comment 7 Carlos Robinson 2008-04-21 01:50:19 UTC
Are you sure this is a duplicate of bug Bug 381741?

I'm reporting that root is denied access to that directory of the user it made "su -" from (making some programs fail), not that it crashes. This is different.
Comment 8 Magnus Boman 2008-04-21 01:53:31 UTC
You get that because gvfs crashed at some point.
You can work around it by doing umount /home/cer/.gvfs as root.
Comment 9 Magnus Boman 2008-05-06 10:29:36 UTC
Still an issue in Factory.
It doesn't always unmount the .gvfs directory on logout for some reason.
Comment 10 Hans Petter Jansson 2008-05-08 04:40:43 UTC
Can you produce a backtrace, perhaps by attaching gdb to it after logging in (remember to install debuginfo before attaching gdb) and triggering the crash? Remember that it's multithreaded, so "t a a bt" please.
Comment 11 Hans Petter Jansson 2008-05-08 05:32:23 UTC
I'm going to add a patch from upstream for some known gvfs-fuse problems, and assume it fixes this bug. If it still crashes with the patch, please reopen.
Comment 12 Hans Petter Jansson 2008-05-08 05:33:33 UTC
Created attachment 213365 [details]
gvfs-bnc368628-fuse-robustness.patch

Patch that fixes some races.
Comment 13 Hans Petter Jansson 2008-05-08 06:06:30 UTC
Patch submitted to autobuild. Closing this bug for now.
Comment 14 Magnus Boman 2008-05-15 10:49:10 UTC
*** Bug 390701 has been marked as a duplicate of this bug. ***
Comment 15 JP Rosevear 2008-05-16 17:24:33 UTC
*** Bug 391428 has been marked as a duplicate of this bug. ***
Comment 16 Hans Petter Jansson 2008-05-21 21:58:04 UTC
Turns out the fix for http://bugzilla.gnome.org/show_bug.cgi?id=531516 was also needed for this.
Comment 17 Hans Petter Jansson 2008-05-21 22:15:38 UTC
Added that patch and re-submitted to STABLE.
Comment 18 Volker Behr 2008-05-30 13:27:23 UTC
The bug still appears in a current RC1 on x86-64:

vrbehr@merlin:~> df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda6              20G  2.7G   18G  14% /
udev                  3.8G  140K  3.8G   1% /dev
/dev/sda7              20G  9.8G   11G  49% /usr/local
/dev/sda8              10G  5.0G  5.1G  50% /home
df: `/var/lib/gdm/.gvfs': Permission denied
vrbehr@merlin:~>

merlin:/home/vrbehr # ls -al /var/lib/gdm      
ls: cannot access /var/lib/gdm/.gvfs: Permission denied
total 16
drwxrwx--T  5 root gdm   110 2008-05-29 15:45 .
drwxr-xr-x 33 root root 4096 2008-05-29 19:02 ..
-rw-------  1 root root   33 2008-05-29 15:44 .cookie
drwx------  3 gdm  gdm    24 2008-05-14 18:56 .dbus
drwxr-xr-x  2 gdm  gdm    60 2008-05-29 15:45 .fontconfig
prw-rw----  1 root root    0 2008-05-29 15:44 .gdmfifo
??????????  ? ?    ?       ?                ? .gvfs
-rw-r-----  1 root root   45 2008-05-29 15:44 :0.Xauth
-rw-r--r--  1 root root   64 2008-05-29 15:45 :0.Xservers
merlin:/home/vrbehr # 
Comment 19 Magnus Boman 2008-05-30 22:01:24 UTC
Volker, that does not mean that gvfs crashed.
Your user does not have rights to read that directory.
Comment 20 Hans Petter Jansson 2008-06-02 23:15:23 UTC
The question marks seem to indicate that the fuse daemon died or at least got brutally killed, though. I don't see how that could happen for gdm, which doesn't even access remote shares, but I haven't given it enough testing on x86-64, I think. So I'll do that once I have the 64-bit release installed later today.
Comment 21 Alex Rodriguez 2008-08-01 11:47:04 UTC
I don't see the solution of this bug :(
Comment 22 Hans Petter Jansson 2008-08-05 00:58:47 UTC
Yeah, there are still crashers in there, and more fixes upstream. I'll take those and roll an update.
Comment 23 Hans Petter Jansson 2008-08-13 07:25:32 UTC
Created attachment 233121 [details]
gvfs-from-0.2.3-to-20080812.patch

This patch updates GVFS from the 0.2.3 release we shipped in openSUSE 11.0 GM to what's available from the upstream 0.2 (stable) branch as of today. In addition to this bug, it fixes:

BGO#528218, BGO#526793, BGO#528950, BGO#528785, BGO#524880, BGO#532375, BGO#531516, BGO#522933, BGO#523139, BGO#536614.

URLs because I'm so very nice:

http://bugzilla.gnome.org/show_bug.cgi?id=528218
http://bugzilla.gnome.org/show_bug.cgi?id=526793
http://bugzilla.gnome.org/show_bug.cgi?id=528950
http://bugzilla.gnome.org/show_bug.cgi?id=528785
http://bugzilla.gnome.org/show_bug.cgi?id=524880
http://bugzilla.gnome.org/show_bug.cgi?id=532375
http://bugzilla.gnome.org/show_bug.cgi?id=531516
http://bugzilla.gnome.org/show_bug.cgi?id=522933
http://bugzilla.gnome.org/show_bug.cgi?id=523139
http://bugzilla.gnome.org/show_bug.cgi?id=536614

This patch contains the changes in the previous fuse-robustness patch.
Comment 24 Hans Petter Jansson 2008-08-13 07:34:30 UTC
This _might_ fix our bug #398606 too. There is a leak fix in a frequently used function in there, at least.
Comment 25 Hans Petter Jansson 2008-08-13 07:39:35 UTC
Federico: I've looked over the patch and tested it on my system, and am pretty confident about it. Could you look it over and give it a formal sign-off if you think it's good to ship?

Anja: Can I get a SWAMP ID for submitting the above patch as an update to gvfs for openSUSE 11.0?
Comment 26 Federico Mena Quintero 2008-08-20 00:09:20 UTC
Looks good, especially if it's an update from upstream.  This could use some "else" love (from gvfsbackendtrash.c):

   while (*p)
     {
       if (*p == '_')
         count++;
+      if (*p == '/')
+        count++;
+      if (*p == '%')
+        count++;
       p++;
     }

but that's not a reason to reject this patch.  Go ahead :)
Comment 28 Hans Petter Jansson 2008-08-27 23:21:59 UTC
Package submitted.
Comment 29 Dirk Mueller 2008-09-10 01:05:36 UTC
released
Comment 30 Dirk Mueller 2008-09-11 22:27:28 UTC
^^