Bug#587019: EIO does not mean "try again" (breaks at least umount -f)

Anthony DeRobertis anthony at derobert.net
Thu Jun 24 14:24:23 UTC 2010


Package: gamin
Version: 0.1.10-2+b1
Severity: important
File: /usr/lib/gamin/gam_server

If you have an interruptible mount, and the NFS server goes down,
umount -f is supposed to unmount it. Unfortunately, gamin prevents this:

# strace -r -f -p 15469
...
     1.001142 stat("/mnt/Feynman/JackEncoded", 0x7fff1a117f40) = -1 EIO (Input/output error)
    12.194685 poll([{fd=4, events=0}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}, {fd=9, events=POLLIN}, {fd=10, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}, {fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=14, events=POLLIN}], 11, 0) = 0 (Timeout)
     0.000066 stat("/mnt/Feynman/JackEncoded", 0x7fff1a117f40) = -1 EIO (Input/output error)
...

The EIO comes from umount -f (or the kernel) trying to get processes out
of uninterruptible sleep on the dead NFS mount, and you can see that
came 12 seconds after the stat call. Unfortunately, 0.000066 seconds
later, gam_server stats the stat again.

Eventually, with enough umount -f you can get it unmounted, by winning
the race. But really, gam_server shouldn't treat EIO like EAGAIN.
Whether that EIO means you've hit a bad NFS mount, a bad sector, a
vanished device, etc., polling it again is not a good course of action.
(I've got to imagine the consequences of doing this on a bad sector are
even worse: most HDDs have a very long error recovery sequence. Probably
only way out of that one is the reset button.)

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing'), (200, 'unstable'), (100, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.34-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gamin depends on:
ii  libc6                        2.11.1-3    Embedded GNU C Library: Shared lib
ii  libgamin0                    0.1.10-2+b1 Client library for the gamin file 
ii  libglib2.0-0                 2.24.1-1    The GLib library of C routines

gamin recommends no packages.

gamin suggests no packages.

-- no debconf information






More information about the pkg-gnome-maintainers mailing list