From: jimc@math.ucla.edu (Jim Carter)
To: autofs@linux.kernel.org
Cc: Ian Kent <raven@themaw.net>
Subject: Re: clients suddenly start hanging (was: (no subject))
Date: Wed, 7 May 2008 21:52:34 -0700 (PDT) [thread overview]
Message-ID: <20080508045235.13C9EF8ED9@serval.math.ucla.edu> (raw)
In-Reply-To: <Pine.LNX.4.64.0804281422060.10684@raven.themaw.net> (Ian Kent "Mon, 28 Apr 2008 14:26:34 +0800")
On Mon, 28 Apr 2008 14:26:34 +0800 Ian Kent wrote:
> Jeff Moyer has identified a race in due to an execution order dependency
> in the autofs4 function root.c:try_to_fill_dentry().
--snip--
> After the daemon finishes the mount, it calls back into the kernel
> to release the waiters. When this happens, P1 is woken up and goes
> about clearing the DCACHE_AUTOFS_PENDING flag, but it does this in
> D1! So, given that P1 in our case is a program that will immediately
> try to access a file under /mount/submount/foo, we end up finding the
> dentry D2 which still has the pending flag set, and we set out to
> wait for a mount *again*!
I applied the two patches (redo-lookup-in-ttfd and correct-return-in-ttfd)
and restarted/reloaded the resulting module, but unfortunately it did
not improve the issue of hanging client processes in my submount case.
I've improved my test program and picked up some behaviors that were not
obvious before. Expected expiration is not happening. Some but usually
not all (once it *was* all) of the filesystems stay mounted for 900
secs, much longer than the default expiration of 300 secs. But
eventually many of them get expired. (There are no competing processes
that might "cd" into an automounted directory and prevent expiry, except
for the filesystem containing my home directory.)
In one case a set of 3 filesystems from the same machine (submount)
stayed mounted for 103 minutes straight (never expired as far as I can
see), being tested with successful access every 900 secs. Then all
three became absent from /proc/mounts, and were tested. One of them
returned ENOENT from opendir(); the other two test processes hung likely
in opendir().
In another case a machine exports only one filesystem, and it was
accessed and expired normally for about three repetitions; then it
stayed mounted for 900 secs. It was accessed successfully, but then
after only 266 secs it disappeared from /proc/mounts, was tested, and
got ENOENT. 900 secs later it was re-tested (I assume it was not
mounted), and the test process hung.
I have the test output including backtraces with symbols, immediately
after each of the three hangs (actually, 25 secs after the process
started, which is the criterion I use for hanging). But it's 5627 lines
or 282 Kb and it's pretty much the same as the one I sent in earlier
except for more diagnostic output. How about I send it direct, if you
want it, rather than filling up everyone's mailbox? Or would it be
better to have the output in the mail archive even though it's bloated?
James F. Carter Voice 310 825 2897 FAX 310 206 6673
UCLA-Mathnet; 6115 MSA; 520 Portola Plaza; Los Angeles, CA, USA 90095-1555
Email: jimc@math.ucla.edu http://www.math.ucla.edu/~jimc (q.v. for PGP key)
next prev parent reply other threads:[~2008-05-08 4:52 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-23 18:50 (no subject) Jim Carter
2008-04-23 20:04 ` Jeff Moyer
2008-04-24 3:10 ` Ian Kent
2008-04-24 16:52 ` clients suddenly start hanging (was: (no subject)) Jim Carter
2008-04-26 1:17 ` Jim Carter
2008-04-26 5:34 ` Ian Kent
2008-04-26 18:48 ` Jim Carter
2008-04-27 5:52 ` Ian Kent
2008-04-26 22:16 ` Jim Carter
2008-04-28 6:26 ` [PATCH 1/2] autofs4 - fix execution order race in mount request code Ian Kent
2008-05-08 4:52 ` Jim Carter [this message]
2008-05-08 6:13 ` clients suddenly start hanging (was: (no subject)) Ian Kent
2008-05-11 4:14 ` Jim Carter
2008-05-11 7:57 ` Ian Kent
2008-05-15 21:59 ` Jim Carter
2008-05-16 3:00 ` Ian Kent
2008-05-18 4:07 ` Ian Kent
2008-05-21 6:58 ` Ian Kent
2008-05-22 21:42 ` Jim Carter
2008-05-23 2:35 ` Ian Kent
2008-05-26 0:34 ` Jim Carter
2008-06-12 3:20 ` Ian Kent
-- strict thread matches above, loose matches on Subject: below --
2008-06-12 4:50 [PATCH 00/10] Kernel patch series Ian Kent
2008-06-12 4:50 ` [PATCH 01/10] autofs4 - check for invalid dentry in getpath Ian Kent
2008-06-12 4:50 ` [PATCH 02/10] autofs4 - fix sparse warning in waitq.c:autofs4_expire_indirect() Ian Kent
2008-06-12 4:50 ` [PATCH 03/10] autofs4 - fix incorrect return from root.c:try_to_fill_dentry() Ian Kent
2008-06-12 4:51 ` [PATCH 04/10] autofs4 - fix mntput, dput order bug Ian Kent
2008-06-12 4:51 ` [PATCH 05/10] autofs4 - don't make expiring dentry negative Ian Kent
2008-06-12 4:51 ` [PATCH 06/10] autofs4 - use look aside list for lookups Ian Kent
2008-06-12 4:51 ` [PATCH 07/10] autofs4 - don't release directory mutex if called in oz_mode Ian Kent
2008-06-12 4:51 ` [PATCH 08/10] autofs4 - use lookup intent flags to trigger mounts Ian Kent
2008-06-12 4:51 ` [PATCH 09/10] autofs4 - use struct qstr in waitq.c Ian Kent
2008-06-12 4:51 ` [PATCH 10/10] autofs4 - fix pending mount race Ian Kent
2008-06-14 1:13 ` [PATCH 00/10] Kernel patch series Jim Carter
2008-06-14 3:30 ` Ian Kent
2008-06-14 3:42 ` Ian Kent
2008-06-19 0:40 ` clients suddenly start hanging (was: (no subject)) Jim Carter
2008-06-19 3:14 ` Ian Kent
2008-06-19 17:08 ` Jim Carter
2008-06-19 18:34 ` Jim Carter
2008-06-20 4:09 ` Ian Kent
2008-06-21 1:02 ` Jim Carter
2008-06-21 3:12 ` Ian Kent
2008-06-23 3:49 ` Jim Carter
2008-06-23 4:46 ` Ian Kent
2008-06-24 3:08 ` Ian Kent
2008-06-24 17:02 ` Stephen Biggs
2008-06-24 23:39 ` Jim Carter
2008-06-25 3:33 ` Ian Kent
2008-06-25 5:00 ` Ian Kent
2008-06-23 4:15 ` Ian Kent
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=20080508045235.13C9EF8ED9@serval.math.ucla.edu \
--to=jimc@math.ucla.edu \
--cc=autofs@linux.kernel.org \
--cc=raven@themaw.net \
/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.