nautilus hangs when unmounting an nfs disk if nfs server is down

Bug #258734 reported by Antoine Pairet on 2008-08-17
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Nautilus
Unknown
Critical
nautilus (Ubuntu)
Medium
Ubuntu Desktop Bugs

Bug Description

Binary package hint: nautilus

This procedure involves 2 computers:
1. NFSServer
2. NFSClient

Step to reproduce:
1. Mounting an NFS disk on NFSClient
2. Shutting down the NFSServer
3. In nautilus/on the desktop, try to access the NFSserver by double clicking on it
4. Nautilus hangs

Symptons:
After this procedure, nautilus process is still active, but there are no icons on the desktop anymore, going to Places -> Home just doesn't work and there's no error message. Trying to execute nautilus trough a terminal doesn't work and gives no error.

Workaround:
If you right clicked on the icon on the desktop: Go to System -> System Monitor -> Kill Nautilus
If you right clicked under nautilus: Close the window and confirm the fact that you want to kill process

After killing nautilus, everything works fine but the NFS drive is still mounted. Trying to access gives no result.

Further information:
while the bug was reported against nautilus 1:2.22.3-0ubuntu2, the problem still exists in Intrepid 1:2.24.1-0ubuntu1

ProblemType: Bug
Architecture: amd64
Date: Sun Aug 17 09:28:26 2008
DistroRelease: Ubuntu 8.04
ExecutablePath: /usr/bin/nautilus
NonfreeKernelModules: ath_hal
Package: nautilus 1:2.22.3-0ubuntu2
PackageArchitecture: amd64
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: nautilus
Uname: Linux 2.6.24-21-generic x86_64

Antoine Pairet (b-ly) wrote :
Antoine Pairet (b-ly) wrote :

Here's what happen if I try to unmount the drive from a terminal:

antoine@portant 10:05:41:~$ ls /media/
cdrom cdrom0 serveur
antoine@portant 10:05:47:~$ sudo umount serveur
[sudo] password for antoine:
umount: serveur: not found

Antoine Pairet (b-ly) wrote :

My apologies for the previous post.

antoine@portant 10:06:04:~$ sudo umount /media/serveur
umount.nfs: Server failed to unmount 'IPADDRESS:/media/data'
umount.nfs: /media/serveur: device is busy
umount.nfs: Server failed to unmount 'IPADDRESS:/media/data'
umount.nfs: /media/serveur: device is busy

Changed in nautilus:
status: Unknown → New
Sebastien Bacher (seb128) wrote :

thank you for your bug report, looks like a hang rather than a crash

Changed in nautilus:
assignee: nobody → desktop-bugs
importance: Undecided → Medium
status: New → Triaged
Antoine Pairet (b-ly) wrote :

Hi! I tried to obtain backtraces, but I couldn't.

Here's what I did:
1. Mounting an NFS disk on NFSClient
2. Shutting down the NFSServer
3. Running gdb and attach it to nautilus
4. In nautilus/on the desktop, right clicking on the NFS disk and trying to
unmount it
4. Nautilus hangs: window becomes white, no icons on the desktop anymore.
Trying to exit the program doesn't work, nor does
5. couldn't obtain anything with gdb, so I killed the process and I couldn't
obtain backtraces.

...
(gdb) continue
Continuing.
[New Thread 0x41720950 (LWP 23870)]
[New Thread 0x42722950 (LWP 23871)]
[Thread 0x41720950 (LWP 23870) exited]
[Thread 0x42722950 (LWP 23871) exited]

Program terminated with signal SIGKILL, Killed.
The program no longer exists.
(gdb)
The program is not being run.
(gdb) backtrace full
No stack.

What is the difference between a crash and a hang?
How could I give Gnome devs useful informations in the case of a hang?

Thank you!

Sebastien Bacher (seb128) wrote :

you just need to type the "backtrace" on the gdb prompt when nautilus is hanging, no need to stop if before, what is interesting is the hang location which you will not get if it's not running

Antoine Pairet (b-ly) wrote :

I need help using gdb because I can't get any useful information.
I followed this guide: https://wiki.ubuntu.com/Backtrace

I started nautilus under control of gdb and typed "run", then gdb tells me the program "exited normally". After that, I maked nautilus hanging by trying to unmount the nfs drive. Then I returned to the shell and typed: "backtrace full", but gdb tells me there's no stack.

Did I do something wrong?
Below is the command line output of the operations I performed. In attachment is the file gdb-nautilus.txt

Thanks for your help.
I now will try to reproduce the bug with daily build of Intrepid (20080913).

antoine@portant 01:03:42:~$ gdb nautilus 2>&1 | tee gdb-nautilus.txt
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
(gdb) handle SIG33 pass nostop noprint
Signal Stop Print Pass to program Description
SIG33 No No Yes Real-time event 33
(gdb) set pagination 0
(gdb) run
Starting program: /usr/bin/nautilus
[Thread debugging using libthread_db enabled]
[New Thread 0x7f4b0c4ee7a0 (LWP 24801)]
[New Thread 0x416f1950 (LWP 24822)]

Program exited normally.
(gdb) backtrace full
No stack.
(gdb) info registers
The program has no registers now.
(gdb) thread apply all backtrace
No registers.
(gdb) quit

Sebastien Bacher (seb128) wrote :

that's because there is already a running nautilus and you need to attach gdb to this one, the wiki page has details on how
to do that

Changed in nautilus:
status: New → Incomplete
Sebastien Bacher (seb128) wrote :

could you try if that's still an issue in intrepid?

Antoine Pairet (b-ly) wrote :

Yes it is still an issue in Intrepid.

Beside gdb and nautilus-dbg what other package should I have installed to get useful information?
As you mentioned it, this seems rather to be a hang than a crash, do backtraces exist in the case of a hang?

I tried several times to get backtraces but was unable to obtain them (see my previous message).
At the moment all I can provide is a screenshot of gnome monitor that says the process Nautilus (nautilus --no-browser --no-desktop) is:
* Status: Uninterruptable
* Waiting Channel: rpc_wait_bit_killable
At that stage, no new instance of nautilus can be launched. The process need to be killed.

I do realize that more informations are needed in order to find what causes the problem and have an opportunity to fix it.

regards,

Antoine Pairet (b-ly) on 2008-12-17
description: updated
Antoine Pairet (b-ly) wrote :

Rigth clicking on Properties does not make the hang to occur.

Antoine Pairet (b-ly) wrote :

Trying to open the disk through F-Spot or Brasero make nautilus hanging with exactly the same symptoms but:
* Status: Uninterruptable
* Waiting Channel: nfs_wait_schedule

Sebastien Bacher (seb128) wrote :

could you reply to the upstream comment then and get a stacktrace?

Peter Funk (pf-artcom-gmbh) wrote :

The problem (umount of a NFS volume of a disappeared NFS server is stuck in the kernel)
has nothing to do with a particular filemanager. This is only one possibility where the
symptoms of the problem surface.

I think this problem should be reported as a bug in the package nfs-common or the
Linux kernel, because even the /sbin/umount.nfs with option -f (force) given hangs
in the umount() system call, which can be seen by using the command
   strace -p `pidof /sbin/umount.nfs`
in another terminal window.

Antoine Pairet (b-ly) wrote :

Peter, I think you are right. Like you said, the hangs I experience are only one of the symptoms.

As you seem to have a lot more knowledge than I have on the subject, could you please fill a bug for the package nfs-common or linux? I think you will be able to give more relevant informations than I would do.

Information from:
http://nfs.sourceforge.net/nfs-howto/ar01s04.html#mounting_remote_dirs

Mounting options:
hard

    The program accessing a file on a NFS mounted file system will hang when the server crashes. The process cannot be interrupted or killed (except by a "sure kill") unless you also specify intr. When the NFS server is back online the program will continue undisturbed from where it was. We recommend using hard,intr on all NFS mounted file systems.

If you do fill a new bug report, please let me know.
Thanks in advance,

Hello,

Antoine Pairet wrote on Friday, 13.03.2009 at 09:33 (UTC?):
> Peter, I think you are right. Like you said, the hangs I experience are
> only one of the symptoms.
>
> As you seem to have a lot more knowledge than I have on the subject,
> could you please fill a bug for the package nfs-common or linux? I think
> you will be able to give more relevant informations than I would do.

I would have done this long time ago. But I still feel unable to
provide enough useful information.

I also can not believe, that I'm the one, who has experienced this first.
There must be some existing bug report somewhere. But I was unable
to find it. Any hints anybody?

Although: I'm pretty sure, this might be a problem caused within the
kernel itself. This is because even a umount -f hangs uninteruptable
for at least long enough for me to become impatient (I didn't say "forever").

May be it is a design problem of the stateless NFS protocol in general?

> Information from:
> http://nfs.sourceforge.net/nfs-howto/ar01s04.html#mounting_remote_dirs
>
> Mounting options:
> hard
>
> The program accessing a file on a NFS mounted file system will hang
> when the server crashes. The process cannot be interrupted or killed
> (except by a "sure kill") unless you also specify intr. When the NFS
> server is back online the program will continue undisturbed from where
> it was. We recommend using hard,intr on all NFS mounted file systems.

I've already tried options "hard,intr" and even "soft,intr" on
a wide range of Linux systems. But if a mounted NFS server has
become unreachable, even trying to reboot the NFS Linux clients takes
"forever", so if you need to get these client system back online in
acceptable time, pressing the hard reset switch was often the only
choice I had. This was with SuSE Linux, Red Hat, Debian and Ubuntu
systems in several different versions.

> If you do fill a new bug report, please let me know.

> Thanks in advance,

ditto. I would also appreciate any pointer to locations to learn
more about this...

Regards, Peter
--
Peter Funk, ✉Oldenburger Str.86, D-27777 Ganderkesee
office: ArtCom GmbH, ✉Haferwende 2, D-28357 Bremen, Germany
tel:+49-421-20419-0 cell:+49-179-640-8878 <http://www.artcom-gmbh.de/>

Changed in nautilus:
status: Incomplete → Invalid
Sebastien Bacher (seb128) wrote :

the upstream bug states that the issue is not a nautilus one

Changed in nautilus (Ubuntu):
status: Triaged → Invalid
Norman Messtorff (normes) wrote :

Hi all,

I've the same problem and another way to reproduce this issue:
1. Mounting an NFS disk on NFSClient
2. Shutting down the NFSServer
3. Open your personal folder or any other directory in nautilus
4. Insert a CD in your drive or plug in a USB flash device
5. try to open the new inserted media
6. nautilus hangs.

@Peter:
Greetings from Oldenburg ;o)

Changed in nautilus:
importance: Unknown → Critical
status: Invalid → Unknown
Ali Raeini (aliqasemi) on 2012-09-14
Changed in nautilus (Ubuntu):
status: Invalid → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.