From: "J. Bruce Fields" <bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
To: Miklos Szeredi <miklos-sUDqSbJrdHQHWmgEVkV9KA@public.gmane.org>
Cc: trond.myklebust-41N18TsMXrtuMpJDpNschA@public.gmane.org,
eshel-6kx38NOBMPqrIzol8Bc5pA@public.gmane.org,
neilb-l3A5Bk7waGM@public.gmane.org,
akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: nfs: lock stuck after interrupt
Date: Sun, 20 Apr 2008 14:45:15 -0400 [thread overview]
Message-ID: <20080420184515.GA27536@fieldses.org> (raw)
In-Reply-To: <E1JmY9Y-0004e4-7R-8f8m9JG5TPIdUIPVzhDTVZP2KDSNp7ea@public.gmane.org>
On Thu, Apr 17, 2008 at 07:44:08PM +0200, Miklos Szeredi wrote:
> 1) on server lock file X
> 2) on client lock file X
> blocks
> 3) on client send interrupt to process doing locking
> locking syscall restarted, continues blocking
> 4) on server release lock on file X
> on client lock is acquired
> 5) on client release lock on file X
> 6) on client lock file X
> blocks
>
> Everything up to the last step is fine, but something goes wrong
> during the final unlock. Stopping the nfs-server removes the stray
> lock.
>
> Here's a trace on the server:
>
> lockd: request from 192.168.1.1, port=862
> lockd: LOCK called
> lockd: nlm_lookup_host(192.168.1.2->192.168.1.1, p=6, v=4, my role=server, name=tucsk)
> lockd: get host tucsk
> lockd: nsm_monitor(tucsk)
> lockd: nlm_lookup_file (02000001 00006200 00000002 0001783d 7f54ef79 00017801 d06c5915 00000000)
> lockd: creating file for (02000001 00006200 00000002 0001783d 7f54ef79 00017801 d06c5915 00000000)
> lockd: found file 0ad074c0 (count 0)
> lockd: nlmsvc_lock(ubda/96317, ty=1, pi=1, 0-99, bl=1)
> lockd: nlm_lookup_host(192.168.1.2->192.168.1.1, p=6, v=4, my role=server, name=tucsk)
> lockd: get host tucsk
> lockd: nlmsvc_lookup_block f=0ad074c0 pd=1 0-99 ty=1
> lockd: get host tucsk
> lockd: created block 0aeabf80...
> lockd: vfs_lock_file returned 1
Why is vfs_lock_file returning 1? It should be 0 or -ERRNO.
--b.
> lockd: nlmsvc_insert_block(0aeabf80, -1)
> lockd: release host tucsk
> lockd: nlmsvc_lock returned 50331648
> lockd: LOCK status 3
> lockd: release host tucsk
> lockd: nlm_release_file(0ad074c0, ct = 2)
> lockd: request from 192.168.1.1, port=862
> lockd: CANCEL called
> lockd: nlm_lookup_host(192.168.1.2->192.168.1.1, p=6, v=4, my role=server, name=tucsk)
> lockd: get host tucsk
> lockd: nlm_lookup_file (02000001 00006200 00000002 0001783d 7f54ef79 00017801 d06c5915 00000000)
> lockd: found file 0ad074c0 (count 1)
> lockd: nlmsvc_cancel(ubda/96317, pi=1, 0-99)
> lockd: nlmsvc_lookup_block f=0ad074c0 pd=1 0-99 ty=1
> lockd: check f=0ad074c0 pd=1 0-99 ty=1 cookie=36120000
> lockd: unlinking block 0aeabf80...
> lockd: freeing block 0aeabf80...
> lockd: release host tucsk
> lockd: nlm_release_file(0ad074c0, ct = 2)
> lockd: CANCEL status 0
> lockd: release host tucsk
> lockd: nlm_release_file(0ad074c0, ct = 1)
> lockd: closing file ubda/96317
> lockd: request from 192.168.1.1, port=862
> lockd: LOCK called
> lockd: nlm_lookup_host(192.168.1.2->192.168.1.1, p=6, v=4, my role=server, name=tucsk)
> lockd: get host tucsk
> lockd: nsm_monitor(tucsk)
> lockd: nlm_lookup_file (02000001 00006200 00000002 0001783d 7f54ef79 00017801 d06c5915 00000000)
> lockd: creating file for (02000001 00006200 00000002 0001783d 7f54ef79 00017801 d06c5915 00000000)
> lockd: found file 0ad074c0 (count 0)
> lockd: nlmsvc_lock(ubda/96317, ty=1, pi=2, 0-99, bl=1)
> lockd: nlm_lookup_host(192.168.1.2->192.168.1.1, p=6, v=4, my role=server, name=tucsk)
> lockd: get host tucsk
> lockd: nlmsvc_lookup_block f=0ad074c0 pd=2 0-99 ty=1
> lockd: get host tucsk
> lockd: created block 0aeab240...
> lockd: vfs_lock_file returned 0
> lockd: freeing block 0aeab240...
> lockd: release host tucsk
> lockd: nlm_release_file(0ad074c0, ct = 2)
> lockd: release host tucsk
> lockd: nlmsvc_lock returned 0
> lockd: LOCK status 0
> lockd: release host tucsk
> lockd: nlm_release_file(0ad074c0, ct = 1)
> lockd: request from 192.168.1.1, port=862
> lockd: UNLOCK called
> lockd: nlm_lookup_host(192.168.1.2->192.168.1.1, p=6, v=4, my role=server, name=tucsk)
> lockd: get host tucsk
> lockd: nlm_lookup_file (02000001 00006200 00000002 0001783d 7f54ef79 00017801 d06c5915 00000000)
> lockd: found file 0ad074c0 (count 0)
> lockd: nlmsvc_unlock(ubda/96317, pi=3, 0-9223372036854775807)
> lockd: nlmsvc_cancel(ubda/96317, pi=3, 0-9223372036854775807)
> lockd: nlmsvc_lookup_block f=0ad074c0 pd=3 0-9223372036854775807 ty=2
> lockd: UNLOCK status 0
> lockd: release host tucsk
> lockd: nlm_release_file(0ad074c0, ct = 1)
>
>
> Everything looks normal, yet...
>
> This is 100% reproducable for me (ext3 exported over nfs, server and
> client: 2.6-git).
>
> Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-04-20 18:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-17 17:44 nfs: lock stuck after interrupt Miklos Szeredi
2008-04-17 19:30 ` Aaron Wiebe
2008-04-18 11:07 ` Miklos Szeredi
[not found] ` <E1JmoR2-0005j2-VU-8f8m9JG5TPIdUIPVzhDTVZP2KDSNp7ea@public.gmane.org>
2008-04-18 12:20 ` Aaron Wiebe
[not found] ` <E1JmY9Y-0004e4-7R-8f8m9JG5TPIdUIPVzhDTVZP2KDSNp7ea@public.gmane.org>
2008-04-20 18:45 ` J. Bruce Fields [this message]
[not found] ` <20080420184515.GA27536-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2008-04-20 19:24 ` Miklos Szeredi
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=20080420184515.GA27536@fieldses.org \
--to=bfields-uc3wqj2krung9huczpvpmw@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=eshel-6kx38NOBMPqrIzol8Bc5pA@public.gmane.org \
--cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=miklos-sUDqSbJrdHQHWmgEVkV9KA@public.gmane.org \
--cc=neilb-l3A5Bk7waGM@public.gmane.org \
--cc=trond.myklebust-41N18TsMXrtuMpJDpNschA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).