From: "Mkrtchyan, Tigran" <tigran.mkrtchyan@desy.de>
To: Jeff Layton <jlayton@kernel.org>
Cc: Chen Hanxiao <chenhx.fnst@fujitsu.com>,
Calum Mackay <calum.mackay@oracle.com>,
linux-nfs <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] pynfs: Fix RuntimeError by increasing default ca_maxrequests from 8 to 16
Date: Wed, 25 Jun 2025 20:26:31 +0200 (CEST) [thread overview]
Message-ID: <1605056536.14463638.1750875991126.JavaMail.zimbra@desy.de> (raw)
In-Reply-To: <782448d09ed170e097e112434848c771e08b017b.camel@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 3238 bytes --]
I guess this is the same issue that I tried to address with
https://lore.kernel.org/all/20250415114814.285400-1-tigran.mkrtchyan@desy.de/
DELEG 8 goes into a retry loop if the server responds NFS4ERR_DELAY when the server tries to recall the delegation and responds with NFS4ERR_DELAY to the client. The handling of a compound call will retry and re-use the slot.
The handling of DELEG8 will retry, too, but use a new slot. AFAIKS, slots are never freed:
```
$ git grep slot.inuse -- nfs4.1/nfs4client.py
nfs4.1/nfs4client.py: if not slot.inuse:
nfs4.1/nfs4client.py: slot.inuse = True
```
So fails...
```
def choose_slot(self):
self.lock.acquire()
try:
for slot in self.slots:
if not slot.inuse:
slot.inuse = True
return slot
raise RuntimeError("Out of slots")
finally:
self.lock.release()
```
It looks like all the tests up to now have issued less than ca_maxrequests:)
The proper fix probably should be someting like:
diff --git a/nfs4.1/nfs4client.py b/nfs4.1/nfs4client.py
index f4fabcc..fe404cd 100644
--- a/nfs4.1/nfs4client.py
+++ b/nfs4.1/nfs4client.py
@@ -551,6 +551,7 @@ class SessionRecord(object):
# operation itself receives NFS4ERR_DELAY
slot, seq_op = self._prepare_compound(saved_kwargs)
time.sleep(delay_time)
+ slot.inuse = False
res = self.remove_seq_op(res)
return res
Tigran.
----- Original Message -----
> From: "Jeff Layton" <jlayton@kernel.org>
> To: "Chen Hanxiao" <chenhx.fnst@fujitsu.com>, "Calum Mackay" <calum.mackay@oracle.com>
> Cc: "linux-nfs" <linux-nfs@vger.kernel.org>
> Sent: Wednesday, 25 June, 2025 15:58:51
> Subject: Re: [PATCH] pynfs: Fix RuntimeError by increasing default ca_maxrequests from 8 to 16
> On Wed, 2025-06-25 at 16:00 +0800, Chen Hanxiao wrote:
>> Increased the default value of ca_maxrequests from 8 to 16 to address a
>> RuntimeError encountered in DELEG8.
>>
>> This change resolves the issue where
>> DELEG8 st_delegation.testDelegRevocation
>> fails with a RuntimeError: "Out of slots".
>>
>> Signed-off-by: Chen Hanxiao <chenhx.fnst@fujitsu.com>
>> ---
>> nfs4.1/nfs4client.py | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/nfs4.1/nfs4client.py b/nfs4.1/nfs4client.py
>> index f4fabcc..fa31b34 100644
>> --- a/nfs4.1/nfs4client.py
>> +++ b/nfs4.1/nfs4client.py
>> @@ -390,7 +390,7 @@ class ClientRecord(object):
>> fore_attrs=None, back_attrs=None, sec=None,
>> prog=None,
>> max_retries=1, delay_time=1):
>> - chan_attrs = channel_attrs4(0,8192,8192,8192,128,8,[])
>> + chan_attrs = channel_attrs4(0,8192,8192,8192,128,16,[])
>> if fore_attrs is None:
>> fore_attrs = chan_attrs
>> if back_attrs is None:
>
> Increasing the size should be harmless, but it doesn't look like DELEG8
> does a lot of concurrent RPCs. How is this running out of slots?
>
> --
> Jeff Layton <jlayton@kernel.org>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 2826 bytes --]
next prev parent reply other threads:[~2025-06-25 18:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-25 8:00 [PATCH] pynfs: Fix RuntimeError by increasing default ca_maxrequests from 8 to 16 Chen Hanxiao
2025-06-25 13:58 ` Jeff Layton
2025-06-25 18:26 ` Mkrtchyan, Tigran [this message]
2025-06-26 2:52 ` 回复: " Hanxiao Chen (Fujitsu)
2025-06-25 17:20 ` Mkrtchyan, Tigran
2025-06-25 18:17 ` Calum Mackay
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=1605056536.14463638.1750875991126.JavaMail.zimbra@desy.de \
--to=tigran.mkrtchyan@desy.de \
--cc=calum.mackay@oracle.com \
--cc=chenhx.fnst@fujitsu.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@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