From: Dawson Engler <engler@csl.stanford.edu>
To: linux-kernel@vger.kernel.org
Cc: engler@csl.stanford.edu (Dawson Engler)
Subject: [CHECKER] deadlock in 2.5.62/fs/lockd/svc*.c?
Date: Sat, 22 Mar 2003 02:10:28 -0800 (PST) [thread overview]
Message-ID: <200303221010.h2MAAS506370@csl.stanford.edu> (raw)
Hi All,
here's a more interesting potential deadlock in the
2.5.62/fs/lockd/svc*.c
code that requires the miscordination of three threads. It might be
a false because of
1. infeasible callchain path or
2. the two struct nlm_file.f_sema pointers cannot actually point
to the same object.
It requires three threads:
thread 1: acquires nlm_file_sema then tries to get file->f_sema
thread 2: acquires file->f_sema and tries to get nlm_host_sema
thread 3: acquires nlm_host_sema and tries to get nlm_file_sema
Any feedback on this one would be great.
Dawson
BUG: ERROR: 3 thread global-global deadlock.
<&nlm_file_sema>-><&nlm_host_sema> occurred 4 times
<&nlm_host_sema>-><&nlm_file_sema> occurred 5 times
Plausible chain
thread 1: <&nlm_file_sema,struct nlm_file.f_sema>
depth = 3:
2.5.62/fs/lockd/svcsubs.c:nlm_traverse_files:218
down(&nlm_file_sema);
->2.5.62/fs/lockd/svcsubs.c:nlm_traverse_files:218
->nlm_traverse_files:224
->nlm_inspect_file:202
->end=fs/lockd/svclock.c:nlmsvc_traverse_blocks:274:down
down(&file->f_sema);
Seems like a plausible chain.
thread 2: <struct nlm_file.f_sema,&nlm_host_sema>
depth = 4:
2.5.62/fs/lockd/svclock.c:nlmsvc_lock:309
/* Lock file against concurrent access */
down(&file->f_sema);
->2.5.62/fs/lockd/svclock.c:nlmsvc_lock:309
->nlmsvc_lock:351
->nlmsvc_create_block:179
->2.5.62/fs/lockd/host.c:nlmclnt_lookup_host:44
->end=nlm_lookup_host:74:down
/* Lock hash table */
down(&nlm_host_sema);
Seems reasonable.
<&nlm_host_sema>-><&nlm_file_sema> =
depth = 4:
2.5.62/fs/lockd/host.c:nlm_lookup_host:74
/* Lock hash table */
down(&nlm_host_sema);
->2.5.62/fs/lockd/host.c:nlm_lookup_host:74
->nlm_lookup_host:77
->nlm_gc_hosts:319
->/u2/engler/mc/oses/linux/linux-2.5.62/fs/lockd/svcsubs.c:nlmsvc_mark_resources:279
->end=nlm_traverse_files:218:down
->2.5.62/fs/lockd/svcsubs.c:nlm_traverse_files:218
down(&nlm_file_sema);
reply other threads:[~2003-03-22 9:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200303221010.h2MAAS506370@csl.stanford.edu \
--to=engler@csl.stanford.edu \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®