All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Urushkin <urushkin-MKmKHxvQ5r6HXe+LvDLADg@public.gmane.org>
To: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: long cifs timeout when share becomes unavailable
Date: Thu, 24 May 2012 10:13:29 +0400	[thread overview]
Message-ID: <4FBDD189.6040402@telros.ru> (raw)

Hi,

there are issues with cifs share mounted via mount.cifs (with recent
kernels): the first 'ls' on the dir where cifs share is mounted after the
server becomes unavailable 1) hangs (can't be interrupted with ^C) and 2)
lasts about 5 minutes. The first problem appears everywhere I tested
(ubuntu 10.04 with any distributed kernel, ubuntu 12.04, fedora 17), but
with old kernels (tested with ubuntu 10.04 2.6.32 and 2.6.35) 'ls' is
uninterruptable but hangs only for about 25 seconds (which makes this
problem really less complex for old kernels). And with new kernels (ubuntu
10.04 3.0, ubuntu 12.04 3.2, fedora 17 3.3) I'm facing very long hangs of
'ls' (the second problem). And many GUI applications (e.g. nautilus,
firefox, gnome-panel,mc) that query that directory for some reason appears
to act the same way as 'ls', so the system becomes unusable for 5(!)
minutes. When the server (tested with samba 3.6, win2003) becomes
unavailable nothing is written on the mounted directory, so I can't
understand why this timeout is so big. Here is how I tested this:

 # mount.cifs //fsrv/home /mnt "-ouser=test,dom=wg,soft"
 Password:
 # time ls /mnt
 Desktop Documents Program Files WINDOWS

 real 0m0.019s
 user 0m0.004s
 sys 0m0.012s
 # iptables -I OUTPUT -d 172.17.0.65 -j DROP
 # time ls /mnt # This 'ls' cannot be interrupted
 ls: cannot access /mnt: Host is down

 real 4m51.668s
 user 0m0.004s
 sys 0m0.016s
 # time ls /mnt # This 'ls' and all others after can be interrupted
 ls: cannot access /mnt: Host is down

 real 0m10.014s
 user 0m0.008s
 sys 0m0.004s

I see these messages in syslog:

 kernel: [ 1625.552044] CIFS VFS: Server fsrv has not responded in 300
seconds. Reconnecting...
 kernel: [ 1655.509422] CIFS VFS: Unexpected lookup error -112

 ...

 And I can not see any timeout options for mount.cifs (except acl timeout).
So, the actual questions are: 1) is there a way to avoid these hangs
(analog of 'intr'?) and 2) how can I reduce this unreachable-host timeout
(analog of 'timeo'?)? Maybe there are some variables in the sources?

Thanks.

-- 
Best regards,
Sergey Urushkin

             reply	other threads:[~2012-05-24  6:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24  6:13 Sergey Urushkin [this message]
     [not found] ` <4FBDD189.6040402-MKmKHxvQ5r6HXe+LvDLADg@public.gmane.org>
2012-05-24 10:31   ` long cifs timeout when share becomes unavailable Jeff Layton
     [not found]     ` <20120524063131.5bc93ecf-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2012-05-24 12:44       ` Sergey Urushkin
     [not found]         ` <3b8a8049f2d724bdd621aa5e624d4047-MKmKHxvQ5r6HXe+LvDLADg@public.gmane.org>
2012-05-25 12:26           ` Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FBDD189.6040402@telros.ru \
    --to=urushkin-mkmkhxvq5r6hxe+lvdladg@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.