Bug 514654 - nfsv4-server return NFS4ERR_BAD_STATEID, but return NFS4ERR_EXPIRED when it has invalid stateID
Summary: nfsv4-server return NFS4ERR_BAD_STATEID, but return NFS4ERR_EXPIRED when it h...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.5
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Wade Mealing
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks: 526950 533192
TreeView+ depends on / blocked
 
Reported: 2009-07-30 02:17 UTC by Wade Mealing
Modified: 2018-10-27 14:59 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 07:46:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
The attachment is a file, unix line endings, diff format. (3.47 KB, patch)
2009-07-30 02:45 UTC, Wade Mealing
no flags Details | Diff
Test case as shown in steps to reproudce. (8.10 KB, text/plain)
2009-07-30 02:51 UTC, Wade Mealing
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0178 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.5 kernel security and bug fix update 2010-03-29 12:18:21 UTC

Description Wade Mealing 2009-07-30 02:17:15 UTC
Description of problem:


When nfsv4-client used expired stateid which generated 'lease_time' seconds ago,
nfsv4-server return NFS4ERR_BAD_STATEID, but according to RFC3530, nfsv4-server
should return NFS4ERR_EXPIRED in this case.


--
[RFC3530] 8.6.3.  Network Partitions and Recovery

If the duration of a network partition is greater than the lease
period provided by the server, the server will have not received a
lease renewal from the client.  If this occurs, the server may free
all locks held for the client.  As a result, all stateid held by the
client will become invalid or stale.  Once the client is able to
reach the server after such a network partition, all I/O submitted by
the client with the now invalid stateid will fail with the server
returning the error NFS4ERR_EXPIRED.
--


Version-Release number of selected component (if applicable):

Kernel 2.6.18-128

How reproducible:

Every time.

Steps to Reproduce:

Server:

0. mkdir -p /work/nfs
1. Add "/work/nfs *(rw,insecure,no_root_squash,fsid=0)" to /etc/exports
2. echo 90 > /proc/fs/nfsd/nfsv4leasetime
3.service nfs restart

0. mkdir -p /mnt/point
1. mount -t nfs4 server:/work/nfs /mnt/point
2. gcc -o nfs_test nfs_test.c
3. ./nfs_test serverip

Actual results:

Fail: CLOSE after lease timeout should return NFS4ERR_EXPIRED, instead got NFS4ERR_BAD_STATEID

Expected results:

Pass: CLOSE after lease timeout server return NFS4ERR_EXPIRED

Additional info:

I've done initial testing of this patch, it seems sane, ran it through the connectathon tests, no additional tests failed.

Comment 1 Wade Mealing 2009-07-30 02:45:30 UTC
Created attachment 355633 [details]
The attachment is a file, unix line endings, diff format.

Comment 2 Wade Mealing 2009-07-30 02:51:08 UTC
Created attachment 355634 [details]
Test case as shown in steps to reproudce.

Comment 4 RHEL Program Management 2009-09-25 17:35:26 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 22 errata-xmlrpc 2010-03-30 07:46:49 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0178.html


Note You need to log in before you can comment on or make changes to this bug.